documentation-and-adrs
Writes architecture decision records (ADRs) and keeps the rest of a project's documentation true after a change: README, reference comments on public…
от TerminalSkills★ 221 звезда на GitHub
Установить documentation-and-adrs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Documentation and ADRs
Overview
An architecture decision record is a short, numbered file in the repository that captures one decision: the situation that forced it, the options that were on the table, what was chosen, and what the team now has to live with. Records are appended, never rewritten, so the log reads as the history of the design.
This skill writes those records in the two formats the field has settled on (Michael Nygard's 2011 layout and MADR 4.0), handles reversals, and brings the README, reference comments and changelog into line with the same change. It ends with a check that can fail, so the log stays trustworthy.
Instructions
1. Read the repository before writing
Look for what already exists and follow it; a log with two formats is worse than either one.
- Decision log:
docs/decisions/,docs/adr/,doc/adr/,doc/architecture/decisions/, or the directory named in a.adr-dirfile. Note the format, the number width and the highest number in use. CHANGELOG.mdand its heading style, the README's sections, the comment convention in code (TSDoc, JSDoc, docstrings), an OpenAPI file.
Then ask the user only for what the code cannot show: who took the decision and when, which alternatives were seriously considered and what ruled each one out, what downside was knowingly accepted, and whether the decision is still open (proposed) or settled (accepted). Never invent a rejected option or a reason. If the answer is unknown, write "not recorded" in that place.
2. Decide whether it deserves a record
| Write a record | Leave it to a commit message or code comment |
|---|---|
| Changes structure, a dependency, an interface, a data model or a quality attribute (speed, cost, security, availability) | Can be undone in one small commit |
| Undoing it later would take more than a day of work or a data migration | Is a formatting or naming rule a linter already enforces |
| It was argued over, or someone will ask "why is it like this?" in a year | Is a bug fix with one sensible solution |
| It binds another team or an external consumer | Is a spike that will be thrown away |
One decision per record. "Use PostgreSQL" and "host it on a managed service" are two records when they could have gone different ways.
3. Pick the format
| Format | Parts | Choose it when |
|---|---|---|
| Nygard | Title, Status, Context, Decision, Consequences | Small team, one clear choice; it is what adr-tools generates |
| MADR 4.0 | Front matter (status, date, decision-makers, consulted, informed), Context and Problem Statement, Considered Options, Decision Outcome with Consequences; optional: Decision Drivers, Confirmation, Pros and Cons of the Options, More Information |
The comparison of options is the valuable part, or several people signed off |
| Y-statement | One sentence: "In the context of …, facing …, we decided for … and neglected …, to achieve …, accepting …, because …" | A small decision, a pull request description, or the opening line of a longer record |
4. Write it
- File:
NNNN-decision-in-kebab-case.mdwith the next free four-digit number. Numbers are never reused. Default directory:docs/decisions/. - Title: a noun phrase that names the choice, not the problem: "Tenant isolation with PostgreSQL row-level security", not "Multi-tenancy".
- Context: facts in neutral language, with numbers (traffic, team size, deadline, budget) and the date they were true. Name the forces that pull in different directions.
- Options: at least two real ones; "keep what we have" usually counts.
- Decision: active voice and full sentences, starting "We will …".
- Consequences: what gets easier, what gets harder, what work it creates. A record listing only benefits is not finished.
- Confirmation (MADR): the test, lint rule or review step that will show the decision is being followed.
- Revisit when: a measurable trigger, for example "more than 50 jobs per second sustained", so the next reader knows when the reasoning expires.
- Length: one to two pages. Link to a design document instead of pasting it.
With adr-tools installed (for example brew install adr-tools), the Nygard skeleton and the links are generated:
adr init docs/decisions # writes 0001-record-architecture-decisions.md and .adr-dir
adr new Store money as integer cents
adr new -s 2 Store money as numeric with a currency code # 0002 becomes "Superceded by" 0003
adr generate toc > docs/decisions/README.md
adr new opens the file in $VISUAL, or in $EDITOR when VISUAL is not set; run it with VISUAL=true when unattended, then fill the sections in. The tool spells the status "Superceded"; leave its spelling alone so its own links keep working.
5. Reverse a decision by adding, not editing
Statuses move in one direction: proposed → accepted or rejected; later accepted → deprecated (no longer applies, nothing replaces it) or `superseded
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- _scores.json
FAQ
Что делает скилл documentation-and-adrs?
Writes architecture decision records (ADRs) and keeps the rest of a project's documentation true after a change: README, reference comments on public interfaces and the changelog. Use when a user says "write an ADR", "record this decision", "document why we chose X", "set up a decision log", "supersede the old decision", "update the README", "add a changelog entry" or "document this API". Produces records in the Nygard or MADR format, a Keep a Changelog entry, and a script that checks the log for gaps and broken supersession links.
Как установить скилл documentation-and-adrs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл documentation-and-adrs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…