$npx -y skills add Svenja-dev/claude-code-skills --skill skill-doc-generatorAuto-generates standardized README documentation from SKILL.md files, validates consistency (frontmatter, descriptions, terminology), and creates usage examples. Use when documenting individual skills, generating docs for multiple skills in a directory, or validating skill qualit
| 1 | # Skill Documentation Generator |
| 2 | |
| 3 | Auto-generate high-quality README documentation for skills with built-in consistency validation and example generation. |
| 4 | |
| 5 | ## Overview |
| 6 | |
| 7 | This skill automates the creation of standardized README files for skills by analyzing SKILL.md files, extracting structure and examples, validating quality standards, and generating comprehensive documentation. It ensures consistency across skill documentation while providing actionable validation feedback. |
| 8 | |
| 9 | ## Workflow |
| 10 | |
| 11 | ### Single Skill Documentation |
| 12 | |
| 13 | Generate documentation for one skill: |
| 14 | |
| 15 | 1. **Analyze the skill**: |
| 16 | ```bash |
| 17 | python scripts/analyze_skill.py <skill_directory> |
| 18 | ``` |
| 19 | Extracts metadata, sections, code blocks, and resources. |
| 20 | |
| 21 | 2. **Validate consistency**: |
| 22 | ```bash |
| 23 | python scripts/validate_consistency.py <skill_directory> --verbose |
| 24 | ``` |
| 25 | Checks frontmatter, description quality, and terminology. |
| 26 | |
| 27 | 3. **Generate README**: |
| 28 | ```bash |
| 29 | python scripts/generate_readme.py <skill_directory> [output_path] |
| 30 | ``` |
| 31 | Creates README.md with validation results. |
| 32 | |
| 33 | ### Batch Documentation |
| 34 | |
| 35 | Document multiple skills at once: |
| 36 | |
| 37 | ```bash |
| 38 | python scripts/document_directory.py <directory> [options] |
| 39 | ``` |
| 40 | |
| 41 | **Options:** |
| 42 | - `--output <dir>`: Specify output directory |
| 43 | - `--no-recursive`: Don't search subdirectories |
| 44 | - `--no-index`: Skip index file generation |
| 45 | - `--no-validate`: Skip validation checks |
| 46 | |
| 47 | **Example:** |
| 48 | ```bash |
| 49 | # Document all user skills with validation |
| 50 | python scripts/document_directory.py /mnt/skills/user --output ./docs |
| 51 | |
| 52 | # Quick pass without validation |
| 53 | python scripts/document_directory.py ./my-skills --no-validate |
| 54 | ``` |
| 55 | |
| 56 | ## Script Reference |
| 57 | |
| 58 | ### analyze_skill.py |
| 59 | Parses SKILL.md and extracts structured information. |
| 60 | |
| 61 | **Usage**: `python scripts/analyze_skill.py <skill_directory>` |
| 62 | |
| 63 | **Returns**: |
| 64 | - Metadata (name, description) |
| 65 | - Sections and structure |
| 66 | - Code blocks with language tags |
| 67 | - Referenced resources (scripts, references, assets) |
| 68 | - Statistics (line count, section count) |
| 69 | |
| 70 | ### validate_consistency.py |
| 71 | Validates skill quality against standards defined in references/consistency-rules.md. |
| 72 | |
| 73 | **Usage**: `python scripts/validate_consistency.py <skill_directory> [--verbose]` |
| 74 | |
| 75 | **Checks**: |
| 76 | - Frontmatter completeness and format |
| 77 | - Description quality (length, clarity, triggers) |
| 78 | - Structure appropriateness |
| 79 | - Terminology consistency |
| 80 | - Resource references |
| 81 | - Code example quality |
| 82 | |
| 83 | **Severity Levels**: |
| 84 | - **ERROR**: Breaks functionality (missing required fields) |
| 85 | - **WARNING**: Quality issues (naming, unreferenced resources) |
| 86 | - **INFO**: Suggestions (style, optional improvements) |
| 87 | |
| 88 | ### generate_readme.py |
| 89 | Creates README.md from skill analysis. |
| 90 | |
| 91 | **Usage**: `python scripts/generate_readme.py <skill_directory> [output_path]` |
| 92 | |
| 93 | **Generates**: |
| 94 | - Title and description |
| 95 | - Overview from SKILL.md |
| 96 | - Trigger scenarios |
| 97 | - Structure statistics |
| 98 | - Bundled resource lists with links |
| 99 | - Key sections overview |
| 100 | - Usage examples (up to 3) |
| 101 | - Validation results (optional) |
| 102 | |
| 103 | **Template**: See references/readme-template.md for structure. |
| 104 | |
| 105 | ### document_directory.py |
| 106 | Batch processes multiple skills in a directory. |
| 107 | |
| 108 | **Usage**: `python scripts/document_directory.py <directory> [options]` |
| 109 | |
| 110 | **Features**: |
| 111 | - Recursive skill discovery |
| 112 | - Parallel validation and documentation |
| 113 | - Index generation with categorization |
| 114 | - Summary statistics |
| 115 | - Error handling per skill |
| 116 | |
| 117 | ## Quality Standards |
| 118 | |
| 119 | Validation enforces these standards: |
| 120 | |
| 121 | ### Frontmatter |
| 122 | - **name**: Lowercase with hyphens (e.g., `skill-name`) |
| 123 | - **description**: 50-500 chars, clear triggers |
| 124 | - Must start with capital letter |
| 125 | - Include "when" or "use" phrases |
| 126 | |
| 127 | ### Structure |
| 128 | - Body: 100+ chars minimum, <500 lines recommended |
| 129 | - Sections: Overview/workflow recommended |
| 130 | - Resources: All files referenced in SKILL.md |
| 131 | |
| 132 | ### Terminology |
| 133 | - Use imperative form: "Use" not "You should use" |
| 134 | - Capitalize "Claude" consistently |
| 135 | - Avoid vague terms: "various", "multiple" |
| 136 | - Active voice preferred |
| 137 | |
| 138 | See references/consistency-rules.md and references/terminology-standards.md for complete standards. |
| 139 | |
| 140 | ## Reference Files |
| 141 | |
| 142 | ### readme-template.md |
| 143 | Standard README structure and best practices. Defines: |
| 144 | - Required sections |
| 145 | - Optional sections |
| 146 | - Formatting guidelines |
| 147 | - Link conventions |
| 148 | |
| 149 | ### consistency-rules.md |
| 150 | Detailed validation criteria. Covers: |
| 151 | - Frontmatter requirements |
| 152 | - Description quality metrics |
| 153 | - Structure guidelines |
| 154 | - Resource validation |
| 155 | - Error severity definitions |
| 156 | |
| 157 | ### terminology-standards.md |
| 158 | Standard vocabulary and style guide. Includes: |
| 159 | - Writing style (imperative form) |
| 160 | - Common terms and their usage |
| 161 | - Phrases to avoid |
| 162 | - Formatting conventions |
| 163 | - Consistency checklist |
| 164 | |
| 165 | ## Examples |
| 166 | |
| 167 | ### Example 1: Document a Single Skill |
| 168 | ```bash |
| 169 | # Analyze |
| 170 | python |