Agent skill

Diff Driven Docs

by romiluz13 in romiluz13/cc10x

A skill your agent uses when a BUILD phase completes, a commit is staged, or a PR is about to be created, and the diff has not yet been reflected in documentation.

MITAuto-check: notes

Install Diff Driven Docs

skills CLI
$ npx skills add romiluz13/cc10x --skill diff-driven-docs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install romiluz13/cc10x diff-driven-docs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/romiluz13/cc10x.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/cc10x/skills/diff-driven-docs .claude/skills/diff-driven-docs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
diff-driven-docs
GitHub stars
164
Token cost
~2.7k tokens
SKILL.md length
1,337 words
Files
5 (incl. references)
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when a BUILD phase completes, a commit is staged, or a PR is about to be created, and the diff has not yet been reflected in documentation.

  • Works in 3 steps: Read the entire target file first — an… → Apply minimal, targeted edits using Edit… → Read the file again after writing to…
  • A BUILD phase completes
  • SKILL.md covers Overview, Impact Classifier, The Four Layers and Audit Doc Guidance, plus 3 more sections
  • Calls git

What it does

Diff Driven Docs is an agent skill from romiluz13/cc10x. Use when a BUILD phase completes, a commit is staged, or a PR is about to be created, and the diff has not yet been reflected in documentation. Also use when the user says "update docs", "sync docs", "document this", or asks whether documentation is up to date.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `evals/README.md`, `evals/eval-01-small-diff-skip-temptation.md` and `evals/eval-02-new-exported-function.md`).

The repository describes itself as: The Loop Engine for Claude Code — engineer the loop, not the prompt. 1 router · 9 agents · 16 skills · 4 workflows. Fail-closed gates, test honesty, anti-anchored review. The licence is MIT.

When your agent uses it

  • A BUILD phase completes
  • A commit is staged
  • A PR is about to be created
  • The diff has not yet been reflected in documentation

Example prompts

  • “update docs”
  • “sync docs”
  • “document this”
  • “/diff-driven-docs”

Requirements

  • Pre-approved tools (allowed-tools): Read, Edit, Write, Bash, Grep, Glob

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Read the entire target file first — an unread edit duplicates sections and contradicts neighbors; the read is what makes the edit minimal
  2. Apply minimal, targeted edits using Edit — do not rewrite sections that are not affected by the diff
  3. Read the file again after writing to verify the edit landed correctly

What it can do on your machine

Read from SKILL.md and the folder at commit 891acf0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Edit
    • Write
    • Bash
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Diff Driven Docs loads about 2.7k tokens when it runs, and up to ~3.5k if it reads all its reference files. Until then it costs about 70 tokens; SKILL.md has 1,337 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Edit, Write, Bash, Grep, Glob

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from romiluz13/cc10x at commit 891acf0, republished under its MIT licence (© romiluz13). 1,337 words, ~2,698 tokens.

Download SKILL.mdSave it as .claude/skills/diff-driven-docs/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
diff-driven-docs
description
Use when a BUILD phase completes, a commit is staged, or a PR is about to be created, and the diff has not yet been reflected in documentation. Also use when the user says "update docs", "sync docs", "document this", or asks whether documentation is up to date.
allowed-tools
Read, Edit, Write, Bash, Grep, Glob

diff-driven-docs

Overview

Stale documentation is worse than no documentation — it actively misleads contributors, users, and future maintainers. Run the Impact Classifier on the diff across the four layers (business, technical, audit, glossary); write only what a layer's verdict requires.

Impact Classifier

Run this classifier before any doc work. Use it to determine which layers to evaluate and which to skip.

Diff CharacteristicBusiness LayerTechnical LayerAudit LayerGlossary Layer
Internal utility, helper, or type change onlySKIPCHECKSKIPSKIP
Test addition with no new patternSKIPSKIPSKIPSKIP
Style / formatting changeSKIPSKIPSKIPSKIP
Dependency version bump (no API change)SKIPSKIPSKIPSKIP
Routine bug fix (existing behavior corrected)SKIPCHECKSKIPSKIP
Simple refactor (behavior unchanged)SKIPCHECK if signatures changedSKIPSKIP
New exported function / hook / componentSKIPCHECKCHECKSKIP
New page or routeCHECKCHECKCHECKCHECK
Architectural pattern introducedSKIPCHECKCREATECHECK
Technology choice madeSKIPCHECKCREATECHECK
Breaking change to public APICHECKCHECKCREATECHECK
Permission or role changeCHECKCHECKCHECKSKIP
Security or compliance impactCHECKCHECKCREATE or UPDATESKIP
Domain term resolved or sharpened during the workflowSKIPSKIPSKIPCHECK

SKIP business docs if: no user-facing surface changed; only internal utils, types, or tests were modified.

