К основному содержанию
скилл CX Codex

adr-drafting — скилл для Claude Code: что делает и как установить

Скилл опрашивает разработчика об архитектурном решении, находит соглашения в репозитории и создаёт новый markdown-документ формата ADR. Пригодится при смене стека или разделении сервисов.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add giuseppe-trisciuoglio/developer-kit --skill adr-drafting -a claude-code
Открыть на GitHub

Что делает adr-drafting

Скилл помогает зафиксировать архитектурный выбор в проекте. Агент сначала запрашивает контекст проблемы, выбранный подход и последствия решения. По умолчанию статус черновика устанавливается как Proposed. После этого инструмент сканирует репозиторий через Glob и Read: ищет каталоги вроде docs/architecture/adr или docs/adr, чтобы перенять существующую нумерацию и стиль заголовков. Если записей ещё не было, он предложит каталог docs/architecture/adr и начнёт отсчёт с файла 0001.

Скилл рассчитан строго на оформление новых записей: обновлять старые документы или связывать цепочки замены устаревших решений он откажется. Перед сохранением файла агент обязательно показывает черновик на утверждение. Только получив подтверждение, он создаёт структуру папок и записывает markdown-файл со стандартными разделами Context, Decision и Consequences.

Какие задачи решает

  • зафиксировать переход на новую базу данных или стек технологий
  • оформить архитектурное решение по разделению монолита на сервисы
  • найти существующий формат ADR в репозитории и продолжить его нумерацию
  • согласовать последствия и риски технического выбора перед записью файла

Примеры запросов агенту

  • Создай ADR для перехода с SQLite на PostgreSQL
  • Задокументируй решение выделить биллинг в отдельный сервис
  • Подготовь черновик ADR для смены формата сериализации API

Как установить adr-drafting

1Через Skills CLI (Vercel)

npx skills add giuseppe-trisciuoglio/developer-kit --skill adr-drafting -a claude-code

2Вручную: положить файлы

~/.claude/skills/adr-drafting/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/adr-drafting/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о adr-drafting

Как установить adr-drafting в Claude Code?

Выполните команду npx skills add giuseppe-trisciuoglio/developer-kit --skill adr-drafting -a claude-code.

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

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

Можно ли обновить существующий ADR через adr-drafting?

Нет, скилл предназначен только для создания новых документов. Он не меняет статусы старых записей и не правит историю замен.

Исходный текст

SKILL.md · MIT
---
name: adr-drafting
description: Creates new Architecture Decision Record (ADR) documents for significant architectural changes using a consistent template and repository-aware naming and storage guidance. Use when a user or agent decides on an architectural change, needs to document technical rationale, or wants to add a new ADR to the project history.
allowed-tools: Read, Write, Edit, Glob, AskUserQuestion
---

# ADR Drafting

Creates new Architecture Decision Record (ADR) documents for major architectural choices so teams can keep a clear history of why important technical decisions were made.

## Overview

This skill helps create a new ADR from discovery to final markdown file. It confirms the decision details, inspects the repository for any existing ADR conventions, and drafts a new ADR with the standard sections `Title`, `Status`, `Context`, `Decision`, and `Consequences`.

When the repository does not already have an ADR convention, default to storing ADRs in `docs/architecture/adr` and use a zero-padded filename such as `0001-use-postgresql-for-primary-database.md`.

See `references/template.md` for the default ADR template and `references/examples.md` for example ADRs and naming patterns.

## When to Use

Use this skill when a user or agent has decided on a meaningful architectural change and needs to document the rationale, chosen direction, and trade-offs in a new Architecture Decision Record. It fits requests such as creating an ADR, documenting an architecture decision, writing a decision record, or preserving the project history behind an important technical choice.

## Instructions

### Phase 1: Confirm the ADR inputs

Ask the user for the minimum information needed to draft a new ADR:

1. Decision title
2. Decision status (`Proposed` by default if not yet finalized)
3. Context: the problem, constraints, or forces driving the decision
4. Decision: the chosen approach
5. Consequences: what becomes easier, harder, riskier, or more expensive
6. Confirm that this request is for a **new ADR**, not for editing an existing ADR
7. Confirm the desired repository language if documentation language is unclear
8. Confirm whether any existing ADR naming convention must be preserved

If the user actually wants to update an existing ADR, change statuses in older ADRs, or manage supersession links, explain that this skill only drafts **new ADR documents** and ask whether they want to proceed with a new record instead.

### Phase 2: Discover ADR conventions in the repository

Inspect the repository before drafting:

1. Search for likely ADR locations such as:
   - `docs/architecture/adr`
   - `docs/adr`
   - `adr`
   - `architecture/adr`
2. If ADR files already exist, read one to three examples to infer:
   - numbering format
   - filename pattern
   - title format
   - language and tone
3. If no ADR directory exists, recommend `docs/architecture/adr`
4. Determine the next ADR number from existing files when possible
5. If no prior ADR exists, start with `0001`

Preferred default naming when no convention exists:

- Directory: `docs/architecture/adr`
- Filename: `NNNN-short-kebab-title.md`
- Title: `# ADR-NNNN: <Decision Title>`

### Phase 3: Draft the ADR

Create a draft using the standard structure:

```markdown
# ADR-NNNN: Decision Title

## Status
Proposed

## Context
What problem, constraints, or trade-offs led to this decision?

## Decision
What architectural choice was made?

## Consequences
What becomes easier, harder, riskier, or more expensive because of this decision?
```

