progressive-disclosure:analyze
This 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.
What this skill does
# Analyze Progressive Disclosure
Audit how a repository progressively discloses its documentation through root configuration files. Produce a structured report covering the disclosure hierarchy, reference graph, orphaned documents, anti-patterns, and actionable recommendations.
## Concepts
Progressive disclosure for AI agents operates on three layers:
- **Layer 1 — Discovery**: Lightweight metadata always loaded at session start (root configuration file names, one-line descriptions, file indexes). Consumes minimal instruction budget.
- **Layer 2 — Activation**: Specific instructional files fetched on-demand when the agent identifies a relevant task phase. Loaded via conversational links from root configuration files.
- **Layer 3 — Deep Dive**: Dense reference material, source code, API docs. Loaded only when the agent must execute against detailed content.
Root configuration files are the Layer 1 entry points. Their quality determines whether the rest of the repository is discoverable.
## Git Visibility
When the target is inside a git repository, only **git-tracked** files are part of the repository. Untracked files and gitignored files are treated as **invisible** — they do not appear in the documentation pool, the orphan report, or the metrics, because an agent cloning the repo will never see them. Git never ignores an already-tracked file, so a single "is it tracked?" test enforces both conditions (tracked *and* not ignored).
The one exception is root configuration **entry points** themselves (AGENTS.md, CLAUDE.md, GEMINI.md, …): these are detected by existence, since they are often audited *before* being committed. In its indexed-documentation role, `README.md` follows the visibility rule like any other doc.
If a root configuration file *references* an invisible file, that is a **phantom reference** — the link points at content no one else can load. Flag it and recommend either removing the reference or adding the file to git.
When the target is **not** a git repository, every matching file is included (filesystem walk with standard excludes).
## Symbolic Links
Two paths can be the same underlying file via a symbolic link — most commonly `CLAUDE.md` symlinked to `AGENTS.md`. The discovery script reports these as `SYMLINK:` lines and `SAME-CONTENT:` groups. Files in a `SAME-CONTENT` group are one file under several names; **never** report them as duplicate content.
## Default File List
When no target is explicitly specified, scan for the following files (in order):
1. `README.md` — human-facing documentation about the project; treat as indexed content, not a configuration entry point
2. `AGENTS.md`
3. `CLAUDE.md`
4. `GEMINI.md`
5. `USER.md`
6. `TOOLS.md`
7. `BOOTSTRAP.md`
8. `DESIGN.md`
9. `NOTICE.md`
## Workflow
### Step 0: Resolve Target File
Check whether the user explicitly named a target file in their prompt (e.g. "analyze `docs/CONTRIBUTING.md`", "audit `README.md`").
- **If a file was named**: scope the analysis to that file only. Skip root configuration file precedence resolution — treat the named file as the subject of Steps 2–5.
- **If no file was named**: analyze all root configuration files found by the discovery script as normal.
### Step 1: Run Discovery Script
Execute the discovery script to gather raw data:
```bash
"${CLAUDE_PLUGIN_ROOT}/skills/analyze/scripts/discover.sh" "$(pwd)"
```
The `CLAUDE_PLUGIN_ROOT` variable resolves to the plugin's installed location. The script produces these sections:
- **Git tracking** — whether the target is inside a git work tree (determines visibility, above)
- **Root configuration files** — entry points found
- **Documentation files** — visible `.md` files (tracked-only inside a git repo)
- **Symlinks** — `SYMLINK:` lines and `SAME-CONTENT:` groups (do not treat grouped files as duplicates)
- **Untracked references** — `UNTRACKED-REF:` phantom references from config files to invisible files
- **Reference graph** — each reference marked `[EXISTS]`, `[UNTRACKED]`, or `[MISSING]`
- **Orphan detection** — visible docs not reachable from any config file
- **Metrics** — counts and budget figures
### Step 2: Classify Disclosure Layers
For each root configuration file found, classify its contents against the three-layer model:
- **Layer 1 content** (belongs in root configuration file): project description, build commands, file indexes, conversational links to specialized docs
- **Layer 2 content** (should be linked, not inlined): coding conventions, architecture decisions, testing strategies, workflow instructions
- **Layer 3 content** (should never be in a root configuration file): full API references, schema dumps, extensive code examples, raw data
Flag any Layer 2 or Layer 3 content found inlined in root configuration files.
### Step 3: Detect Anti-Patterns
Check for these documented failure modes:
| Anti-Pattern | Detection | Severity |
|---|---|---|
| **Monolithic root configuration file** | CLAUDE.md >300 lines or AGENTS.md >1500 words | High |
| **Missing index** | Root configuration file has no links to other docs | High |
| **Generic instructions** | Phrases like "write clean code", "follow best practices", "think step by step" | Medium |
| **Style rules in root configuration file** | Formatting/linting rules that belong in tool config (eslint, prettier) | Medium |
| **Orphaned documentation** | .md files not referenced from any root configuration file | Medium |
| **Broken references** | Links in root configuration files pointing to non-existent files (`[MISSING]`) | Critical |
| **Phantom references** | Links to files that exist on disk but are untracked or gitignored (`UNTRACKED-REF:` / `[UNTRACKED]`) | Critical |
| **Duplicate content** | Same instructions in multiple root configuration files — but first exclude `SAME-CONTENT:` symlink groups, which are one file, not duplicates | Medium |
| **No root configuration files at all** | Repository has zero root configuration files | Critical |
### Step 4: Estimate Instruction Budget Impact
Provide a rough assessment:
- Count distinct imperative instructions in each root configuration file (lines starting with verbs, bullet points with directives, numbered steps)
- Recall: agents reliably follow ~150-200 instructions total; baseline system prompt consumes ~50
- Flag if root configuration file instructions exceed ~100 (leaves insufficient budget for task-specific context)
### Step 5: Produce Report
Present findings inline (never hide behind a file path). Structure the report as:
#### 1. Disclosure Map
Visual tree showing root configuration files → referenced docs → their sub-references. Mark each node with its disclosure layer (L1/L2/L3).
#### 2. Root Configuration File Health
Per-file assessment: word count, line count, instruction estimate, layer violations found.
#### 3. Reference Graph
What links to what. Highlight broken links (`[MISSING]`), phantom links to untracked/gitignored files (`[UNTRACKED]`), and circular references. For each phantom reference, recommend removing the reference or adding the target to git.
#### 4. Orphan Report
Documentation files not reachable from any root configuration file. Group by directory.
#### 5. Anti-Pattern Findings
Each finding with severity, location, and specific remediation.
#### 6. Recommendations
Prioritized list of changes to improve progressive disclosure. Lead with highest-impact, lowest-effort items. When restructuring would help, suggest running `progressive-disclosure:restructure`.
### Presentation Rules
- Show all findings inline — never say "see the report file"
- Use tables for structured data, trees for hierarchies
- Lead with the most critical findings
- Quantify: "CLAUDE.md has 847 words across 312 lines — 2.8x the recommended maximum"
- End with a clear next-step recommendation
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.