ALWAYS check technical docs when hooks, components, migrations, schema, routes, or exported library APIs changed.

CREATE an audit doc if: an architectural decision was made, a new pattern was introduced, a non-obvious tradeoff was accepted, or a team member six months from now would ask "why did we do it this way?"

CHECK glossary docs if: a domain term was resolved, sharpened, or found to contradict the code during a BUILD/PLAN/DEBUG workflow. The glossary layer is written only by designated shaping phases (planner, exploration DESIGN mode, doc-syncer) via cc10x:domain-modeling; builders emit proposals. See the Glossary Layer section below.

If all four layers are SKIP, set IMPACT_LEVEL: none and emit a SKIPPED contract immediately without opening any doc files.

The Four Layers

Business Layer

User-facing guides, admin documentation, and feature descriptions. Business docs describe what users and administrators can do — not how the system works internally.

  • Scope: user guides, admin guides, settings references, feature descriptions, permissions documentation
  • Update trigger: new or changed user-facing behavior, new page or route, permission change, config option that affects user behavior
  • What to write: describe the feature from the user's perspective; do not expose internal implementation details
Technical Layer

Hooks reference, components catalog, schema documentation, architecture notes, and JSDoc on exported APIs. Technical docs describe how the system is built — for developers working on the codebase.

  • Scope: hooks reference, components catalog, API reference, edge function reference, database schema docs, environment variable docs, architecture notes
  • Update trigger: any exported function, hook, or component whose signature was added or changed; any migration or schema change; any new route or page
  • What to write: name, file path, description, signature, params, return value, key behaviors; for component-based frameworks, document component inputs (props, arguments, or slots)
Audit Layer

Decision records capturing what changed, why, alternatives considered, and impact. Audit docs are written for future contributors who need to understand the reasoning behind a decision.

  • Scope: docs/adr/ (canonical, NNNN-numbered; legacy docs/decisions/ date-named files migrated lazily on touch), compliance notes, migration guides for breaking changes
  • Update trigger: new architectural pattern, technology choice, non-obvious tradeoff, breaking change, security or compliance impact
  • What to write: structured record following the four-section format below (or a single-paragraph ADR for simple decisions, per cc10x:domain-modeling/ADR-FORMAT.md)
  • Dedup rule: if a decision exists in both docs/decisions/ and docs/adr/, the docs/adr/ version wins; delete the legacy duplicate — two live copies diverge, and readers can't tell which is authoritative
Glossary Layer

CONTEXT.md at the repo root — the project's domain language (terms and their meanings, no implementation details). Maintained inline by shaping phases (planner, exploration DESIGN mode, doc-syncer) via cc10x:domain-modeling.

  • Scope: CONTEXT.md (root), or per-context CONTEXT.md files if CONTEXT-MAP.md exists
  • Update trigger: a domain term is resolved, sharpened, or found to contradict the code during a BUILD/PLAN/DEBUG workflow
  • What to write: append-only glossary entries using cc10x:domain-modeling/CONTEXT-FORMAT.md (term, one-two sentence definition, _Avoid_ aliases)
  • Do NOT write implementation details, specs, or scratch notes in CONTEXT.md — it is a glossary only

Audit Doc Guidance

When to Create vs. Update

SKIP verdicts are owned by the Impact Classifier table above.

CREATE new when:

  • A pattern is introduced for the first time in this codebase
  • An architectural decision is made that future contributors will need to understand
  • A non-obvious tradeoff is accepted (performance vs. correctness, simplicity vs. extensibility)
  • A technology is chosen over alternatives

UPDATE existing when:

  • An existing decision is amended or reversed
  • A previous tradeoff is resolved differently in a new context
  • Additional impact or context is discovered for a prior decision
Show full SKILL.md (547 more words)Show less
Filename Pattern

docs/adr/NNNN-{topic}.md (canonical) — scan docs/adr/ for the highest existing number and increment. Legacy docs/YYYY-MM-DD-{topic}-decision.md files in docs/decisions/ are migrated to docs/adr/ on next touch. Use cc10x:domain-modeling/ADR-FORMAT.md for the format.

Audit Doc Structure
markdown
## What Changed
[One paragraph describing the technical change]

## Why
[The primary reason for this decision]

## Alternatives Considered
- **{Alternative A}:** [Why it was not chosen]
- **{Alternative B}:** [Why it was not chosen]

## Impact
[Who is affected; any migration steps; ongoing maintenance implications]

Workflow

The doc-syncer agent follows these five steps in order:

Step 1 — Get the diff

bash
# For pre-commit (staged changes)
git diff --cached --stat && git diff --cached

# For post-build (last commit)
git diff HEAD~1 --stat && git diff HEAD~1

