AI 與 Agent

llms.txt

站點提供 /llms.txt(索引)與 /llms-full.txt(全文),供 AI 工具以 web fetch 讀取文件。

本站有 llms.txt 格式索引,可把文件接給 ChatGPT、Claude、Cursor 等。

選路: client 有 MCP(Claude Code、Cursor)→ 用 MCP 可直接裝元件;只有 web fetch、或不想設 server → 用本頁。

部署網域:https://component-registry-4d4d86.gitlab.io(與 nuxt.config.ts 的 site.url 同步)。下文 /llms.txt、/llms-full.txt 皆相對此網域。

兩個檔

檔案內容何時用
/llms.txt各文件頁標題與 description先掃有哪些元件再深入
/llms-full.txt每頁完整 markdown + demo + API 表直接依文件寫程式

怎麼用

以 Cursor、Claude 為例;其他能 web fetch 的工具同理。

Cursor

在 Docs/@Docs 把 https://component-registry-4d4d86.gitlab.io/llms.txt 加為來源,prompt 裡用 @Docs 引用。

Claude

請 Claude 用 Web Fetch 讀 llms-full.txt,再依文件回答或產生範例。

與 shadcn-vue CLI

  1. 把 /llms-full.txt 餵給 LLM。
  2. 說明需求(例如「含 loading 的確認按鈕」)。
  3. 取得元件名(如 admin-button)與範例。
  4. 依安裝設好 @admin,確認 components.json 的 iconLibrary 為 tabler,再執行 pnpm dlx shadcn-vue add @admin/<component>。
  5. 貼上程式碼並調整。

提示可加:「只用 Admin Registry 已收錄元件,並先列出需 npx shadcn-vue add 的清單」。

有 MCP 時可改走 MCP。Agent 工作流見 Agent skill。