skills/docs-generator/SKILL.md
Generate and restructure project docs into a clear, accessible hierarchy. Use to organize, generate, or restructure a README. Don't use for API reference generation (JSDoc/Sphinx), landing pages, or agent-config files like CLAUDE.md.
npx skillsauth add luongnv89/skills docs-generatorInstall 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.
Restructure and organize project documentation for clarity and accessibility.
This skill requires (validate each before starting; if any check fails, stop and ask the user):
git status first; if dirty, back up via git stash push -u -m "pre-docs-sync" before any sync that could rebase or overwrite local changes.git >= 2.30, a Markdown-aware editor, and mermaid-cli (or a renderer) only if diagrams must be exported. Confirm availability with git --version and command -v mmdc.origin remote that is reachable (git remote get-url origin); if missing, do not attempt rebase/pull — ask the user.rm/git mv with a prior git status check and explicit user confirmation; never run git reset --hard, git push --force, or rm -rf without a dry-run preview and user approval.git mv -n, rm -i) and require user confirmation before any irreversible action.If any prerequisite fails, halt and surface the blocker to the user rather than proceeding.
Before creating/updating/deleting files in an existing repository, sync the current branch with remote:
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"
If the working tree is not clean, stash first, sync, then restore:
git stash push -u -m "pre-sync"
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin && git pull --rebase origin "$branch"
git stash pop
If origin is missing, pull is unavailable, or rebase/stash conflicts occur, stop and ask the user before continuing.
Before making any changes:
git branch -r | head -20 (e.g., feat/, feature/, etc.)feat/docs-generatorRead the codebase to identify:
Root README.md - Streamline as entry point:
Component READMEs - Add per module/package/service:
Centralize in docs/ - Organize by category (select applicable):
docs/
├── architecture.md # System design, diagrams
├── api-reference.md # Endpoints, authentication
├── database.md # Schema, migrations
├── deployment.md # Production setup
├── development.md # Local setup, contribution
├── troubleshooting.md # Common issues
└── user-guide.md # End-user documentation
Use Mermaid for all visual documentation:
Present changes to user for approval. Do not commit unless the user explicitly asks.
After running this skill on a mid-size Node.js API project, you should see:
README.md with project overview, quickstart, module links, and licenseREADME.md files for each service or librarydocs/ folder with relevant files such as architecture.md, api-reference.md, deployment.md, and development.mdA run passes when all of the following are true:
README.md contains an overview, a quickstart (install + first use), and links to component or docs/ files.docs/ directory exists with at least one of: architecture.md, api-reference.md, deployment.md, development.md — and only the files relevant to the project type.[text](path) references).docs/*.md is reachable from README.md or another docs/ page within one hop.mmdc validation if available).main/master; all changes are on a feature branch following the repo's naming convention.README.md and adds docs/ files based on project complexity.After completing each major step, output a status report in this format:
◆ [Step Name] ([step N of M] — [context])
··································································
[Check 1]: √ pass
[Check 2]: √ pass (note if relevant)
[Check 3]: × fail — [reason]
[Check 4]: √ pass
[Criteria]: √ N/M met
____________________________
Result: PASS | FAIL | PARTIAL
Adapt the check names to match what the step actually validates. Use √ for pass, × for fail, and — to add brief context. The "Criteria" line summarizes how many acceptance criteria were met. The "Result" line gives the overall verdict.
Phase: Branch Setup — checks: Branch creation, Repo sync
Phase: Project Analysis — checks: Project analysis, Gap identification
Phase: Documentation Restructure — checks: Doc restructure, Diagram creation
Phase: Validation — checks: Validation pass, Link verification
tools
Run Herdr loops for one open GitHub issue (resolve→review→fix) or an existing PR (review→lazy fixer) until CLEAN. Don't use for plain resolution without review, review-only/no-fix requests, backlog automation, or merging.
tools
Manage AI agent fleets in Herdr: split root + sub-agents into one tab as a tiled grid, message/wait/read via herdr CLI, steer any pane. Use for Herdr multi-agent fleets. Don't use for tmux, screen, or non-Herdr terminals.
development
Generate or update docs to match the code, citing each claim to path:line and asking on ambiguity; runbook docs also get a check-only validation script. Don't use for API-reference autogen (JSDoc/Sphinx), landing pages, or CLAUDE.md/AGENTS.md.
testing
Generate a diagram and route to the right engine — draw.io XML (precise, editable, C4, swimlanes) or Excalidraw JSON (hand-drawn, sketch, wireframes). One entry for flowcharts, architecture, ER, sequence, mind maps. Don't use for Mermaid or slides.