Drafting rules:

- Keep the title specific and decision-oriented
- Capture enough context to explain *why* the decision was needed
- Record the chosen direction clearly and directly
- Include both positive and negative consequences when known
- Do not invent rationale, constraints, or outcomes that the user did not provide
- If critical information is missing, insert concise placeholders or ask follow-up questions before finalizing

### Phase 4: Review the draft with the user

Before writing files, present:

- proposed file path
- proposed title
- ADR status
- a concise preview of the drafted sections

Ask for approval before creating the file. If the user wants adjustments, revise the draft first.

### Phase 5: Create the ADR file

After approval:

1. Create the ADR directory if it does not exist
2. Write the ADR markdown file using the repository's established pattern when available
3. Preserve the user's wording for decision rationale as much as possible while keeping the document concise
4. Report the final file path and summarize what was created
5. Stop after creating the new ADR file so the skill remains focused on a single new decision record

## Examples

### Example 1: New database decision

**User request:** "Create an ADR for moving from SQLite to PostgreSQL"

**Expected flow:**

1. Confirm the title, status, reasons for the change, and expected consequences
2. Check whether the repository already has ADR files
3. Draft a new ADR in the existing convention or default to `docs/architecture/adr/0001-move-to-postgresql.md`
4. Ask for approval before writing the file

### Example 2: New service boundary

**User request:** "Document the decision to split billing into a dedicated service"

**Expected flow:**

1. Ask for the architectural context and why the current design is insufficient
2. Confirm the chosen boundary and the operational consequences
3. Draft a new ADR with the standard sections
4. Create the file only after user approval

See `references/examples.md` for longer ADR examples.

## Best Practices

- Keep each ADR focused on one architectural decision
- Match existing repository naming, numbering, and writing style when ADRs already exist
- Prefer concise explanations over long narratives
- Capture trade-offs honestly, including downsides and new risks
- Default the status to `Proposed` unless the user confirms another state
- Use the repository's preferred documentation language when it is clear

## Constraints and Warnings

- This skill is for **new ADR creation only**
- Do not update existing ADR files, status histories, or supersession chains
- Do not fabricate missing rationale or consequences
- Do not force `docs/architecture/adr` if the repository already uses another ADR location
- Ask clarifying questions whenever the decision, context, or consequences are too vague to document responsibly

© giuseppe-trisciuoglio · MIT · giuseppe-trisciuoglio/developer-kit

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

Всё по теме «Тексты и документация» →
develop-adr product-on-purpose Скилл пишет Architecture Decision Record: контекст решения, сам выбор и его последствия. Пригодится, когда команда выбирает базу, фреймворк или паттерн. CX Codex +1 792установок adr-create ruvnet Пишет Architecture Decision Record в docs/adr/ со следующим номером, кладёт его в память AgentDB и связывает с прежними решениями. Пригодится, когда решение надо записать и не потерять. CX Codex +1 741установок architecture-decision-records affaan-m Скилл записывает архитектурные решения в нумерованные ADR-файлы в docs/adr/ с контекстом, альтернативами и последствиями. Пригодится, когда выбираете фреймворк или базу и не хотите терять причину выбора. CX Codex +1 4 900установок documentation-and-adrs addyosmani Скилл помогает фиксировать архитектурные решения (ADR), причины выбора технологий и контекст для будущих разработчиков или агентов в репозитории. CX Codex +1 63 800установок adr-review ruvnet Сверяет git-дифф с принятыми записями архитектурных решений (ADR). Помогает выявить нарушения архитектуры и устаревшие паттерны перед слиянием ветки. CX Codex +1 745установок writing-adrs pandoscope Скилл задаёт формат, нумерацию и критерии, когда вообще стоит писать Architecture Decision Record. Пригодится, если решения по архитектуре теряются в переписке. CX Codex +1 1 700установок

Из того же набора93

aws-lambda-java-integration Скилл с готовыми шаблонами Java-функций для AWS Lambda: два подхода, холодный старт и деплой через Serverless или SAM. CX Codex +1 3 500установок codex Делегирует сложные задачи генерации кода, рефакторинга и ревью в утилиту Codex CLI с моделями GPT-5.3-codex, o3 или o4-mini. CX Codex +1 3 400установок copilot-cli Передаёт задачи из Claude в GitHub Copilot CLI в неинтерактивном режиме: выбор модели, флаги прав, экспорт сессии в markdown. CX Codex +1 3 400установок gemini Передаёт разбор большого кода и сложные рассуждения в Gemini CLI, а результат возвращает вам на подтверждение. CX Codex +1 3 400установок qwen-coder Передаёт задачи из Claude в Qwen Coder CLI: генерация кода, рефакторинг, отладка, разбор архитектуры. Пригодится, когда нужен второй взгляд от другой модели. CX Codex +1 3 300установок learn Анализирует кодовую базу, находит правила разработки и создаёт готовые инструкции в .claude/rules/. Пригодится при входе в незнакомый репозиторий. CX Codex +1 3 300установок aws-cdk Скилл подсказывает агенту паттерны AWS CDK на TypeScript: стеки, конструкции, IAM и проверку изменений через cdk synth и cdk diff. CX Codex +1 3 300установок bug-fix-brief Скилл собирает структурированный Bug Fix Brief: причина, шаги воспроизведения, варианты правки и чек-лист. Пригодится, когда баг уже разобран, а фикс ещё не написан. CX Codex +1 3 000установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой