hads
它能做什么
这个工具可以帮你把技术文档整理成人类和人工智能(AI)都容易理解的格式。它使用一种名为 HADS 的特殊格式,把重要事实、背景信息和已知问题分开。
适用场景
- ✓编写需要让人类和 AI 都看得懂的技术文档时。
- ✓把已有文档转换成 HADS 格式时。
- ✓想让 AI 更高效地阅读文档时。
技能链接
https://github.com/wshobson/agents/blob/main/plugins/documentation-standards/skills/hads/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“把这份手册转换成 HADS 格式,把事实、背景和已知 bug 分开。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会阅读文档,找出用 [SPEC] 标记的事实、用 [NOTE] 标记的背景信息,以及用 [BUG] 标记的问题。它利用这些标记来理解信息,并有条理地进行处理。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
HADS Claude Skill
Version 1.0.0 · Human-AI Document Standard · 2026 · HADS 1.0.0
AI READING INSTRUCTION
This skill teaches Claude how to read, generate, and validate HADS documents.
Read all [SPEC] blocks before responding to any HADS-related request.
Read [NOTE] blocks if you need context on intent or edge cases.
1. WHAT IS HADS
[SPEC]
- HADS = Human-AI Document Standard
- Convention for Markdown technical documentation
- Four block types:
**[SPEC]**,**[NOTE]**,**[BUG]**,**[?]** - Every HADS document requires: H1 title, version declaration, AI manifest
- AI manifest appears before first content section, tells AI what to read/skip
- File extension:
.md— standard Markdown, no tooling required
2. BLOCK TYPES
[SPEC]
**[SPEC]** Authoritative fact. Terse. Bullet lists, tables, code. AI reads always.
**[NOTE]** Human context, history, examples. AI may skip.
**[BUG]** Verified failure + fix. Required fields: symptom, cause, fix. Always read.
**[?]** Unverified / inferred. Lower confidence. Always flagged.
Block tag rules:
- Bold, on its own line:
**[SPEC]** - Content follows immediately (no blank line between tag and content)
- Multiple blocks of different types allowed per section
- Titled BUG blocks allowed:
**[BUG] Short description** - No nesting of blocks inside blocks
3. REQUIRED DOCUMENT STRUCTURE
[SPEC]
# Document Title
**Version X.Y.Z** · Author · Date · [metadata]
---
## AI READING INSTRUCTION
Read `[SPEC]` and `[BUG]` blocks for authoritative facts.
Read `[NOTE]` only if additional context is needed.
`[?]` blocks are unverified — treat with lower confidence.
---
## 1. First Section
**[SPEC]**
...
Required elements in order:
- H1 title
**Version X.Y.Z**in header (first 20 lines)- AI manifest section before first content section
- Content sections (H2), subsections (H3)
4. HOW CLAUDE READS HADS
[SPEC] When encountering a HADS document:
- Find and read the AI manifest first
- Read all
[SPEC]blocks — these are ground truth - Read all
[BUG]blocks — always, before generating any code or config - Read
[NOTE]blocks only if[SPEC]is insufficient to answer the query - Treat
[?]content as hypothesis — note uncertainty in response
Token optimization: for large documents, scan section headings first, then read only [SPEC] and [BUG] blocks in relevant sections.
5. HOW CLAUDE GENERATES HADS
[SPEC] When asked to write documentation in HADS format:
- Start with header block (title, version, metadata)
- Add AI manifest — always include, never skip
- Organize content into numbered H2 sections
- For each fact: write as
[SPEC]— terse, bullet or table or code - For each "why" or context: write as
[NOTE] - For each known failure mode with confirmed fix: write as
[BUG] - For each unverified claim: write as
[?] - End with changelog section
Content rules for [SPEC]:
- Prefer bullet lists over prose
- Prefer tables for multi-field facts
- Prefer code blocks for syntax, formats, examples
- Maximum 2 sentences of prose — if more needed, move to
[NOTE]
Content rules for [BUG]:
- Always include: symptom, cause, fix
- Optional: affected versions, workaround
- Title on same line:
**[BUG] Short description**
[NOTE]
When converting existing documentation to HADS: extract facts into [SPEC], move narrative and history to [NOTE], surface all known issues as [BUG]. Do not duplicate content between block types.
6. VALIDATION RULES
[SPEC] A valid HADS document must have:
- H1 title
**Version X.Y.Z**in first 20 lines- AI manifest before first content section
- All block tags bold:
**[SPEC]**not[SPEC]not [SPEC] [BUG]blocks contain at minimum symptom + fix
Validator: (planned — not yet included in this release)
7. EXAMPLE INTERACTIONS
[SPEC]
User: "Write HADS documentation for this REST API" → Generate full HADS document: header, manifest, sections with [SPEC]/[NOTE]/[BUG] blocks
User: "Convert this README to HADS format" → Restructure existing content into HADS blocks, preserve all facts, add manifest
User: "Is this document valid HADS?" → Check: H1 title, version, manifest, block tag formatting, BUG block completeness
User: "Summarize this HADS document" → Read only [SPEC] and [BUG] blocks, return structured summary
User: "What does this API do?" (HADS doc provided)
…
常见问题
[SPEC]、[NOTE] 和 [BUG] 块分别是什么?
[SPEC] 包含重要而直接的事实;[NOTE] 提供补充背景,比如示例或历史信息;[BUG] 描述已知的故障以及修复方法。
为什么要使用 HADS 格式?
HADS 让文档对 AI 来说更清晰。AI 往往比人类更早读到文档,使用这种格式可以确保它抓住关键信息,而不会迷失在细节里。
什么是“AI manifest”?
它是放在文档开头的一段指令,告诉 AI 应该重点阅读哪些部分(比如 [SPEC] 和 [BUG]),以及哪些部分可以跳过(比如 [NOTE],除非需要更多背景)。
详情
作者的原始描述
Use when writing technical documentation that needs to be readable by both humans and AI models, converting existing docs to HADS format, validating a HADS document, or optimizing documentation for token-efficient AI consumption.
repo: wshobson/agents
热度
- GitHub 星标
- 41k
- 排名
- #6692
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …