diff-driven-docs

A documentation check that reads a code change and decides which business, technical, or audit documents need updating. It is meant to run after building and before committing or opening a pull request.

In plain words
What is it for?
Use it to review a diff, classify its documentation impact, update only the affected documents, and check whether documentation is current.
Why use it?
It helps prevent documentation from becoming misleading after code changes. It also avoids rewriting documents when the change has no real documentation impact.

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/romiluz13/auto-pi/diff-driven-docs
Any agent
npx skills add romiluz13/auto-pi --skill diff-driven-docs
Clone the repo
git clone --depth 1 https://github.com/romiluz13/auto-pi

Made for: Claude Code, Codex.

Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 754 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.00065 $0.00754
Opus 5 $0.00032 $0.00377
Sonnet 5 $0.00013 $0.00151
Haiku 4.5 $0.00006 $0.00075

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

Security

Grade A, and why

diff-driven-docs 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 2d 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.

skills/diff-driven-docs/SKILL.md · 61 lines

How it starts

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

Diff-Driven Docs

Stale documentation is worse than no documentation — it actively misleads. This skill treats docs as a deliverable of every code change, not an afterthought. Just as TDD enforces tests accompany code, diff-driven-docs enforces doc updates accompany changes before the workflow closes.

Step 1: Run the impact classifier (BEFORE any doc work)

Read the diff. Classify impact across 3 layers:

Diff characteristic Business Technical Audit
Internal utility / helper / type only SKIP CHECK SKIP
Test addition, no new pattern SKIP SKIP SKIP
Style / formatting change SKIP SKIP SKIP
Dependency version bump (no API change) SKIP SKIP SKIP
Routine bug fix (existing behavior corrected) SKIP CHECK SKIP
Simple refactor (behavior unchanged) SKIP CHECK if signatures changed SKIP
New exported function / hook / component SKIP CHECK CHECK
New page or route CHECK CHECK CHECK
Architectural pattern introduced SKIP CHECK CREATE
Technology choice made SKIP CHECK CREATE
Breaking change to public API CHECK CHECK CREATE
Permission or role change CHECK CHECK CHECK
Security or compliance impact CHECK CHECK CREATE or UPDATE

SKIP business docs if: no user-facing surface changed; only internal utils/types/tests modified. SKIP audit docs if: routine bug fix, style change, test addition, or simple refactor with no new pattern. ALWAYS check technical docs when hooks/components/migrations/schema/routes/exported APIs changed. CREATE an audit doc if: an architectural decision was made, a new pattern introduced, a non-obvious tradeoff accepted, or a dev six months from now would ask "why did we do it this way?"

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

Step 2: Write only the needed updates

Read the full file on GitHub · 61 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. 2d ago First seen · 61 lines · 65 tokens per session scan A c13118209fe2

Subscribe to this mod's changes

diff-driven-docs is a skill published in the GitHub repository romiluz13/auto-pi (11 stars, last pushed 16d ago), licensed MIT. It adds 65 tokens to every session and 754 once invoked, about $0.0003 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.