write-adr

A workflow for creating Architecture Decision Records, or ADRs: short documents that explain important technical choices and why they were made. It finds decisions in the current session, asks which to record, writes the records, and checks them.

In plain words
What is it for?
Use it after a design discussion or implementation session to identify decisions, create ADR files, and validate the resulting documentation.
Why use it?
It prevents important design choices from being lost in chat or memory. The review steps help ensure each record contains enough information to be useful later.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/existential-birds/beagle/write-adr
Any agent
npx skills add existential-birds/beagle --skill write-adr
Clone the repo
git clone --depth 1 https://github.com/existential-birds/beagle

Made for: Claude Code, Codex.

Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,233 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00098 $0.02233
Opus 5 $0.00049 $0.01117
Sonnet 5 $0.00020 $0.00447
Haiku 4.5 $0.00010 $0.00223

Measured 3d ago against content hash e55e34622938, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

write-adr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/beagle-analysis/skills/write-adr/SKILL.md · 268 lines

How it starts

The opening of the file, as written. The whole thing — 268 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Write ADR

Generate Architecture Decision Records (ADRs) from decisions made during the current session.

Workflow Overview

  1. Context - Gather repository context and existing ADRs
  2. Extract - Analyze conversation for decisions using a subagent
  3. Confirm - Present decisions to user for selection
  4. Write - Generate ADRs in parallel using subagents
  5. Report - Summarize created files and status
  6. Verify - Validate generated ADRs against Definition of Done

Gates (objective pass conditions)

Advance only when the pass condition holds. These are checkable without “I verified internally.”

After Pass condition
Step 2 (extract) The subagent response is valid JSON with a top-level decisions array (empty is OK). Each non-empty item has id, title, and at least one of context, decision, alternatives, or rationale present as a non-empty string or non-empty array. If parsing fails or the shape is wrong, re-run extraction or fix the payload before Step 3.
Step 4 (pre-allocate) From repo root, python plugins/beagle-analysis/skills/adr-writing/scripts/next_adr_number.py --count N prints exactly N lines (one number per line). You have a written mapping (in the reply draft or notes) from each selected decision to one of those lines before launching any ADR writer unit.
Step 5 (report) Every file path in the summary table is copied from a subagent completion output (not invented). Optionally spot-check: test -f <path> for each path before marking success.
Step 6 (verify) For each ADR path, opening the file shows line 1 is ---, frontmatter parses as YAML, status and date are present, and the body meets the Step 6 bullets below (alternatives count, Good/Bad consequences).

Step 1: Gather Context

# Get current branch and recent commits
git branch --show-current
git log --oneline -5

# Check for existing ADRs
ls docs/adrs/ 2>/dev/null || echo "No ADR directory found"

# Count existing ADRs for numbering
find docs/adrs -name "*.md" 2>/dev/null | wc -l

Read the full file on GitHub · 268 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 268 lines · 98 tokens per session scan A e55e34622938

Subscribe to this mod's changes

write-adr is a skill published in the GitHub repository existential-birds/beagle (79 stars, last pushed 23d ago), licensed Apache-2.0. It adds 98 tokens to every session and 2,233 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens