Documentation quality toolkit — audit doc health, refactor for progressive disclosure, consolidate duplicates. Enforces CLAUDE.md (Claude Code config only) / AGENTS.md (everything else) boundary. Use when docs feel bloated, when CLAUDE.md has project knowledge, or after major project changes.
From interscribenpx claudepluginhub mistakeknot/interagency-marketplace --plugin interscribeThis skill is limited to using the following tools:
SKILL-compact.mdDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Implements structured self-debugging workflow for AI agent failures: capture errors, diagnose patterns like loops or context overflow, apply contained recoveries, and generate introspection reports.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Documentation quality toolkit with three modes: audit, refactor, consolidate.
This is the single most important convention interscribe enforces:
CLAUDE.md → Claude Code ONLY: plugins, hooks, tool preferences, permissions, Claude-specific settings
AGENTS.md → Everything else: architecture, workflows, conventions, troubleshooting, standards
→ docs/ → Deep reference files linked from AGENTS.md sections
Any project knowledge in CLAUDE.md is a boundary violation. Project knowledge includes: git workflow, architecture, build instructions, coding conventions, server setup, debugging guides, workflow patterns.
What belongs in CLAUDE.md: Plugin versions and settings, hook configuration, tool preferences (Read vs cat), permission notes, Claude-specific behavioral overrides, links to AGENTS.md.
<interscribe_input> #$ARGUMENTS </interscribe_input>
Parse the input to determine mode and target:
audit / audit [path] → Audit moderefactor / refactor [path] → Refactor modeconsolidate / consolidate [path] → Consolidate modeAnalyze documentation health and report findings. No changes made.
Find all CLAUDE.md and AGENTS.md files in the target path (default: project root). Also find docs/canon/doc-structure.md if it exists.
For each CLAUDE.md, classify every section:
Report violations with the section heading and line count.
Count lines in each doc. Report:
Look for semantically identical instructions across:
Report duplicates with locations.
Scan for:
Output a summary:
## Interscribe Audit Report
**Target:** [path]
**CLAUDE.md:** [N] lines ([M] boundary violations)
**AGENTS.md:** [N] lines ([M] sections > 100 lines)
**Duplicates:** [N] found
**Stale references:** [N] found
### Boundary Violations
[list with section names and line counts]
### Oversized Sections
[AGENTS.md sections that should be extracted to docs/]
### Duplicates
[instruction, locations]
### Stale References
[reference, file, line]
**Health Score:** [A-F] based on violation count and severity
Restructure docs for progressive disclosure. Fully automatic — applies all changes. Review via git diff.
Run the full audit (Mode 1) to understand current state.
For each boundary violation in CLAUDE.md:
See [Topic](AGENTS.md#section)For AGENTS.md sections exceeding 100 lines:
docs/[topic].md with the full contentFor each duplicate found:
<!-- CONTRADICTION: also stated differently in [file] --> commentRemove or fix stale references:
Report what was changed:
## Interscribe Refactor Summary
**CLAUDE.md:** [before] → [after] lines
**AGENTS.md:** [before] → [after] lines
**Files created:** [list of new docs/ reference files]
**Duplicates removed:** [count]
**Stale references fixed:** [count]
Review changes: `git diff`
Deduplicate across a multi-level doc hierarchy. Use when you have global + project + subproject docs.
Build the doc loading tree:
~/.claude/CLAUDE.md (global)
→ project/CLAUDE.md
→ project/subdir/CLAUDE.md
~/.codex/AGENTS.md (global, if exists)
→ project/AGENTS.md
→ project/subdir/AGENTS.md
For each instruction that appears at multiple levels:
Apply deduplication changes. Report what was consolidated and any contradictions flagged.
| Grade | Criteria |
|---|---|
| A | 0 boundary violations, CLAUDE.md <60 lines, 0 duplicates, 0 stale refs |
| B | 1-2 boundary violations OR CLAUDE.md 60-80 lines OR 1-2 duplicates |
| C | 3-5 boundary violations OR CLAUDE.md 80-120 lines OR 3-5 duplicates |
| D | 6+ boundary violations OR CLAUDE.md >120 lines OR 6+ duplicates |
| F | AGENTS.md missing entirely OR CLAUDE.md contains >50% project knowledge |
Foundational project docs that define identity and standards:
docs/canon/
├── PHILOSOPHY.md # Design bets and tradeoffs
├── doc-structure.md # This standard (pointer-doc convention, budgets, boundaries)
└── naming.md # Naming conventions
Root keeps: CLAUDE.md, AGENTS.md (operational, auto-loaded by tools).
| File | Target | Hard Cap | Action |
|---|---|---|---|
| CLAUDE.md | 30-60 | 80 | Move project knowledge → AGENTS.md |
| AGENTS.md section | 50-80 | 100 | Extract → docs/ reference file |
| MEMORY.md | 100-150 | 200 | Promote stable facts → AGENTS.md via intermem:synthesize |