Read the full diff output before classifying.

Step 2 — Classify impact

Run the Impact Classifier table against the diff. Determine IMPACT_LEVEL and which layers to evaluate: none = all four layers SKIP; low = only the technical layer triggered and the changes are minor (rename, one-line fix); medium = technical layer triggered with signature changes, or one other layer triggered; high = multiple layers triggered, or the audit layer requires a new decision record. (Same scale cc10x:doc-syncer assigns — one definition in each place, same meaning.) If IMPACT_LEVEL is none, emit the SKIPPED contract immediately and stop.

Step 3 — Map changed files to doc targets

Use the project's ## Doc Targets from CLAUDE.md if present. Otherwise apply the generic heuristics in references/doc-target-heuristics.md. For each changed file, identify zero or more target documentation files.

Step 4 — Read then write

For each doc target:

  1. Read the entire target file first — an unread edit duplicates sections and contradicts neighbors; the read is what makes the edit minimal
  2. Apply minimal, targeted edits using Edit — do not rewrite sections that are not affected by the diff
  3. Read the file again after writing to verify the edit landed correctly

For audit docs: check whether an existing decision doc covers this topic in docs/adr/ (canonical) or legacy docs/decisions/. If yes, update it (migrating legacy files to docs/adr/ on touch). If no, create a new file at docs/adr/NNNN-{topic}.md following the ADR format. For glossary docs: if a domain term was resolved or sharpened during the workflow, append it to CONTEXT.md (create lazily if missing) using the domain-modeling format — but only if this doc-syncer run is the designated writer (shaping phases write CONTEXT.md; builders emit proposals, see cc10x:domain-modeling).

Step 5 — Self-review

Before emitting the contract, verify:

  • Every updated doc accurately reflects the diff (no hallucinated details)
  • Cross-references between docs are consistent
  • If a new doc file was created, it is indexed in the relevant ## Docs section of CLAUDE.md
  • No doc content was duplicated in CLAUDE.md (it is an index only)

Router Integration

This skill is loaded by the doc-syncer agent in the BUILD chain. The router spawns doc-syncer after integration-verifier passes and before the Memory Update task. The agent emits a ### Router Contract (MACHINE-READABLE) YAML block that the router validates before advancing.

Opt-out: Add DIFF_DRIVEN_DOCS: skip to the ## Session Settings section of CLAUDE.md to disable the doc-syncer for projects that manage documentation separately.

Rationalization Table

Common excuseCounter
"docs can wait"Docs are a deliverable, not a follow-up. The workflow does not close until they are done.
"it's just a refactor"If file paths, function signatures, or exported APIs changed, technical docs need updating.
"the diff is small"Run the Impact Classifier. Small diffs still trigger technical doc updates when signatures change.
"nobody reads those docs"Stale docs actively mislead. Empty docs are better than wrong ones.
"I'll add JSDoc later"JSDoc on exported APIs is a technical doc update. Later means never.
"the tests document the behavior"Tests document correctness, not usage. They are not a substitute for doc updates.

© romiluz13, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in plugins/cc10x/skills/diff-driven-docs of romiluz13/cc10x.

  • SKILL.md
  • evals/README.md
  • evals/eval-01-small-diff-skip-temptation.md
  • evals/eval-02-new-exported-function.md
  • references/doc-target-heuristics.md

Open the folder on GitHubat commit 891acf0

Compare with similar skills

Diff Driven Docs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Diff Driven Docs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Diff Driven Docs this skillromiluz13/cc10x164—~2.7kAutomated safety check: NotesMIT
Commitsickn33/agentic-awesome-skills47k2 repos~1.3kAutomated safety check: PassMIT
Commit Stagedfcakyon/claude-codex-settings1.2k—~643Automated safety check: PassApache-2.0
Commitantiwork/gumroad9.8k—~503Automated safety check: PassMIT
Commitdavila7/claude-code-templates32k3 repos~730Automated safety check: PassMIT
Commitwindmill-labs/windmill18k—~447Automated safety check: PassCustom licence

Similar skills

  • Commit

    sickn33/agentic-awesome-skills

    ALWAYS use this skill when committing code changes — never commit directly without it.

    47k GitHub starsUsed in 2 repos~1.3k tokens
    DevelopmentAuto-check passed
  • Commit Staged

    fcakyon/claude-codex-settings

    This skill should be used when user asks to "commit these changes", "write commit message", "stage and commit", "create a commit", "commit staged files", or explicitly invokes "commit-staged".

    1.2k GitHub stars~643 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Commit

    antiwork/gumroad

    Stage and commit changes with a clear, concise commit message.

    9.8k GitHub stars~503 tokensUpdated today
    DevelopmentAuto-check passed
  • Commit

    davila7/claude-code-templates

    Create commit messages following Sentry conventions. An agent skill from davila7/claude-code-templates.

    32k GitHub starsUsed in 3 repos~730 tokens
    DevelopmentAuto-check passed
  • Commit

    windmill-labs/windmill

    Create a git commit with conventional commit format. An agent skill from windmill-labs/windmill.

    18k GitHub stars~447 tokensUpdated today
    DevelopmentAuto-check passed
  • Ghost Commit Workflow

    TryGhost/Ghost

    Guides the agent through making a focused git commit in the Ghost repository: inspect state, stage only relevant files, follow the contributing rules, then verify.

    55k GitHub stars~286 tokensUpdated today
    DevelopmentAuto-check passed

