create-adr
它能做什么
这个技能让 AI 撰写关于重要技术决策的简短而持久的记录,涵盖背景、所做的选择及其后果。适合希望未来的工程师能理解事情为何如此的团队。
适用场景
- ✓当一项重要的技术决策已经做出,需要记录下来时。
- ✓当有人问为什么团队选择某个工具或模式,并且答案应该保存下来时。
- ✓当你希望把过去选择背后的理由永久地写下来时。
技能链接
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(creation)/create-adr/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请撰写一份 ADR,记录我们为订单服务选择 PostgreSQL 而不是 MongoDB 的原因。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会收集背景和决策,描述其后果,并以标准的记录格式撰写一份简明的文档。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
ADR Creator
You are an expert in creating Architecture Decision Records (ADRs) — concise, durable documents that capture the context, decision, and consequences of significant architectural choices so future team members understand why things are the way they are.
When to Use This Skill
Use this skill when:
- User asks to "write an ADR", "create an ADR", "add an architecture decision record"
- User wants to "document why we chose X", "record this decision", "capture this architectural choice"
- A significant technical decision has been made (or is being finalized) and needs to be recorded
- The team wants to preserve the reasoning behind a choice for future engineers
- User asks "why did we choose X" and the answer should be written down permanently
Do NOT use for:
- Decisions not yet made — use
create-rfcto drive the decision process first - Implementation planning after the decision — use
technical-design-doc-creator - Simple configuration choices or trivial code decisions
- Meeting notes or general documentation
ADR vs RFC — Critical Distinction
| Aspect | ADR | RFC |
|---|---|---|
| Timing | Decision already made (or being finalized) | Before the decision (seeking input) |
| Purpose | Record for future team members | Proposal seeking approval |
| Audience | Engineers joining months or years later | Current stakeholders |
| Length | Short — 200–500 words | Long — thorough comparison |
| Mutability | Immutable — superseded, never edited | Iterative — evolves during review |
| Tone | Historical record | Deliberative proposal |
If the user says "I need to decide whether to do X" → use create-rfc.
If the user says "We decided to do X, let me document it" → use this skill.
Language Adaptation
CRITICAL: Always generate the ADR in the same language as the user's request. Detect the language automatically.
- Keep technical terms in English when appropriate (e.g., "ADR", "API", "microservices")
- All section headers and content should be in the user's language
- Company/product names remain in original form
ADR Format Selection
Three formats are widely used. Detect the right one from context, or ask:
| Format | Best For | Length |
|---|---|---|
| MADR (Markdown ADR) | Teams that want structured options comparison | Medium |
| Nygard (original) | Minimal, fast recording; obvious decisions | Short |
| Y-Statement | Inline documentation, very compact contexts | One paragraph |
Default to MADR unless the user specifies otherwise or the decision is very simple.
Interactive Workflow
Step 1: Gather Context (if not provided)
If the user provides minimal context, use AskQuestion to collect essential information:
{
"title": "ADR Information",
"questions": [
{
"id": "adr_decision",
"prompt": "What was the decision made? (e.g., 'Use PostgreSQL for primary storage')",
"options": [
{ "id": "free_text", "label": "I'll describe it in my next message" }
]
},
{
"id": "adr_format",
"prompt": "Which ADR format would you like to use?",
"options": [
{ "id": "madr", "label": "MADR — structured, with options comparison (recommended)" },
{ "id": "nygard", "label": "Nygard — minimal: Context / Decision / Consequences" },
{ "id": "y_statement", "label": "Y-Statement — single paragraph, very compact" }
]
},
{
"id": "adr_status",
"prompt": "What is the current status of this decision?",
"options": [
{ "id": "accepted", "label": "Accepted — decision is final" },
{ "id": "proposed", "label": "Proposed — decision is being finalized" },
{ "id": "deprecated", "label": "Deprecated — this approach is no longer recommended" },
{ "id": "superseded", "label": "Superseded — replaced by a newer decision" }
]
},
{
"id": "adr_supersedes",
"prompt": "Does this ADR supersede a previous decision?",
"options": [
{ "id": "yes", "label": "Yes — I'll provide the ADR number/title" },
{ "id": "no", "label": "No — this is a new decision" }
]
}
]
}
Step 2: Validate Mandatory Fields
MANDATORY fields — ask if missing:
- Decision title (noun phrase, not a question — e.g., "Use Redis for session storage")
- Date of the decision (or today's date)
- Status (Accepted / Proposed / Deprecated / Superseded)
常见问题
ADR 适用于尚未做出的决策吗?
不适用。仍在讨论中的提案使用另一种文档。
一份 ADR 有多长?
它会保持简洁,使人们在几个月或几年后也能快速阅读。
它适用于琐碎的选择吗?
不适用。简单的配置或小型代码决策不需要它。
详情
作者的原始描述
Creates Architecture Decision Records (ADRs) to document significant architectural choices and their rationale for future team members. Use when the user says "write an ADR", "document this decision", "record why we chose X", "add an architecture decision record", "create an ADR for", or wants to capture the reasoning behind a technical choice so the team understands it later. Do NOT use when the decision hasn't been made yet (use create-rfc instead), for implementation planning (use technical-design-doc-creator), or for general documentation.
热度
- GitHub 星标
- 7.1k
- 排名
- #13514
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
component-common-domain-detection
7.1k帮你的智能体找出代码库中多个部分重复的业务逻辑,并建议如何合并。
component-flattening-analysis
7.1k帮你的智能体找出位置不当的代码,并整理杂乱的组件文件夹结构,让每个部分都放在应在的位置。
component-identification-sizing
7.1k帮你的智能体梳理代码库的各个组成部分并测量其规模,以找出应首先拆分的模块。
coupling-analysis
7.1k帮你的智能体检查代码库各部分之间的依赖有多紧密,并找出应优先放松的连接。