Draft an architecture decision record (ADR) from this conversation and, once the user approves it, write it as proposed with cogit. Use when the user says "record this as a decision", "write an ADR", "let's keep this decision", or asks to turn a choice made here into a lasting rule for the project. Writes only the ADR file; no code, no commit.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Adr?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/erensrtky-adr)
---
name: adr
description: Draft an architecture decision record (ADR) from this conversation and, once the user approves it, write it as proposed with cogit. Use when the user says "record this as a decision", "write an ADR", "let's keep this decision", or asks to turn a choice made here into a lasting rule for the project. Writes only the ADR file; no code, no commit.
allowed-tools: Bash(node "${CLAUDE_PLUGIN_ROOT}/dist/cli.js" *)
---
# Write an ADR
An ADR is a lasting decision of the project: later work should keep to it. cogit shows the
ADRs whose scope covers a line in `why` and in pull request descriptions. The format belongs to
cogit; read it here, never make up your own:
!`node "${CLAUDE_PLUGIN_ROOT}/dist/cli.js" adr format`
## 1. Read what is there
`node "${CLAUDE_PLUGIN_ROOT}/dist/cli.js" adr --json -C "${CLAUDE_PROJECT_DIR}"` lists the
project's ADRs (id, title, status, scope). If it says cogit is not set up, go on: writing an ADR
does not need it.
## 2. Pick the decisions
From the conversation (or what the user points at), keep only decisions that are:
- **lasting**: still true after this piece of work; later work must follow it;
- **wide**: they touch more than one task (a layer, a dependency, a data format, a boundary);
- **costly to undo**: a schema, a public interface, a library, a security model.
A one-off implementation detail, a bug's fix, a routine step or a matter of taste is not an
ADR. If nothing qualifies, say so in one sentence and stop; ending without an ADR is a right
answer too. If a decision contradicts or replaces an existing ADR, say which one.
## 3. Draft and ask
One ADR per decision, written by the rules above:
- Status is always `proposed`. Only the user moves an ADR to `accepted`; never you, never cogit.
- Scope: the files the decision binds, as globs; check the real paths in the code.
- Check: only when the decision can really be tested mechanically; otherwise leave it out.
Show each draft in the chat (title, scope, sections) and ask: "Shall I write these ADRs?"
Write nothing without a clear yes.
## 4. Write
For each approved ADR, pipe its sections into `adr new`; it picks the number, the directory and
the repository's own format, and prints the file it wrote:
```sh
node "${CLAUDE_PLUGIN_ROOT}/dist/cli.js" adr new "<title>" --scope "<glob>,<glob>" -C "${CLAUDE_PROJECT_DIR}" <<'ADR'
## Context
...
## Decision
...
## Consequences
...
ADR
```
Add `--supersedes <number>` when it replaces an ADR; changing the old ADR's status is the
user's call. Then check the file:
`node "${CLAUDE_PLUGIN_ROOT}/dist/cli.js" adr lint <file> -C "${CLAUDE_PROJECT_DIR}"`
Fix every `✗` line by editing the file and lint again. A `⚠` line about scope is not an error;
tell the user.
Do not commit or push: the files stay in the working tree.
## 5. Report
One line per file: `✓ docs/adr/0003-short-name.md (proposed)`, then: "Move Status to accepted
when you agree; the commit is yours."