agentleFS
TheurgicDuke771TheurgicDuke771/DataQ/.claude/skills/adr-create/SKILL.md

adr-create

Skill0 starsChanged 6 days agoMITView on GitHub

Scaffold a new Architecture Decision Record under docs/site/adr/ with auto-numbered filename, standard frontmatter (Status / Date / Deciders / optional Consulted / Supersedes / Superseded by), and the canonical sections (Context, Decision, Consequences, Alternatives considered, Related). Use when the user wants to capture a significant architectural decision, or asks "let's ADR that.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. faparicior/sdlc-skills★ 2same name
    2. maurigre/mgr-method★ 2same name
    3. jpoindexter/theft-kit★ 1same name
    4. Svampen/claude-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create a new ADR in docs/site/adr/ that follows the conventions documented in docs/site/adr/README.md and is consistent with the ADRs …

    line 11
  2. Very specific:

    Determine the next ADR number: Run the bundled helper — .claude/skills/adr-create/next-number.sh — which reads docs/site/adr/NNNN-*.md, …

    line 22
  3. Very specific:

    Add a row to the "Index" table at the end — three columns: | NNNN | Title | Status |.

    line 31
  4. Very specific:

    If the new ADR amends an earlier one, also append (amended by NNNN — <one-line scope>) to the amended ADR's Status cell, and add an inline …

    line 32
  5. Very specific:

    Status field is required: Default to Accepted unless --status says otherwise.

    line 86
  6. Very specific:

    Don't reuse a number. If docs/site/adr/0005-*.md exists, the next one is 0006, never 0005a or 0005-v2.

    line 98
  7. Distinctive:

    Don't auto-fill Decision/Context with boilerplate.

    line 99
  8. Distinctive:

    Don't invent a "Pending"/reservation section in the README — the index lists written ADRs only.

    line 100

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

adr-create

Purpose

Create a new ADR in docs/site/adr/ that follows the conventions documented in docs/site/adr/README.md and is consistent with the ADRs already in the repo.

Usage

User invokes this skill with a short topic for the ADR. Optional args:

  • --status accepted|proposed|superseded|deprecated (default: Accepted)
  • --consulted "@user1, @user2" (omit if engineering-only decision)
  • --supersedes 0007 (omit if not superseding)

