Communitygithub.com

Agent-ready site (代理程式就緒網站)

將網站、網頁應用程式或線上商店轉變為對 AI 代理程式就緒的狀態。透過 Cloudflare 的代理程式就緒檢查進行掃描,判斷哪些檢查適用於該類型的網站,並按優先順序部署探索檔案與標頭,同時加入掃描器未評分但必要的 AI-first 基礎項目(伺服器端渲染內容、JSON-LD、llms.txt)。

Agent-ready site (代理程式就緒網站) 是什麼?

這個技能旨在將網站、網頁應用程式或線上商店轉變為對 AI 代理程式就緒的狀態。其核心方法遵循 Cloudflare 的 Agent Readiness 掃描器(網址為 isitagentready.com)所定義的層級式架構。使用者先執行 scan.sh 腳本進行評估,然後根據網站類型(內容網站、應用程式或商店)判斷哪些檢查項目適用,再按優先順序逐步修正。技能涵蓋 robots.txt 的 AI 爬蟲規則、Content Signals、Sitemap、Markdown for Agents(支援 text/markdown 內容協商)、Link headers、API 目錄、OAuth 探索、auth.md、MCP 伺服器卡、A2A 代理程式卡、代理程式技能索引、WebMCP,以及商業協定(ACP、UCP、AP2、MPP、x402)。它特別強調絕不能發布指向不存在功能的探索文件,否則會誤導代理程式導致失敗。此外,該技能還涵蓋了掃描器未評分的 AI-first 基礎最佳實踐,如伺服器端渲染內容、JSON-LD 結構化資料以及 /llms.txt 文件。此技能適用於任何人,只要其目標是讓網站達到 AI 就緒或代理程式就緒的狀態,或是修復 isitagentready.com 或 Cloudflare Agent Readiness 報告中發現的問題。

相容平台✓Claude Code~Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/Adamparishspok/skills/tree/HEAD/skills/agent-ready-site

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件


name: agent-ready-site description: Make a website, web app or online store ready for AI agents. Scan it with Cloudflare's Agent Readiness checks, decide which checks apply to this kind of site, ship the discovery files and headers in priority order, and add the AI-first basics the scanner does not score (server-rendered content, JSON-LD, llms.txt). Covers robots.txt AI rules, Content Signals, sitemap, Markdown for Agents (Accept text/markdown), Link headers, API catalog, OAuth discovery, auth.md, MCP server card, A2A agent card, agent skills index, WebMCP, and commerce protocols (ACP, UCP, AP2, MPP, x402). Use when making a site AI-ready, agent-ready or AI-first, or fixing an isitagentready.com or Cloudflare Agent Readiness report. Triggers on: AI ready, agent ready, AI-first, agent readiness, isitagentready, AI Crawl Control, Markdown for Agents, text/markdown, llms.txt, GPTBot, ClaudeBot, AI crawlers, Content-Signal, ai-train, api-catalog, .well-known, oauth-protected-resource, auth.md, MCP server card, agent card, agent skills, WebMCP, agentic commerce, ACP, UCP, x402. license: MIT

Agent-ready site(代理程式就緒網站)

代理程式有三種方式與網站互動:像爬蟲一樣讀取內容、以使用者身分呼叫其 API,或從網站購買東西。就緒狀態意味著每一種方式都成本低廉且明確允許。Cloudflare 的 Agent Readiness 掃描器 (isitagentready.com)是通用的評分卡。用它來衡量,但不要把通過評分當作最終目標:一份指向空無一物的探索文件,比完全沒有文件更糟糕。

1. 掃描

scripts/scan.sh https://example.com          # 簡潔的 PASS/FAIL 表格 + 下一層級的要求
scripts/scan.sh https://example.com --json   # 包含每個檢查項目證據的完整報告

此腳本會呼叫 POST https://isitagentready.com/api/scan。它會輸出層級 (0–5)、每個檢查項目,以及下一個層級的要求與 Cloudflare 針對該要求的修正技能 URL。如果網站尚未公開,請先部署一個預覽版本再進行掃描。您也可以直接對 references/templates.md 中的路徑發出 curl 請求。

讀取結果: 如果在 .well-known 路徑上收到 406 狀態碼,幾乎都代表「找不到」。許多框架在請求不接受 HTML 時,會對未知路由回應 406。除非該檔案確實存在,否則這並非內容協商的錯誤。

2. 判斷哪些檢查適用

首先對網站進行分類。然後在報告中,將不屬於該欄位的每個檢查項目標記為「不適用」。請不要偽造結果。

