/docs-hygiene:audit-progressive-disclosure [audit] [target] [--repo <repo> ...]from docs-hygiene
Audits agent instruction markdown files for progressive-disclosure quality: grades context loading across always-loaded, invocation-loaded, and on-demand tiers; flags oversize files, hub-and-spoke defects, and split opportunities.
Ships in docs-hygiene. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Run each command below as its own Bash call, all sent together in one message (worktree isolation).
Keep any bound in the command's own pipe (output limits).
Unless this section says otherwise, treat a failure (not a repository, git unavailable) as an unknown value and carry on. Keep these as body calls, never ## Pre-computed context lines (gather-block convention).
git branch --show-currentgit status --porcelain | grep -E '\.md"?$' | head -10Agent-facing instruction markdown (CLAUDE.md/AGENTS.md, .claude/rules/, skill/agent/command
bodies, their bundled spokes) has a load cost set by its tier: always-loaded content is paid
every session, invocation-loaded content recurs for the rest of the session once triggered, and
on-demand content is free until read. This skill audits both directions: content that should move
down a tier (split opportunities), and hub/spoke structures whose pointers no longer let an agent
pull exactly the file it needs (structure defects). It is a read-only classifier: findings carry
treatment guidance; the author applies every edit.
Read context/tier-model.md for the full tier tables, official numbers, split triggers, and pointer-quality criteria when adjudicating a finding that needs the exact threshold, routing rule, or citation posture (Anthropic-prescribed vs corroborated vs community).
| Lane | Shape | What it looks like | Default tier | Treatment |
|---|---|---|---|---|
| split | oversize | File at/approaching its tier's size guidance (SKILL.md approaching the line cap /playbooks:skill-authoring (if enabled) ## Body records and /skill-quality:check (if enabled) enforces; CLAUDE.md approaching the memory page's size target; references per the TOC bands). Ceilings, not targets. Size alone below the cap is no finding | 2 | Add a hierarchy layer: name the sections to push into spokes, each behind a conditioned pointer |
| split | mixed-concerns | Mutually-exclusive contexts co-resident (content that never co-executes), category straddle, multi-topic rules file, cross-file contradiction | 2 | Split by concern. One topic per file; name the proposed split seams |
| split | tier-mismatch | Content at the wrong tier: a procedure grown inside CLAUDE.md (→ skill), path-local rules in a global file (→ scoped rule), reference detail inline in a hub (→ spoke), always-loaded content not needed every session (→ demote behind a pointer) | 1 when an official routing rule decides it; else 2 | Route down-tier per the rule, unless owned upstream (see Hard rules); the finding names source section and destination surface |
| structure | blind-pointer | Pointer with no when-to-read clause, unmarked execute-vs-read intent, or a vague target name (doc2.md, utils) | 2 | Attach the condition and intent; rename the target descriptively. On skill descriptions, a missing when-not-to-use clause is advisory color (community-sourced), never a violation |
| structure | orphan-spoke | Bundled spoke no hub references. Unreachable by pointer | 2 | 3-way: add the missing pointer, merge the content up, or delete the spoke |
| structure | deep-nesting | Spoke-to-spoke chain, required reading more than one level from the hub (documented partial-read failure) | 2; 1 when the chain is the only path to required content | Re-link the deep target directly from the hub, or flatten |
| structure | missing-toc | Reference file with no TOC above both sources' TOC thresholds = definite; between the two thresholds = awareness only, citing the source conflict on the TOC threshold | 1 (above both) / 3 (between them) | Add a TOC at top (or a grep recipe for lookup-shaped content) |
Thresholds are advisory and tier-calibrated, never hard gates; consuming repos refine them in
their own CLAUDE.md / rules. There is deliberately no "should have spokes" shape: a small
single-file skill is never flagged for lacking spokes.
missing-toc bands, the pages
Structure longer reference files with a table of contents
and skill-creator's
Progressive Disclosure
disagree on the TOC threshold; fetch both live when placing a file in a band.| Action | Args | Behavior |
|---|---|---|
<target> (default) | empty → uncommitted .md files from git; file path → single file; dir path → recursive batch | run ${CLAUDE_SKILL_DIR}/scripts/detect.sh on the targets; map its facts onto the shapes table via the judgment rules below |
audit [target] | same target rules | explicit form of the default; same behavior |
--repo <repo> (and the other target forms) | beside either action | that action once per repository, per ${CLAUDE_PLUGIN_ROOT}/reference/target-scope.md and ../../context/clean-tree-fallback.md "Several repositories"; with no path, each repository's corpus is rule 1's below, minus the offer |
One action; the author hand-edits from the audit output.
Facts vs judgment. detect.sh emits facts, not verdicts: per-file size and heading facts,
load-tier classification (path + frontmatter heuristic; unknown is yours to classify), a pointer
inventory with source-line context, orphan-spoke records, and spoke-to-spoke chain records. The
judgment layer owns: concern-mixing (from the heading census + content), whole-conversation
relevance of always-loaded sections, when-clause quality (judge whether a pointer record's ctx,
the surrounding line, carries a condition and intent), and whether a chain is a required reading
path (finding) or a legitimate cross-reference (not one). In a repo with no Claude Code
configuration most files classify on-demand/unknown and the split lane still applies.
Shared clean-tree / no-scope shape: ../../context/clean-tree-fallback.md.
The rules below are what this skill runs; open the shared file only when editing them, for the
sibling divergences it owns.
.md (CLAUDE.md/AGENTS.md,
.claude/rules/, skill/agent/command trees) minus **/evals/fixtures/**, **/vendor/**, and
CHANGELOG.md; scan via one detect.sh pass per top-level root; report-first. Unattended,
surface the offer as blocked and stop..md files → batch audit over all of them. Re-derive the full
list in-session (git status --porcelain); the sample gathered above caps at 10 and is
orientation, never the corpus.audit → audit on the rest (explicit form).Edit, no Write, no mutating Bash ops; the author owns every treatment edit./playbooks:skill-authoring (if enabled), sections ## Body
and ## Descriptions; the other vendor-defined numbers (CLAUDE.md target, listing budget, per-skill metadata cost,
compaction re-attach budgets) are cited as Anthropic-prescribed; their owning pages, as-of date, and recheck trigger live in the
provenance record in context/tier-model.md, which is re-verified rather
than trusted. Reserve consensus language for independently corroborated claims; label
community-sourced signals as such and keep them advisory.CHANGELOG.md, evals/fixtures/, vendor/ trees, YAML frontmatter, and
fenced code blocks are never findings surfaces.synced|sync-managed|vendored|generated|upstream, and check docs/adr/ and docs/decisions/
for a decision recording the file's tier or owner. Search beyond the targets: the ownership
statement usually lives in a README inventory, a tool-config comment, or a sync manifest. When
the hit names an upstream owner, keep the finding, set Treatment to file with the owner, citing the decision, and mark disposition upstream. Never propose a local move or edit for an
upstream-owned file. When the hit is a decision recording only the tier of a locally owned file,
cite it as the recorded reason to stay at that tier; no owner exists, so do not use upstream./docs-hygiene:audit-progressive-disclosure <file> ==
… audit <file>.<file>: tier=<always|invocation|on-demand|unknown> — N finding(s) — T1=<n>, T2=<n>, T3=<n>
| Tier | Lane | Shape | Line | Evidence | Treatment |
|------|------|-------|------|----------|-----------|
| 1 | split | tier-mismatch | 41 | "## Deploy procedure" (multi-step) in always-loaded CLAUDE.md | Move to a skill; leave a one-line pointer |
| 2 | structure | blind-pointer | 12 | "[details](context/tier-model.md)" — no when-clause | Attach the read condition and intent |
| 3 | structure | missing-toc | — | reference file, 180 lines, no TOC (sources disagree on the TOC threshold) | awareness only |
| 1 | split | tier-mismatch | 41 | "## Deploy procedure" in always-loaded file listed as synced in `sync/README.md` | upstream: file with the owner, citing the decision |
upstream is a disposition shown in the Treatment cell, not a tier: a Tier 1/2 finding on an
upstream-owned file keeps its tier. A Tier 3 row's Treatment cell is only awareness only.
Batch aggregate at end:
Total: <N> file(s) audited — T1=<n>, T2=<n>, T3=<n>. Facts: files=<n> pointers=<n> unresolved=<n> orphans=<n> chains=<n>
shape values: oversize, mixed-concerns, tier-mismatch, blind-pointer, orphan-spoke,
deep-nesting, missing-toc.
/docs-hygiene:write-for-agents./docs-hygiene:compress./docs-hygiene:rename-references.oversize.mixed-concerns
even when the file is "small enough".chain record is a candidate, not a verdict. Sibling cross-references between spokes that
are alternates (not required reading) are legitimate.resolved=no) is upstream breakage worth surfacing, but rename sweeps
belong to /docs-hygiene:rename-references./docs-hygiene:compress. Flavor/wordiness inside a file is compression, not disclosure./docs-hygiene:audit-noise. In-page noise shapes (citations, ghost-refs, preambles)./docs-hygiene:audit-derivability. Whether a whole doc should exist at all./docs-hygiene:extract-ssot. Content repeated across files is deduplication territory./skill-quality:check (if enabled). Frontmatter validation, listing budgets, and description QA are
its static gates; this skill audits loading structure, and cross-references rather than
duplicates those checks.Each entry names the topic this skill relies on the source for, never what the source says; the pointer, as-of date and recheck trigger for each threshold live in context/tier-model.md; a live-docs entry that backs no threshold carries its own as-of date and recheck trigger.
context/tier-model.md (opens in a new tab)evals/evals.json (opens in a new tab)evals/fixtures/broken-skill/context/details.md (opens in a new tab)evals/fixtures/broken-skill/context/queries.md (opens in a new tab)evals/fixtures/broken-skill/context/scratch-notes.md (opens in a new tab)evals/fixtures/healthy-skill/reference/redlining-rules.md (opens in a new tab)evals/fixtures/mixed-instructions.md (opens in a new tab)evals/fixtures/synced-rule/README.md (opens in a new tab)evals/fixtures/synced-rule/docs/adr/0007-pr-body-rule-always-loaded.md (opens in a new tab)scripts/detect.sh (opens in a new tab)scripts/detect.test.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub melodic-software/claude-code-plugins --plugin docs-hygiene10 skills in this plugin
/audit-derivabilityAudit derivabilityRead-only audit of whether a doc earns its existence or an agent can re-derive it from code, config, and structure: verdict per file (delete, convert-to-pointer, keep-as-derivation-cache, keep-owns-facts). Use when: 'is this doc worth keeping', 'audit doc value', 'prune redundant docs', or derivability. Not for noise: /docs-hygiene:audit-noise. Load it before judging whether a doc should stay or go./audit-encapsulationAudit encapsulationAudit skill encapsulation and boundary leak where external citation reaches private skill surface (.claude/skills/X/, plugins/*/skills/X/) beyond slash invocation; read-only, explicit fix FILE:LINE. Use when 'audit encapsulation', 'find skill leaks', 'check skill boundaries', skill boundary violation, reaching into SKILL, API drift, refactor skill. Load it to ask what depends on another plugin's internals. Load it too before publishing plugins as separate installs./audit-noiseAudit noiseRead-only audit of tracked markdown (rule/skill/convention doc) for nine noise shapes: stale historical citation, ghost ref, preamble, tracker back-ref, negation without positive, conversational residue. Use when 'audit markdown noise', 'find ghost refs', 'declutter', sweep for noise. Not for code comments: /code-tidying:remove-comments. Load it before listing a doc's leftover lines to cut before sharing it.Other plugins' skills for the same job