据 AlphaMoat 统计,截至 2026-09,Agent Docs 累计下载 4,061 次、获 4 个星标,在全部 5,078 个 AI 技能中排名第 2,500 位,在「知识管理」分类(442 个)中排名第 232 位。
| 平台 | 累计安装 | 累计下载 | 星标 | 评论 |
|---|---|---|---|---|
| ClawHub ↗ | 130 | 4,061 | 4 | - |
各平台的计数口径不同,统计时间不一致。
该技能介绍如何组织 SKILL.md、README、API 文档和索引,强调分层上下文、按主题分块、压缩检索索引,并前置安全约束。生成的 AGENTS.md、llms.txt、CI 片段或安全规则可能不准确、过时或范围过宽;采纳前应逐项审核。若采用外部检索,应使用域名白名单、人工复核并审计请求。
资料发布于 2026-10-29
以下是根据技能文档生成的示例,不代表实际运行结果。
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-09 | 4,061 | — | 4 |
| 2026-06 | 3,430 | — | 4 |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
--- name: agent-docs description: Create documentation optimized for AI agent consumption. Use when writing SKILL.md files, README files, API docs, or any documentation that will be read by LLMs in context windows. Helps structure content for RAG retrieval, token efficiency, and the Hybrid Context Hierarchy. --- # Agent Docs Write documentation that AI agents can efficiently consume. Based on Vercel benchmarks and industry standards (AGENTS.md, llms.txt, CLAUDE.md). ## The Hybrid Context Hierarchy
Three-layer architecture for optimal agent performance:
### Layer 1: Constitution (Inline)
**Always in context.** 2,000–4,000 tokens max.
```markdown
# AGENTS.md
> Context: Next.js 16 | Tailwind | Supabase
## 🚨 CRITICAL
- NO SECRETS in output
- Use `app/` directory ONLY
## 📚 DOCS INDEX (use read_file)
- Auth: `docs/auth/llms.txt`
- DB: `docs/db/schema.md`
```
**Include:**
- Security rules, architecture constraints
- Build/test/lint commands (top for primacy bias)
- Documentation map (where to find more)
### Layer 2: Reference Library (Local Retrieval)
**Fetched on demand.** 1K–5K token chunks.
- Framework-specific guides
- Detailed style guides
- API schemas
### Layer 3: Research Assistant (External)
**Gated by allow-lists.** Edge cases only.
- Latest library updates
- Stack Overflow for obscure errors
- Third-party llms.txt
## Why This Works
**Vercel Benchmark (2026):**
| Approach | Pass Rate |
|----------|-----------|
| Tool-based retrieval | 53% |
| Retrieval + prompting | 79% |
| **Inline AGENTS.md** | **100%** |
**Root cause:** Meta-cognitive failure. Agents don't know what they don't know—they assume training data is sufficient. Inline docs bypass this entirely.
## Core Principles
### 1. Compressed Index > Full Docs
An 8KB compressed index outperforms a 40KB full dump.
**Compress to:**
- File paths (where code lives)
- Function signatures (names + types only)
- Negative constraints ("Do NOT use X")
### 2. Structure for Chunking
RAG systems split at headers. Each section must be self-contained:
```markdown
## Database Setup ← Chunk boundary
Prerequisites: PostgreSQL 14+
1. Create database...
```
**Rules:**
- Front-load key info (chunkers truncate)
- Descriptive headers (agents search by header text)
### 3. Inline Over Links
Agents can't autonomously browse. Each link = tool call + latency + potential failure.
| Approach | Token Load | Agent Success |
|----------|------------|---------------|
| Full inline | ~12K | ✅ High |
| Links only | ~2K | ❌ Requires fetching |
| Hybrid | ~4K base | ✅ Best of both |
### 4. The "Lost in the Middle" Problem
LLMs have U-shaped attention:
- **Strong:** Start of context (primacy)
- **Strong:** End of context (recency)
- **Weak:** Middle of context
**Solution:** Put critical rules at TOP of AGENTS.md. Governance first, details later.
### 5. Signal-to-Noise Ratio
Strip everything that isn't essential:
- No "Welcome to..." preambles
- No marketing text
- No changelogs in core docs
Formats like llms.txt and AGENTS.md mechanically increase SNR.
## llms.txt Standard
Machine-readable doc index for agents:
```markdown
# Project Name
> One-line project description.
## Authentication
- [Setup](docs/auth/setup.md): Environment vars and init
- [Server](docs/auth/server.md): Cookie handling
## Database
- [Schema](docs/db/schema.md): Full Prisma schema
```
**Location:** `/llms.txt` at domain root
**Companion:** `/llms-full.txt` — full concatenated docs, HTML stripped
## Security Considerations
### Inline = Trusted
AGENTS.md is part of your codebase. Controlled, version-pinned.
### External = Attack Surface
- Indirect prompt injection via hidden text
- SSRF risks if agents can browse freely
- Dependency on external uptime
**Mitigation:** Domain allow-lists, human-in-the-loop for external retrieval.
## Anti-Patterns
1. **Pasting 50 pages** — triggers "Lost in the Middle"
2. **"See external docs"** — agents can't browse autonomously
3. **Generic advice** — "Write clean code" (use specific constraints)
4. **TOC-only docs** — indexes without content
5. **Trusting retrieval alone** — 53% vs 100% pass rate
## Advanced Patterns
For detailed guidance on RAG optimization, multi-framework docs, and API templates, see [references/advanced-patterns.md](references/advanced-patterns.md).
## Validation Checklist
- [ ] Critical governance at TOP of doc
- [ ] Total inline context under 4K tokens
- [ ] Each H2 section self-contained
- [ ] No external links without inline summary
- [ ] Negative constraints explicit ("Do NOT...")
- [ ] File paths and signatures, not full code
把长文本、文档与网页内容压缩成要点和关键词的摘要工具。
通过 IMA OpenAPI 管理笔记与知识库内容。
规定如何为网页请求选择合适工具的必读指引。
调用百度 AI 搜索接口做网页检索的技能。
用 uvx 直接调用 markitdown,把各类文件转成 Markdown。
面向 OpenClaw 的默认网页搜索,实时检索多个引擎。
用 DuckDuckGo 接口做网页、新闻、图片与视频检索的技能。
检索并发现可用 OpenClaw 技能的技能。
数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。