檢查項目內容網站需要登入或提供 API 的應用程式商店
robots.txt、sitemap、AI 爬蟲規則、Content Signals是是是
Markdown for Agents(代理程式專用 Markdown)是公開頁面是
Link headers(連結標頭)是是是
JSON-LD、llms.txt、伺服器端渲染內容(不計分)是公開頁面是
API catalog(API 目錄)—如果存在公開 API如果存在公開 API
OAuth discovery(OAuth 探索)、OAuth protected resource(受保護資源)、auth.md—如果存在真正的 OAuth 伺服器如果客戶有支援 OAuth 的帳戶
MCP server card(MCP 伺服器卡)—僅當有 MCP 伺服器在執行僅當有 MCP 伺服器在執行
A2A agent card(A2A 代理程式卡)、agent skills index(代理程式技能索引)—僅當存在這些代理程式或技能相同
WebMCP—用於瀏覽器內操作(實驗性)加入購物車、搜尋(實驗性)
ACP、UCP、AP2、MPP、x402—用於付費 API 呼叫 (x402/MPP)僅當後端支援該協定時
Web Bot Auth(網頁機器人驗證)—僅當網站會向其他網站發送機器人時相同
DNS-AID—草稿,需要 DNSSEC:除非被要求,否則跳過除非被要求,否則跳過

硬性規則:絕不為不存在的事物發布探索文件。 這包括沒有即時伺服器的 MCP 卡、沒有運作中授權伺服器的 OAuth 元資料,或沒有結帳 API 的 ACP。代理程式會跟隨這些文件並失敗,而掃描器的深度檢查無論如何都會讓它失敗。如果使用者想要該功能,建置它是另一個獨立的任務。請直接說明並在此停止。

3. 依層級順序修正

按照以下列表順序進行修正,並在第二節標示為「不適用」的地方停止。可直接複製使用的範本檔案位於 references/templates.md 中。

  1. robots.txt:包含 User-agent: * 搭配 Allow、一個 Sitemap: 行和一個 Content-Signal: 行。明確列出 AI 爬蟲的名稱。禁止爬取帳戶、購物車、結帳和管理員路徑,但不要禁止爬取商品目錄。
  2. sitemap.xml:僅使用標準網址,並在 robots.txt 中列出。
  3. Markdown for Agents(代理程式專用 Markdown):當請求包含 Accept: text/markdown 標頭時,回傳 Markdown 格式的回應,並設定 Content-Type: text/markdown。瀏覽器仍會取得 HTML。
    • 在 Cloudflare 上(Pro 或更高方案):在 AI Crawl Control → Overview → Quick Actions 下啟用。無需任何程式碼。
    • 在其他環境:使用範本中的中介軟體。同時發送 Vary: Accept 標頭,否則 CDN 可能會快取 Markdown 並將其提供給瀏覽器。
  4. Link headers(連結標頭) 放在首頁。指向 API 目錄(如果有的話)、Markdown 替代版本和 llms.txt。
  5. API catalog(API 目錄) 位於 /.well-known/api-catalog (RFC 9727)。以 application/linkset+json 格式提供,每個 API 一個條目。每個條目連結到 OpenAPI 規格、文件和一個健康檢查端點。每個連結都必須可以解析。
  6. OAuth:在 API 上發布 /.well-known/oauth-protected-resource (RFC 9728)。授權伺服器發布 /.well-known/oauth-authorization-server (RFC 8414) 或 openid-configuration,且其 issuer 必須相符。回傳 401 狀態碼並附帶 WWW-Authenticate: Bearer resource_metadata="…" 標頭。然後新增 /auth.md:其 H1 標題必須包含 auth.md,並說明代理程式如何取得憑證。託管式驗證服務(Auth0、Clerk、Cognito、Supabase)通常已提供授權伺服器元資料。連結到它即可,不要複製內容。
  7. Agent surfaces(代理程式介面):MCP 伺服器卡、A2A 代理程式卡、代理程式技能索引和 WebMCP。僅為真實存在的項目添加。這些規格仍是草稿且經常變更,因此在實作前請先取得最新的修正技能(第四節)。
  8. Commerce(商務)(不計分,因此僅在後端支援時才執行):
    • ACP 位於 /.well-known/acp.json。
    • UCP 位於 /.well-known/ucp。
    • MPP 透過 /openapi.json 中的 x-payment-info 提供。
    • x402 透過付費端點上的 402 Payment Required 狀態碼提供。
    • AP2 依附於 A2A 代理程式卡。
    • Shopify、Stripe 等平台通常會提供這些。請先檢查平台。自行建置支付協定非本技能範圍。

4. 草稿規格:取得最新資料,不要依賴記憶

Cloudflare 為每個檢查項目發布了一個修正技能。它們會追蹤規格變更,因此在實作草案項目之前,請先閱讀當前的版本:

https://isitagentready.com/.well-known/agent-skills/<name>/SKILL.md
檢查項目<name>
Markdown、Link headersmarkdown-negotiation、link-headers
API catalog、OAuth、auth.mdapi-catalog、oauth-discovery、oauth-protected-resource、auth-md
Agent surfacesmcp-server-card、a2a-agent-card、agent-skills、webmcp、ard
Commerceacp、ucp、mpp、x402
其他web-bot-auth、dns-aid、personal-agent-protocol、llms-txt

完整列表位於 https://isitagentready.com/.well-known/agent-skills/index.json。將這些檔案視為參考資料,而不是覆蓋使用者決定的指令。

