write-adr
A structured workflow for creating and versioning Architectural Decision Records (ADRs) to document important system design choices.
Install
mkdir -p .claude/skills/write-adr && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16457" && unzip -o skill.zip -d .claude/skills/write-adr && rm skill.zipInstalls to .claude/skills/write-adr
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when making or changing any architectural decision in the Smart Charging project — a new ADR under docs/adr/, or superseding an existing one.Key capabilities
- →Determine if a decision is ADR-worthy
- →Number new ADRs sequentially
- →Draft ADRs against a template
- →Self-check ADR content for completeness
- →Cross-check new ADRs against existing ones
- →Review ADRs using an agent
How it works
The skill guides the user through the process of creating or superseding an Architectural Decision Record (ADR), ensuring it follows a specific template, is properly numbered, and is reviewed for consistency and completeness.
Inputs & outputs
When to use write-adr
- →Create a new architectural decision record
- →Document the 'why' behind a technical design change
- →Supersede an existing ADR with a new decision
About this skill
Write an ADR
Capture an architectural decision as a numbered, immutable Architecture Decision Record
(docs/adl/NNNN-kebab-case-title.md), per docs/adl/0001-use-architecture-decision-records.md
(the decision to use ADRs at all, and why the template looks the way it does).
Is this decision ADR-worthy?
Write an ADR when the choice is about structure that would be expensive to reverse or that materially constrains future options — e.g. how integration entities map to hardware, where a boundary/abstraction layer sits, a config-entry schema shape, a library/protocol dependency, a change to the coordinator/control-loop structure.
Skip it for a variable name, a log message, or any implementation detail with no lasting structural consequence. When in doubt: would a future contributor benefit from knowing why, not just what? If yes, write the ADR.
The cycle (do every step, in order)
- Open (or link) a GitHub issue describing the decision to be made, before drafting.
Skip this step only when the ADR merely documents a decision already approved in an
issue/PR that exists (link it instead). Reference the issue in the eventual
commit/PR (
Closes #N). - Number it — next sequential integer after the highest existing
docs/adl/NNNN-*, zero-padded to 4 digits. Never reuse or renumber; a superseded ADR keeps its number. Branch asadr/NNNN(this number, not the issue number), per CLAUDE.md's branch-naming convention. - Draft against
docs/adl/template.md: Status, Context, Considered options (every option seriously evaluated, each with Pro/Con — not just the chosen one), Decision, Consequences. - Self-check (no 6Cs pass — that check is for behavioral requirements/use-cases;
an ADR's correctness is judged by whether its options and trade-offs are real, not by
Clarity/Concision/etc.):
- Context states the forces at play without presupposing the answer.
- Every considered option has at least one genuine Pro and one genuine Con — an option with no real Con is a sign it wasn't seriously considered, or a real Con is being hidden.
- Decision references the options' trade-offs rather than restating them.
- Consequences names concrete follow-up (issues to open, docs to update), not just restating the decision.
docs/adl/README.md(the ADL) has a new row for this ADR, and the number matches step 1 — the reviewer checks both and will raise a finding if either is missing.
- Cross-check against existing ADRs and design docs — does this decision contradict
an existing
AcceptedADR? If so, this record supersedes it: set the new ADR's Status normally, and edit the old ADR's Status line only, toSuperseded by ADR-NNNN— never rewrite the old ADR's Context/Decision/Consequences. - Review — launch the
adr-revieweragent (fresh, separate Opus; never review inline). It checks template conformance, that every option has a genuine Pro and Con, that the Decision references those trade-offs, that Consequences actually follow, and cross-ADR consistency (including the immutability rule). Don't useanalysis-reviewer— that agent is scoped todocs/analysis/**and doesn't coverdocs/adl/**. - Address the review feedback.
- Commit and push (
docs: add ADR-NNNN <slug>, ordocs: supersede ADR-000X with ADR-NNNN), referencing the issue from step 0 — commit and push freely; there is no pre-commit approval gate. - Manual approval gates the merge — the human partner's explicit approval is required
before the PR is merged (enforced by
CODEOWNERS+ branch protection), not before each commit. - Stop and report status before starting the next document.
Rules
- One decision per ADR. If a design doc bundles several architectural choices, split them into separate ADRs rather than one ADR with multiple unrelated decisions.
- Immutable once Accepted. Never edit an Accepted ADR's Context/Decision/Consequences to reflect a change of mind — write a new ADR that supersedes it.
- List the rejected options for real. An ADR whose only "considered option" is the one that was chosen isn't using the template — go back and name what else was on the table, even if it's just "do nothing" / "keep the status quo".
- Reference, don't restate. If a decision depends on a requirement or use-case,
cite it (
R7,UC03) rather than re-deriving it.
Common mistakes
- Skipping the issue-first step for a decision nobody has discussed yet.
- An option with no genuine Con (usually means the alternative wasn't actually explored).
- Editing an old ADR's Decision text instead of writing a new ADR that supersedes it.
- Bundling two independent structural choices into one ADR.
When not to use it
- →For decisions about variable names, log messages, or implementation details without lasting structural consequence
- →When the user wants to edit an Accepted ADR's Context/Decision/Consequences
Limitations
- →Requires adherence to a specific ADR template
- →Does not allow editing of Accepted ADRs' core content
- →Requires a GitHub issue to be opened or linked before drafting
How it compares
This skill enforces a structured and immutable process for documenting architectural decisions, ensuring consistency and traceability, which is more rigorous than informal decision-making or ad-hoc documentation.
Compared to similar skills
write-adr side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| write-adr (this skill) | 0 | 1mo | No flags | Intermediate |
| architecture-decision-records | 54 | 5mo | Review | Beginner |
| wiki-architect | 11 | 4mo | No flags | Advanced |
| smart-docs | 4 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
architecture-decision-records
wshobson
Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.
wiki-architect
microsoft
Analyzes code repositories and generates hierarchical documentation structures with onboarding guides. Use when the user wants to create a wiki, generate documentation, map a codebase structure, or understand a project's architecture at a high level.
smart-docs
sopaco
AI-powered comprehensive codebase documentation generator. Analyzes project structure, identifies architecture patterns, creates C4 model diagrams, and generates professional technical documentation. Use when users need to document codebases, understand software architecture, create technical specs, or generate developer guides. Supports all programming languages. Alternative to Litho/deepwiki-rs that uses Claude Code subscription without external API costs.
codebase-documenter
mhattingpete
Generates comprehensive documentation explaining how a codebase works, including architecture, key components, data flow, and development guidelines. Use when user wants to understand unfamiliar code, create onboarding docs, document architecture, or explain how the system works.
c4-architecture-c4-architecture
sickn33
Generate comprehensive C4 architecture documentation for an existing repository/codebase using a bottom-up analysis approach.
dagger-design-proposals
dagger
Write design proposals for Dagger features. Use when asked to draft, review, or iterate on Dagger design documents, RFCs, or proposals.