From docs-optimizer
Optimizes documentation directories for AI agent navigation efficiency. Use when the user asks to "optimize documentation", "improve docs for AI", "make docs more navigable", "optimize docs navigation", "review documentation structure", mentions "documentation efficiency" or "AI navigation", or discusses improving how AI agents find information in documentation directories.
How this skill is triggered — by the user, by Claude, or both
Slash command
/docs-optimizer:docs-optimizerThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill optimizes documentation directories so AI agents can navigate them efficiently.
This skill optimizes documentation directories so AI agents can navigate them efficiently.
You are optimizing for AI NAVIGATION EFFICIENCY, not user satisfaction.
The goal: Given a user query, how quickly can an AI agent locate the relevant file and section?
If an agent finds "we don't support X" in 2 tool calls, that's SUCCESS - even if the user wanted X.
For detailed explanation, see references/north-star.md.
Before starting optimization, ask the user:
Read the documentation directory thoroughly before proceeding.
Approach the directory as a fresh agent would:
tree or ls to see the structureEvaluate:
Make improvements following the playbook:
Create/improve README.md with:
Fix filenames:
Reduce redundancy:
Add cross-links:
Add scope signaling:
For detailed guidance, see references/playbook.md.
Before making edits:
After making structural changes:
Launch TWO reviewer subagents IN PARALLEL:
Haiku reviewer (fast, cost-effective)
.claude/reviews/haiku-review.mdSonnet reviewer (thorough analysis)
.claude/reviews/sonnet-review.mdBoth receive the same dynamically generated test questions.
Create the .claude/reviews/ directory if it doesn't exist.
After both reviewers complete:
.claude/docs-optimizer.local.md) when presenting results, making clear that scores across rounds are directly comparable since the same test questions are usedPresent to user:
Skip this phase on the initial round (before any review-driven Opus edits). Run this phase starting from Round 2 (after the first Opus edit based on reviewer feedback).
Generate the git diff of the most recent Opus edit commit:
git diff HEAD~1 -- [docs-directory]
Store the diff output as a string to pass to reviewers.
Spawn TWO conciseness reviewer subagents IN PARALLEL:
Provide each with:
After both complete, read their reviews and include conciseness scores in the Phase 6 synthesis.
Based on average score:
Score >= 8: Ask user:
Score 5-7: Recommend another round:
Score < 5: Significant work needed:
Present to user:
Generate 10 project-specific test questions based on documentation content.
Before generating questions, check if .claude/docs-optimizer.local.md exists
and contains a test_questions key in its YAML frontmatter.
.claude/docs-optimizer.local.md with YAML frontmatter:
---
test_questions:
- "How do I configure X?"
- "Why is Y happening?"
- ...
docs_directory: "/path/to/docs"
round: 1
---
Increment the round counter in .claude/docs-optimizer.local.md each time
reviewers are spawned.
Easy (2-3 questions): Direct lookups with obvious keywords
Medium (2-3 questions): Require some inference
Hard/Chaotic (1-2 questions): Poor grammar, typos, missing context
XY Problem (1-2 questions): User asks about feature the tool doesn't have
Out-of-scope (1 question): Completely unrelated topic
Q1: "How do I configure [obvious feature from doc titles]?"
Q2: "Why am I getting [error from troubleshooting] on [platform]?"
Q3: "[same as Q2 but with typos, fragments, panic tone]"
Q4: "how do i [thing the tool explicitly doesn't do]"
Q5: "[completely unrelated topic like 'kubernetes scaling' for a desktop app]"
When spawning reviewers, provide:
Documentation directory: [PATH]
Test questions (answer these by navigating the docs):
1. [Q1]
2. [Q2]
3. [Q3]
4. [Q4]
5. [Q5]
Write your review to: [OUTPUT PATH]
Spawn both agents in the same message to run in parallel.
| Score | Tool Calls/Question | Navigation Quality |
|---|---|---|
| 9-10 | 1-2 | Perfect - README guides directly |
| 7-8 | 3-4 | Good - minor detours |
| 5-6 | 5-6 | Acceptable - some confusion |
| 3-4 | 7+ | Poor - many wrong paths |
| 1-2 | Many | Failing - cannot navigate |
For detailed scoring criteria, see references/scoring-rubric.md.
Measuring user satisfaction - Subagents will naturally evaluate "does this help the user?" unless explicitly told not to. The reviewer agents are already configured correctly.
Giving hints in questions - Don't label questions "(hard)" or "(wrong tool)". Present raw.
Treating "not covered" as failure - If docs establish scope and agent recognizes it quickly, that's SUCCESS.
Optimizing content, not structure - You're optimizing ARRANGEMENT. Don't add new explanatory content - reorganize, rename, cross-link.
npx claudepluginhub defiect/claude-code-plugins --plugin docs-optimizerAudits documentation against source code using git-based staleness detection. Run with no args for smart check or specify a path. Supports full audit, auto-fix, and check-only modes.
Organizes project documentation into intent-based structure (BUILD/FIX/UNDERSTAND/LOOKUP) by auditing files and creating directories. Use for new projects, chaotic docs, or navigation issues.
Optimizes project docs and READMEs for LLMs like Claude/Copilot via c7score scoring, llms.txt generation, question restructuring, and quality analysis.