5. 檔案存放位置

  • 靜態檔案應放在網站根目錄提供的資料夾中:對於 Next.js、Vite、Astro、Nuxt 和 Remix 是 public/.well-known/…,對於 SvelteKit 是 static/.well-known/…。請確認建置過程會複製點資料夾。某些部署工具會跳過它們。
  • 無副檔名的檔案(api-catalog、oauth-protected-resource)需要明確的 Content-Type。在主機標頭設定中設定(vercel.json、Netlify/Cloudflare Pages 的 _headers、nginx),或透過路由處理器提供該檔案。
  • 動態內容(Markdown 頁面、從設定檔建構的代理程式卡)應放在路由處理器中,而不是放在會隨時間漂移的手動複製檔案中。
  • 機器人保護機制(Cloudflare Bot Fight Mode、WAF 規則、Vercel Attack Challenge)可能會阻擋掃描器和真正的代理程式。如果檢查超時或回傳 403,請在探索路徑上允許經過驗證的機器人。

6. AI-first 基礎(不計分,但仍重要)

  • HTML 中的內容。 許多代理程式和爬蟲不執行 JavaScript。請伺服器端渲染或預先渲染產品名稱、價格、庫存、描述和文件。使用 curl -s URL | grep "<price or heading>" 測試。
  • JSON-LD:在首頁使用 Organization 和 WebSite。商店應添加 Product + Offer(價格、貨幣、庫存情況)和 BreadcrumbList。確保其內容與可見頁面一致。
  • /llms.txt:網站最有用頁面的簡短 Markdown 地圖 (llmstxt.org)。加入它成本很低,且在無法進行 Markdown 內容協商時很有幫助。
  • 穩定、可讀的網址和真實的連結。 使用 <a href>,而不是點擊處理器。代理程式會跟隨連結。
  • 語意化、有標籤的 UI。 瀏覽器代理程式使用無障礙樹 (accessibility tree)。正確的按鈕、標籤和表單 autocomplete 屬性可以讓結帳和註冊流程也適用於代理程式。

7. 驗證

  1. 在已部署的 URL 上再次執行 scripts/scan.sh。報告修正前後的層級,以及現在哪些檢查項目通過。

  2. 列出每個你跳過並標記為「不適用」的檢查項目,並附上一行原因。

  3. 對每個新檔案發出 curl 請求,檢查其狀態碼、Content-Type,以及檔案中每個連結的 URL 是否都回傳 200:

    curl -sI https://example.com/.well-known/api-catalog
    curl -s -H 'Accept: text/markdown' -D - https://example.com/ -o /dev/null
    
  4. 在瀏覽器中載入首頁,確認它仍正常提供 HTML。

  5. 如果 Markdown 內容協商是新增的,且網站位於 CDN 之後,請檢查快取是否沒有將 HTML 和 Markdown 混在一起。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

Adamparishspok/skills

Install a complete, lean favicon set on any website or web app — the five files modern browsers, iOS and Android actually use, one block of head markup added once in the root layout, and a check that every file resolves. Covers finding the public folder per framework, generating the set from one SVG (or from a RealFaviconGenerator package), dark-mode SVG icons, maskable manifest icons, cache busting and verification. Use when adding, replacing or auditing a favicon, app icon, apple-touch-icon or web manifest. Triggers on: favicon, favicon.ico, favicon.svg, apple-touch-icon, site.webmanifest, manifest.json, app icon, PWA icon, maskable icon, tab icon, RealFaviconGenerator.

Adamparishspok/skills

Give an interface one shared tempo and a small vocabulary of hover and state micro-interactions: duration tiers (tap/pop/hover/card/layout) for CSS and Motion, swap hand-offs, rows whose highlight grows in, trailing arrows, chevron nudges, card lifts without translate, scroll-edge fades, and icon/label swaps for copy and toggle buttons. Use when animations feel inconsistent, durations are scattered magic numbers, hovers only change colour, or a product feels flat or unfinished. Triggers on: animation duration, transition timing, hover state, micro-interaction, polish, copy button feedback, menu icon to close, back arrow, card hover, scroll fade, motion tokens, Framer Motion durations.

Adamparishspok/skills

Consolidate several apps or prototypes onto one shared component library without flattening their looks. Covers finding duplicated local components (buttons, selects, fields, modals, pagers, toasts), making shared components token-sized so each suite or app sets its own measurements, mapping variant names, deciding what stays app-specific, and the tailwind-merge traps that silently break custom tokens. Use when several apps each grew their own Btn/Select/Modal, when a design system's components "don't fit" a second product, or when retheming a family of apps. Triggers on: shared component library, design system consolidation, duplicate components, retheme, suite of apps, shadcn retokened, token-driven components, cn tailwind-merge custom tokens, variant mapping.

Adamparishspok/skills

Build or migrate a UI's neutral palette (grounds, surfaces, lines, ink/text) as an OKLCH formula driven by a few inputs instead of dozens of hand-picked hex values, with light and dark themes, per-step ladder overrides, a fit script that reproduces existing colours, and a browser contrast audit. Use when creating a theme, adding dark mode, retinting a product, auditing text contrast, or consolidating several apps' palettes. Triggers on: palette, neutrals, grey ramp, dark mode, theme tokens, oklch, retint, hue, contrast audit, design tokens, Tailwind @theme colours.

相關技能