/progressive-disclosure:restructurefrom progressive-disclosure
Restructures a repository's root configuration file (CLAUDE.md, AGENTS.md, etc.) into a thematic, book-style documentation index with conversational links. Useful for organizing project docs and improving agent discovery.
Ships in progressive-disclosure. 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.
Refactor the repository's highest-precedence root configuration file to contain a thematic, book-style index of all documentation. Organizes references like a table of contents — grouped by theme, ordered for progressive discovery.
references/themes.md, not by directory structure. The ordering mimics a book's table of contents.docs/typescript.md" rather than a bare link.Check whether the user explicitly named a target file in their prompt (e.g. "restructure docs/CONTRIBUTING.md", "update README.md").
Skip this step if Step 0 resolved a target.
Apply precedence rules to find the highest-precedence existing root configuration file:
AGENTS.mdCLAUDE.mdGEMINI.mdUSER.mdTOOLS.mdBOOTSTRAP.mdDESIGN.mdNOTICE.mdIf none exist, create AGENTS.md as the target.
Read the target file to understand its existing structure.
Run the discovery script to enumerate all .md files:
"${CLAUDE_PLUGIN_ROOT}/skills/analyze/scripts/discover.sh" "$(pwd)"
Exclude root configuration files themselves from the index (they are the container, not indexed content). Include README.md as an indexed document.
Index only visible files. Inside a git repository the discovery script already restricts the documentation pool to git-tracked files — never add an untracked or gitignored file to the index, since other agents cannot load it. If the existing file already links to such a file, drop that link and note it.
When the script reports a SAME-CONTENT: symlink group (e.g. CLAUDE.md symlinked to AGENTS.md), index the underlying file once — do not list both the symlink and its target as separate entries.
For each discovered document, classify it into a theme using the taxonomy in references/themes.md. Apply signals in order:
This classification is semantic — use judgment for ambiguous documents. A file at docs/auth-flow.md with H1 "Authentication Architecture" belongs in Architecture, not Security.
Build the index section with this structure:
<!-- progressive-disclosure:index:start -->
## Documentation Index
### Getting Started
- For initial setup and installation, see [`docs/quickstart.md`](docs/quickstart.md)
### Architecture
- For system design and component relationships, see [`docs/architecture.md`](docs/architecture.md)
- For data flow diagrams, see [`docs/data-flow.md`](docs/data-flow.md)
### Development
- For TypeScript conventions, see [`docs/typescript.md`](docs/typescript.md)
[...additional themes with documents...]
<!-- progressive-disclosure:index:end -->
Rules for the generated index:
references/themes.md within-theme rulesIf markers already exist (<!-- progressive-disclosure:index:start --> and <!-- progressive-disclosure:index:end -->):
Replace everything between the markers (inclusive) with the new index block.
If no markers exist:
Check for an existing section heading like ## Documentation, ## Index, ## Table of Contents, or ## References. If found, insert the index block immediately after that heading (replacing its body up to the next ##). If no matching section exists, append the index block at the end of the file.
After writing the index:
After restructuring, display:
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/analyzeprogressive-disclosure:analyzeThis skill should be used when the user asks to "analyze documentation structure", "audit progressive disclosure", "map documentation references", "find orphaned docs", "check context rot risk", "audit CLAUDE.md", "audit AGENTS.md", or wants to understand how a repository's documentation is structured for AI agent consumption. Produces a disclosure map, orphan report, and anti-pattern findings./progressive-disclosureThis skill should be used when the user asks to "analyze documentation structure", "audit progressive disclosure", "restructure CLAUDE.md", "restructure AGENTS.md", "create a documentation index", "organize project docs", "find orphaned docs", "map documentation references", "improve context loading", or mentions progressive disclosure, documentation hierarchy, root configuration file organization, or context rot prevention. Analyzes or restructures how a repository discloses documentation through root configuration files.npx claudepluginhub florianbuetow/claude-code --plugin progressive-disclosureOther plugins' skills for the same job