‹ 首页

documentation

@developersglobal · 收录于 1 周前

Document decisions, not just implementations. ADRs for architectural choices, inline docs for non-obvious code, and runbooks for operational knowledge.

适合你,如果团队常因文档缺失而重复踩坑

/ 下载安装
documentation.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add developersglobal/ai-agent-skills/documentation
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- developersglobal/ai-agent-skills/documentation
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify developersglobal/ai-agent-skills/documentation
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
64GitHub stars
~625上下文体积 · 单文件
镜像托管

怎么用

技能原文 SKILL.md作者撰写 · MIT · f47f948
Overview

Code explains what. Documentation explains why. The most valuable documentation records decisions that aren't obvious from reading the code: why this architecture, why this tradeoff, why not the obvious alternative.

When to Use
  • After any significant architectural decision
  • Before complex code that future maintainers will question
  • When an operational procedure isn't self-evident
  • When a non-obvious tradeoff was made
Process
Step 1: Architectural Decision Records (ADRs)

For every significant architectural decision:

  1. Write an ADR with:
  2. Context: What was the situation requiring a decision?
  3. Decision: What was decided?
  4. Alternatives considered: What else was evaluated and why rejected?
  5. Consequences: What are the positive and negative consequences?
  6. Status: Proposed | Accepted | Deprecated | Superseded
  7. Store ADRs in docs/decisions/ as numbered markdown files.

Verify: Every significant decision in the last sprint has an ADR.

Step 2: Code-Level Documentation
  1. Document the WHY, not the WHAT:
  2. // Using exponential backoff here — the payment API has strict rate limits (3 req/sec)
  3. // Retry the request
  4. Document non-obvious algorithmic choices.
  5. Document external constraints (rate limits, API quirks, platform limitations).
  6. Remove comments that state the obvious — they add noise.

Verify: Every non-obvious code block has a "why" comment.

Step 3: Runbooks
  1. For every production process that humans execute, write a runbook:
  2. When is this runbook used?
  3. What steps to execute?
  4. What does "done" look like?
  5. What could go wrong and how to recover?
  6. Runbooks live in docs/runbooks/.

Verify: Every on-call alert has a linked runbook.

Step 4: README Currency
  1. README reflects current state (not v1 state).
  2. Setup instructions work on a fresh machine.
  3. Architecture diagram updated after significant changes.
Common Rationalizations (and Rebuttals)

| Excuse | Rebuttal | |--------|----------| | "The code is self-documenting" | Code says what; documentation says why. Both are needed. | | "I'll document it later" | The context in your head right now is irreplaceable. Write it now. | | "Docs go stale" | Outdated docs are better than no docs. Update when you touch the code. |

Verification
  • [ ] ADRs written for significant architectural decisions
  • [ ] Non-obvious code blocks have "why" comments
  • [ ] Every production alert has a linked runbook
  • [ ] README is current and setup instructions work
References
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。