skills/docs-generator/SKILL.md
Generate and restructure project documentation into a clear, accessible hierarchy. Use when asked to organize docs, generate documentation, improve doc structure, or restructure README. Don't use for API reference generation from code (JSDoc/Sphinx), authoring a landing page, 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
Solution: Generate documentation from scratch based on code analysis. Start with README.md and add docs/ files based on project complexity.
Solution: Flag conflicts to the user. Prefer code-derived information over stale docs. Mark outdated sections for user review.
documentation
Manage software releases end-to-end: bump version, generate changelog, tag, push, GitHub release, publish to PyPI/npm. Use when user asks to ship, cut a release, tag a version, or list changes since last tag. Skip routine commits and marketplace publishing.
development
Review UI for usability issues using Steve Krug's principles and produce a scannable report. Use when asked for a usability audit, UX review, or UI feedback on screenshots, URLs, or code. Don't use for visual/brand design critique, accessibility (WCAG) audits, or backend/API review.
development
Validate app/startup ideas with market, feasibility, commercial, and open-source competitor analysis. Use when asked to evaluate, validate, or score a product idea. Don't use for PRDs, go-to-market plans, or investor decks.
testing
Install local-first security hardening: pre-commit secret detection, offline dependency scans, static analysis, reports, and gated free CI. Use when hardening repos or adding security hooks. Don't use for incident response or cloud security reviews.