Command Palette

Search for a command to run...

Назад к скиллам
скилл № 26410

adr-setup

Set up Architecture Decision Records (ADRs) in a repository. Creates the ADR folder, the template, two indexes (a README listing every record, and an INDEX.md…

БесплатноЗапускает вложенные скрипты
Codeminer42от Codeminer42★ 32 звезды на GitHub

Установить adr-setup в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

ADR setup

Bootstraps a decision log in the current repository. This skill sets the structure up once. After that, two things keep ADRs written and true:

  • the agent-instructions section it installs;
  • the check it offers to add to CI.

An agent starts every session without memory of past discussions. If a decision isn't written down, the agent doesn't know it exists and may "improve" the code by undoing it. The setup below makes accepted decisions part of the context every session reads.

A log that drifts is worse than none. A stale record, or a code comment citing a replaced one, reads to an agent as current truth. That's why the CI check matters.

Conventions this setup installs

  • One decision per file in a dedicated folder (default docs/adr/).

  • File name: YYYYMMDDHHMM-<decision-slug>.md, like a migration. The slug names the decision, not the topic: use-postgresql-as-primary-database, not database.

  • Timestamps, not sequence numbers. 0001-, 0002- collide when two branches add an ADR at the same time. Timestamps don't, and they keep the folder sorted.

  • Statuses: Proposed, Accepted, Rejected, Deprecated, Superseded (always with a link to the replacing ADR).

  • Immutable. Once written, only the status changes. A changed decision gets a new ADR that supersedes the old one.

  • Two indexes, both tables of date, linked decision and status, regenerated from the files:

    • INDEX.md lists only the records that still stand: Accepted, Proposed and Rejected. A row also names the records it superseded. This is the file agents read.
    • README.md is the full log, every record including deprecated and superseded ones.

    An agent that reads the full log spends context on decisions that no longer hold, and may take a superseded one as current. Each supersession shrinks INDEX.md instead of growing it. Rejected records stay in it so an agent doesn't propose the same thing again.

  • Citations in code and docs name a record by its file name without .md, never by a number.

Flow

Track progress with these steps, in order.

1. Detect an existing setup

Look for any form of ADRs before creating anything (skip node_modules, vendor and other dependency folders):

  • folders: docs/adr, doc/adr, docs/adrs, adr, adrs, docs/decisions, doc/decisions, docs/architecture/decisions, architecture/decisions
  • tool config: .adr-dir (adr-tools), .log4brains.yml (log4brains)
  • files named like *-record-architecture-decisions.md, adr-*.md or *-adr.md (case-insensitive)
  • markdown files that have both a Status and a Decision heading (Nygard, MADR and similar templates)

If anything turns up, stop here. This skill is a no-op on such a repo. Tell the user the project already uses ADRs, and say where (folder, tool, naming scheme), then finish without creating or changing any file. Don't recommend migrating, renaming, adopting this skill's conventions, or dropping their tooling: the team's existing practice wins.

Two exceptions, both this skill's own layout. The folder holds a template.md, a README.md with an ## Index table, and records named YYYYMMDDHHMM-<slug>.md. An earlier version of this skill set the repo up. Don't redo the setup, and take that folder as <adr-dir>. Its records are already immutable, so leave the first ADR as it is: the bullets steps 5 and 6 describe are for a fresh setup only.

  • No INDEX.md in the folder. The earlier version had only the full-log index. Ask whether to add the index of decisions in effect. On a yes:
    • copy assets/INDEX.md to <adr-dir>/INDEX.md, and fill its table by hand as step 6 describes, unless the check will regenerate it;
    • replace the section from step 7 in the agent instructions with the current one, so agents read INDEX.md;
    • if the repo has an adr.sh, replace it with the current assets/adr.sh, keeping its ADR_DIRS line, then run steps 9c and 9e.
  • No adr.sh anywhere in the repo. Run step 3, and if the user wants the check, go to step 9.

Run the check before reporting, if there is one. Records written by hand since the setup may fail it, and 9e covers what to do then.

Also grep AGENTS.md, CLAUDE.md, CONTRIBUTING.md and the docs for "ADR" or "decision record". A mention alone, with no records on disk, means the practice was intended but never set up: don't stop, continue the setup and carry what the mention says into step 2.

2. Pick the folder

If a mention found in step 1 names a folder for ADRs, use it. Otherwise default to docs/adr/. Use doc/adr/ only if the repo already has a doc/ folder and no docs/. Below, <adr-dir> means the chosen path relative to the repo root.

3. Ask whether to add the CI check

Ask with the agent's structured question tool (AskUserQuestion in Claude Code). Without one, ask in chat and wait for the answer. Don't assume a yes.

Before asking, look at the repo so the ques

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • assets/INDEX.md
  • assets/README.md
  • assets/adr.sh
  • assets/agent-instructions-check.md
  • assets/agent-instructions.md
  • assets/first-adr.md
  • assets/template.md
  • references/check.md

FAQ

Что делает скилл adr-setup?

Set up Architecture Decision Records (ADRs) in a repository. Creates the ADR folder, the template, two indexes (a README listing every record, and an INDEX.md listing only the decisions still in effect, which agents read), a first ADR recording the adoption, and adds a section to AGENTS.md or CLAUDE.md so agents check existing decisions and record new ones while they work. Offers a check (a bash script, also wired into package.json scripts in Node projects) and writes the job for the project's own CI, so CI fails on malformed records, a stale index, dead links in agent instructions, citations of records that don't exist, and edits to merged records. Does nothing if the repo already uses ADRs, except offer the check to a repo this skill set up. Use when asked to set up ADRs, start using architecture decision records, add a decision log, bootstrap docs/adr, or add an ADR check or lint to CI.

Как установить скилл adr-setup?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл adr-setup запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить adr-setup с