More from romiluz13/cc10x

All 22 skills in this repo
  • Cc10x Guide

    romiluz13/cc10x

    Answers questions about cc10x itself — what it is, how to install and configure it, how the router, workflows, memory, and hooks operate, and how to troubleshoot.

    164 GitHub stars~1.7k tokensUpdated 7 days ago
    Auto-check passed
  • Cc10x Router

    romiluz13/cc10x

    THE ONLY ENTRY POINT FOR CC10X. An agent skill from romiluz13/cc10x.

    164 GitHub stars~17k tokensUpdated 7 days ago
    Auto-check passed
  • Codebase Design

    romiluz13/cc10x

    Canonical deep-module vocabulary (module, interface, depth, seam, adapter, leverage, locality) for designing a module's shape — a lot of behaviour behind a small interface at a clean seam, testable…

    164 GitHub stars~1.9k tokensUpdated 7 days ago
    Auto-check passed
  • MCP CLI

    romiluz13/cc10x

    A skill your agent uses when you need a one-off MCP server capability during research or debugging without permanently mounting it as a context-polluting integration.

    164 GitHub stars~739 tokensUpdated 7 days ago
    Auto-check: notes
  • A skill your agent uses when a git merge or rebase reports conflicts and the operation is in progress.

    164 GitHub stars~709 tokensUpdated 7 days ago
    Auto-check: notes
  • Update

    romiluz13/cc10x

    Safe cc10x upgrade that preserves local modifications. An agent skill from romiluz13/cc10x.

    164 GitHub stars~1.1k tokensUpdated 7 days ago
    Auto-check: notes

Questions about Diff Driven Docs

What does Diff Driven Docs do?

A skill your agent uses when a BUILD phase completes, a commit is staged, or a PR is about to be created, and the diff has not yet been reflected in documentation. Diff Driven Docs is an agent skill from romiluz13/cc10x. Use when a BUILD phase completes, a commit is staged, or a PR is about to be created, and the diff has not yet been reflected in documentation.

When should I use Diff Driven Docs?

Diff Driven Docs fits situations like: A BUILD phase completes; A commit is staged; A PR is about to be created; the diff has not yet been reflected in documentation.

How do I install Diff Driven Docs in Claude Code?

Run `npx skills add romiluz13/cc10x --skill diff-driven-docs -a claude-code`. Or copy the skill folder (plugins/cc10x/skills/diff-driven-docs in romiluz13/cc10x) into .claude/skills/diff-driven-docs in your project. Claude Code loads it when a task matches its description.

How do I install Diff Driven Docs in Codex?

Run `npx skills add romiluz13/cc10x --skill diff-driven-docs -a codex`. Or copy the skill folder (plugins/cc10x/skills/diff-driven-docs in romiluz13/cc10x) into .agents/skills/diff-driven-docs in your project. Codex loads it when a task matches its description.

Can I use Diff Driven Docs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add romiluz13/cc10x --skill diff-driven-docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diff-driven-docs, .gemini/skills/diff-driven-docs, .github/skills/diff-driven-docs and .opencode/skills/diff-driven-docs in your project.

What does Diff Driven Docs need to run?

Going by SKILL.md and its folder, Diff Driven Docs needs the command-line tools its instructions call (git). Its frontmatter pre-approves these tools: Read, Edit, Write, Bash, Grep, Glob.

Does Diff Driven Docs access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Diff Driven Docs safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Diff Driven Docs use?

Diff Driven Docs is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Diff Driven Docs use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 820 tokens, read only when the agent opens those files.

What are the alternatives to Diff Driven Docs?

Skills that share tags, products or a category with Diff Driven Docs: Commit (sickn33/agentic-awesome-skills, 47k stars), Commit Staged (fcakyon/claude-codex-settings, 1.2k stars), Commit (antiwork/gumroad, 9.8k stars) and Commit (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Diff Driven Docs?

romiluz13 (a GitHub user) maintains it in romiluz13/cc10x, which has 164 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on September 30, 2026.

Source: romiluz13/cc10x on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.