详细分析 ▾
运行时依赖
版本
Initial release of cf-markdown-agents. - Enables fetching web content using Cloudflare's Markdown for Agents protocol. - Automatically converts HTML pages to clean, structured Markdown format with ~80% token reduction. - Provides examples for usage with shell scripts, TypeScript/JavaScript, and cURL. - Describes response headers including token count and AI usage permissions. - Lists supported sites and summarizes key benefits for AI processing.
安装命令 点击复制
技能文档
This skill enables fetching web content using Cloudflare's Markdown for Agents protocol, which automatically converts HTML pages to clean, structured Markdown format.
什么 Markdown 对于 Agents?
Cloudflare's Markdown for Agents is a content negotiation feature that:
- Automatically converts HTML 到 Markdown 在 edge
- Reduces 令牌 usage 由 ~80% compared 到 raw HTML
- Returns clean, structured content perfect 对于 AI 处理中
- Adds
x-markdown-tokens页头 showing estimated 令牌 计数 - Includes
Content-Signalheaders 对于 AI usage permissions
Usage
Basic 获取
Use the provided script to fetch any URL with Markdown for Agents support:
scripts/fetch-markdown.sh
Example:
scripts/fetch-markdown.sh "https://developers.cloudflare.com/agents/"
在...中 Code
TypeScript/JavaScript example:
const response = await fetch("https://example.com/page", {
headers: {
Accept: "text/markdown, text/html",
},
});const tokenCount = response.headers.get("x-markdown-tokens");
const markdown = await response.text();
cURL example:
curl https://example.com/page -H "Accept: text/markdown"
响应 Headers
content-类型: text/markdown; charset=utf-8- Content Markdownx-markdown-tokens: <数字>- Estimated 令牌 计数content-signal: ai-train=是, 搜索=是, ai-输入框=是- Usage permissions
Supported Sites
Any site using Cloudflare with Markdown for Agents enabled:
- Cloudflare Developer Documentation (developers.cloudflare.com)
- Cloudflare Blog (blog.cloudflare.com)
- 任何 site 带有 feature 已启用 在...中 Cloudflare dashboard
Benefits
| Aspect | HTML | Markdown |
|---|---|---|
| Tokens | 16,180 | 3,150 |
| Reduction | - | ~80% |
| Structure | Complex | Clean |
| AI Parsing | Hard | Easy |
References
- 满 protocol details: references/protocol.md
- API examples: references/examples.md
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制