skills/combine-docs/SKILL.md
Discovers all documentation in a project, analyzes it for redundancy, contradictions, and staleness, proposes a consolidation plan, then executes it. Produces optimized docs for both humans and agents. Use when user says "combine docs", "consolidate documentation", "merge docs", "clean up docs", "fix documentation", "optimize docs", "documentation sprawl", "too many docs", or asks about doc organization.
npx skillsauth add nathan13888/nice-skills combine-docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Discover all documentation in a project, analyze for redundancy and contradictions, propose a consolidation plan, then execute it with user approval.
Follow all 4 steps sequentially. Do NOT execute changes without user approval at Step 3.
Find every documentation file in the project.
Glob for docs -- search for **/*.md, **/*.mdx, **/*.txt, **/*.rtf (exclude node_modules/, .git/, vendor/, target/, dist/, build/, __pycache__/, archive/).
List what you found -- output each file with its path. Note how many docs exist total.
Flag monorepo READMEs separately -- if the project has READMEs inside subdirectories (packages, modules, services), list them in their own group. These need extra care in Step 3.
Read each doc and build a landscape table for the user.
For each doc, note:
Then identify:
Present the map:
## Documentation Map: {project}
**Documents found:** {count}
| Path | Type | Covers | Overlaps With |
|------|------|--------|---------------|
| README.md | readme | setup, overview | CONTRIBUTING.md (setup) |
| ... | ... | ... | ... |
### Duplicated Content
- **Setup instructions** appear in: README.md, CONTRIBUTING.md, docs/getting-started.md
### Contradictions
- README.md says `npm start`, CONTRIBUTING.md says `yarn dev`
Ask the user using AskUserQuestion with multiSelect: true:
Propose where docs should live and what changes to make.
For each doc, assign an action:
| Action | Meaning |
| ----------- | ----------------------------------------- |
| MERGE | Combine multiple docs into one target |
| MOVE | Relocate to a better path (uses git mv) |
| UPDATE | Rewrite or refresh in place |
| CREATE | New doc (usually CLAUDE.md) |
| ARCHIVE | Move to archive/ -- never delete |
| SKIP | Leave as-is, with reason |
Present the plan:
## Consolidation Plan
| # | Action | Target | Details |
|---|--------|--------|---------|
| 1 | MERGE | docs/setup.md | README setup + CONTRIBUTING setup |
| 2 | UPDATE | README.md | Remove duplicated setup, link to docs/setup.md |
| 3 | CREATE | CLAUDE.md | Commands, architecture, conventions |
| 4 | ARCHIVE | docs/old-api.md | Superseded by docs/api.md |
| 5 | SKIP | LICENSE | No changes needed |
Hard gate: Ask the user to approve, modify, or reject using AskUserQuestion:
If uncertain about any monorepo README or module-level doc, ask the user explicitly before including it in the plan.
Do NOT proceed to Step 4 without explicit approval.
Execute approved actions in order: ARCHIVE first, then MERGE, then UPDATE, then CREATE, then MOVE.
Execution rules:
git mv {path} archive/{path}. Add a header: <!-- Archived by combine-docs. Superseded by {replacement}. -->git mv so git tracks history.After all actions, grep for broken internal links (](, href=) pointing to moved/archived files and fix them.
Present results:
## Consolidation Complete
### Changes
| Before | After | What Changed |
|--------|-------|-------------|
| README.md (setup + overview) | README.md (overview only) | Setup moved to docs/setup.md |
| docs/old-api.md | archive/docs/old-api.md | Archived |
| (new) | CLAUDE.md | Created with commands, architecture |
### What's Next
1. **Review changes** -- walk through each modified file
2. **Undo** -- revert all changes (`git checkout`)
3. **Commit** -- commit as a single commit
General principle: Same information in exactly one place. Links replace duplication.
CLAUDE.md (agent-optimized):
Run tests: npm test not a paragraph about the test frameworkHuman docs:
Monorepo READMEs:
archive/ if obsoletegit mv for all moves so git tracks historydata-ai
Ingest arbitrary feedback (GitHub/GitLab URL, pasted review, image, file path, free text) about the current repo, decompose it into a prioritized action plan with per-item owners (human / main-agent / subagent), confirm with the user, then dispatch execution. Use when user says "/tackle", "address this feedback", "act on this review", "work through this feedback", or "what should I do about this".
development
Capture a problem or change request, verify it lightly against the codebase, draft a structured issue report, then route to one of: upload to GitHub/GitLab, document in code, hand off for implementation, or a free-text next step. Use when user says "/issue", "report a problem", "file a bug", "raise an issue", "track this", or "open a ticket".
testing
Create a new git branch off trunk using the project's existing naming convention. Detects trunk (main/master/etc.) and the dominant prefix pattern (feat/, <username>/, etc.) from existing branches, slugifies the feature description, and runs git checkout -b. Use when user says "feature branch", "new branch", "create branch", "git branch", or "/feature-branch".
development
Quick situational awareness for the current git branch. Summarizes what a feature branch is about by analyzing commits and changes against trunk. On trunk, highlights recent interesting activity. Use when user says "wtf", "what's going on", "what is this branch", "what changed", or "catch me up".