Communitygithub.com

Adamparishspok/skills

让网站、Web 应用或在线商店为 AI 智能体做好准备。使用 Cloudflare 的 Agent Readiness 扫描,判断哪些检查适用于当前站点,按优先级部署发现文件和标头,并添加扫描器未评分的 AI 优先基础功能(服务端渲染内容、JSON-LD、llms.txt)。

skills 是什么?

这是一个全面的 AI 智能体技能,用于将网站改造为 AI 就绪(AI-ready)和智能体就绪(agent-ready)的状态。它基于 Cloudflare 的 isnitagentready.com 扫描器提供的 Agent Readiness 评分体系,指导开发者按照逻辑顺序(先扫描、再判断适用性、最后按优先级修复)逐步实施。该技能涵盖了 AI 爬虫的 robots.txt 规则、Content Signals、sitemap、面向智能体的 Markdown 内容协商(Accept: text/markdown)、Link 标头、API 目录、OAuth 发现、auth.md、MCP 服务器卡片、A2A 智能体卡片、智能体技能索引、WebMCP 以及商业协议(ACP、UCP、AP2、MPP、x402)。特别强调“切勿为不存在的东西发布发现文档”这一硬性规则。技能同时支持各类平台(Cloudflare、Vercel、Netlify、SvelteKit 等),并详细说明了静态文件与动态内容的部署方式,以及如何验证每个文件的状态、Content-Type 和内部链接。最终目标是让智能体能够以最低成本、最明确的方式访问和操作站点。

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

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

智能体就绪站点

智能体访问站点有三种方式:像爬虫一样读取、作为用户调用 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。对于尚未公开的站点,部署一个预览版并进行扫描。您也可以直接 curl references/templates.md 中的路径。

阅读结果: .well-known 路径上的 406 几乎总是意味着“未找到”。许多框架在请求不接受 HTML 时,会对未知路由返回 406。只要文件存在,就不是内容协商错误。

2. 判断哪些适用

首先对站点进行分类。然后在报告中把不在其列的所有检查标记为“不适用”。不要伪造。

检查内容站点需要登录或 API 的应用商店
robots.txt、sitemap、AI 爬虫规则、Content Signals是是是
面向智能体的 Markdown是公开页面是
Link 标头是是是
JSON-LD、llms.txt、服务端渲染内容(未评分)是公开页面是
API 目录—如果存在公开 API如果存在公开 API
OAuth 发现、OAuth 受保护资源、auth.md—如果存在真正的 OAuth 服务器如果客户拥有带 OAuth 的账户
MCP 服务器卡片—仅当运行了 MCP 服务器仅当运行了 MCP 服务器
A2A 智能体卡片、智能体技能索引—仅当存在这些智能体或技能相同
WebMCP—用于浏览器内操作(实验性)添加到购物车、搜索(实验性)
ACP、UCP、AP2、MPP、x402—x402/MPP 用于付费 API 调用仅当后端支持该协议
Web Bot Auth—仅当站点向其他站点发送爬虫相同
DNS-AID—草案,需要 DNSSEC:除非要求否则跳过除非要求否则跳过

硬性规则:切勿为不存在的东西发布发现文档。 这包括没有实时服务器的 MCP 卡片、没有工作授权服务器的 OAuth 元数据,或者没有结账 API 的 ACP。智能体会跟随它们并失败,而扫描器的深层检查无论如何都会使其失败。如果用户想要该功能,构建它是一个独立的任务。说明情况并停在此处。

3. 按等级顺序修复

按以下列表向下处理,并在第 2 节标记为“不适用”的地方停止。可复制文件位于 references/templates.md。

  1. robots.txt:包含 User-agent: *、Allow、Sitemap: 行和 Content-Signal: 行。显式命名 AI 爬虫。禁止账户、购物车、结账和管理路径,而不是目录。
  2. sitemap.xml:仅限规范 URL,在 robots.txt 中列出。
  3. 面向智能体的 Markdown:当请求发送 Accept: text/markdown 时,返回 Markdown 并设置 Content-Type: text/markdown。浏览器仍会获得 HTML。
    • 在 Cloudflare(Pro 或更高版本)上:在 AI Crawl Control → Overview → Quick Actions 下开启。无需代码。
    • 在其他地方:使用模板中的中间件。同时发送 Vary: Accept,否则 CDN 可能会缓存 Markdown 并发送给浏览器。
  4. 首页上的 Link 标头。指向 API 目录(如果有)、Markdown 替代版本和 llms.txt。
  5. 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 必须匹配。返回带有 WWW-Authenticate: Bearer resource_metadata="…" 的 401。然后添加 /auth.md:其 H1 必须包含 auth.md,并解释智能体如何获取凭据。托管认证(Auth0、Clerk、Cognito、Supabase)通常已经提供授权服务器元数据。链接到它;不要复制它。
  7. 智能体表面:MCP 服务器卡片、A2A 智能体卡片、智能体技能索引和 WebMCP。只为真实存在的东西添加。规范是草案且经常变化,因此在编写前请先获取当前修复技能(第 4 节)。
  8. 商业(未评分,因此仅当后端支持时):
    • 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 标头markdown-negotiation、link-headers
API 目录、OAuth、auth.mdapi-catalog、oauth-discovery、oauth-protected-resource、auth-md
智能体表面mcp-server-card、a2a-agent-card、agent-skills、webmcp、ard
商业acp、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 优先基础功能(未评分,但仍重要)

  • HTML 中的内容。 许多智能体和爬虫不运行 JavaScript。服务端渲染或预渲染产品名称、价格、库存、描述和文档。使用 curl -s URL | grep "<price or heading>" 进行测试。
  • JSON-LD:在首页使用 Organization 和 WebSite。商店添加 Product + Offer(价格、货币、可用性)和 BreadcrumbList。保持与可见页面一致。
  • /llms.txt:站点最有用的页面的简短 Markdown 地图(llmstxt.org)。添加成本很低,并且在无法实现 Markdown 协商时很有帮助。
  • 稳定、可读的 URL 和真实链接。 使用 <a href>,而不是点击处理程序。智能体跟随链接。
  • 语义化、带标签的 UI。 浏览器智能体使用无障碍树。正确的按钮、标签和表单 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.

相关技能