Steps

  1. Determine the next ADR number. Run the bundled helper — .claude/skills/adr-create/next-number.sh — which reads docs/site/adr/NNNN-*.md, finds the highest number, increments by 1, and zero-pads to 4 digits (prints 0001 when the dir is empty/missing). Use its output verbatim instead of re-inferring the number by hand.
  2. Derive a kebab-case slug from the user's topic. Drop articles. Examples:
    • "Severity tier weights" → severity-tier-weights
    • "Use Pydantic Settings for config" → use-pydantic-settings-for-config
  3. Create the file at docs/site/adr/NNNN-<slug>.md using the template below. Today's date in ISO format (YYYY-MM-DD). Deciders defaults to the current GitHub handle, resolved via gh api /user --jq .login (prepend @). Do NOT use git config user.name — that returns a display name (e.g. "Ada Lovelace") which produces an invalid @mention. If gh api fails (no auth, offline), fall back to asking the user for their GitHub handle.
  4. Update the index at docs/site/adr/README.md:
    • Add a row to the "Index" table at the end — three columns: | [NNNN](NNNN-slug.md) | Title | Status |.
    • If the new ADR amends an earlier one, also append (amended by NNNN — <one-line scope>) to the amended ADR's Status cell, and add an inline > **Amendment (YYYY-MM-DD, ADR-NNNN):** blockquote at the amended section of the older ADR (the documented convention — see 0028→0024, 0031→0013, 0033→0027).
  5. Stage but do not commit. The user runs git add + the commit themselves per working-agreement #1 (one functionality per commit, manual commit step).
  6. Print next steps:
    • "Open docs/site/adr/NNNN-<slug>.md and fill in Context / Decision / Consequences / Alternatives."
    • "Branch suggestion: docs/adr-NNNN-<slug>" (branch names follow CONTRIBUTING's docs/<desc> prefix — the docs/site/ move changed file paths, not branch naming)
    • "PR title suggestion: docs: add ADR NNNN — <human title>"

Template

# ADR NNNN — <Human-readable title>

- **Status:** Proposed
- **Date:** YYYY-MM-DD
- **Deciders:** @<github-handle>
- **Consulted:** <optional, e.g. @product-owner, @security-team>
- **Amends:** <optional, e.g. ADR-0024 — partial override; pair with an inline amendment blockquote there>
- **Supersedes:** <optional, e.g. ADR-0007>
- **Superseded by:** <optional, e.g. ADR-0042>

## Context

<What problem are we deciding about? What forces are at play (constraints, requirements, prior decisions)? Keep to 1–3 paragraphs.>

## Decision

**<One-sentence statement of the decision, in bold.>**

<Then the details: how it works, what's in scope, what's out of scope.>

## Consequences

**Positive**
- <bullet>
- <bullet>

**Negative**
- <bullet>
- <bullet>

## Alternatives considered

- **<Alternative 1>** — rejected. <Why.>
- **<Alternative 2>** — rejected. <Why.>

## Related

- <Link to related ADRs, issues, PRs, or code paths.>

Rules

  • Status field is required. Default to Accepted unless --status says otherwise. Valid values: Proposed, Accepted, Deprecated, Superseded by ADR-NNNN.
  • Always render Status in title-case in the file, regardless of the CLI arg casing. The --status arg is lowercase (accepted/proposed/superseded/deprecated); map it to the title-case form before writing (accepted → Accepted, superseded → Superseded by ADR-NNNN). Deprecated needs no superseding ADR — use it when a decision is withdrawn without a replacement.
  • Date is today's date in ISO format.
  • Consulted, Supersedes, Superseded by are optional — include the label even if empty so future editors see the slot.
  • Body sections in this exact order: Context → Decision → Consequences (with Positive/Negative subheadings) → Alternatives considered → Related.
  • Slug must match the convention in docs/site/adr/README.md: lowercase, kebab-case, no leading article.
  • Filename matches title: NNNN-<slug>.md where the slug is also derivable from the H1 title.
  • README index is the source of truth for which ADRs exist. Always update it.
  • Do not commit. Stage only. The user commits manually so they can review the diff.

Anti-patterns to avoid

  • Don't reuse a number. If docs/site/adr/0005-*.md exists, the next one is 0006, never 0005a or 0005-v2.
  • Don't auto-fill Decision/Context with boilerplate. Leave them as the template placeholders so the user must write the actual content.
  • Don't invent a "Pending"/reservation section in the README — the index lists written ADRs only; a planned-but-unwritten decision lives as an issue, not an index row.

Test scenarios

Worked examples so the skill behaves consistently:

  1. Plain decision. adr-create "use Pydantic Settings for config" with 0022 as the latest (a worked example — the real head is far past that) → helper prints 0023; create docs/site/adr/0023-use-pydantic-settings-for-config.md with the template's Status: Proposed (pass --status accepted for a decided one), today's date, Deciders resolved from gh api /user; add the index row; stage only.
  2. Proposed status + consulted. adr-create "adopt OpenTelemetry" --status proposed --consulted "@product-owner" → Status: Proposed (title-cased from the lowercase arg), Consulted: @product-owner; Supersedes/Superseded-by labels left as empty placeholders.
  3. Superseding an old ADR. adr-create "revised severity weights" --status accepted --supersedes 0005 → new ADR gets Supersedes: ADR-0005; remind the user (in next-steps output) to flip ADR-0005's status to Superseded by ADR-NNNN in a follow-up edit.
  4. Deprecation without replacement. adr-create "retire the X seam" --status deprecated → Status: Deprecated, no Superseded-by needed.
  5. Empty repo / first ADR. docs/site/adr/ missing → helper prints 0001; create 0001-<slug>.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.