Skill Doc Enhancer
by @834948655
Automatically analyze and enhance content-short SKILL.md files by analyzing skill directory structure, adding usage examples, script documentation, common us...
clawhub install skill-doc-enhancerπ About This Skill
name: skill-doc-enhancer description: Automatically analyze and enhance content-short SKILL.md files by analyzing skill directory structure, adding usage examples, script documentation, common use cases, and best practices. Use when a skill's SKILL.md is too short (less than 3000 characters), lacks sufficient examples, missing script documentation, or needs content enrichment while preserving existing structure.
Skill Doc Enhancer
Automatically analyze and enhance SKILL.md files that are too short or lack sufficient documentation.
When to Use
Use this skill when:
Enhancement Process
Step 1: Analyze Current State
Run the analysis script to understand what needs enhancement:
python3 scripts/analyze_skill.py
This will output:
Step 2: Generate Enhancement Content
Based on the analysis, the script will suggest:
1. Directory Structure Analysis
- List all files in scripts/, references/, assets/
- Identify undocumented resources
2. Script Documentation
- For each script in scripts/, extract:
- Purpose and functionality
- Usage syntax
- Example commands
- Expected outputs
3. Usage Examples - Common task patterns - Input/output examples - Error handling examples
4. Best Practices - Recommended workflows - Common pitfalls to avoid - Tips for effective usage
Step 3: Apply Enhancements
The enhancement script can automatically append content:
python3 scripts/enhance_skill.py [--dry-run]
Options:
--dry-run: Preview changes without modifying files--sections examples,scripts,best-practices: Choose which sections to enhanceEnhancement Categories
1. Script Documentation
For skills with a scripts/ directory, add:
## Scripts Referencescript-name.py
Purpose: Brief description of what the script doesUsage:
bash
python3 scripts/script-name.py [arguments]
Examples:
bash
Example 1: Basic usage
python3 scripts/script-name.py input.txtExample 2: With options
python3 scripts/script-name.py input.txt --output result.txt2. Usage Examples
Add concrete examples showing real-world usage:
## Usage ExamplesExample 1: [Task Name]
Scenario: Describe when this example appliesInput:
File: example.txt
Content: ... Command:
bash
Command to execute
Output:
Expected output
Example 2: [Another Task]
...
3. Best Practices
Document recommendations and pitfalls:
## Best PracticesDo's
Recommendation 1
Recommendation 2 Don'ts
Pitfall 1 and why to avoid it
Pitfall 2 and why to avoid it Tips
Pro tip for advanced usage
Performance optimization suggestion
4. Common Use Cases
List typical scenarios where the skill applies:
## Common Use Cases1. [Use Case 1]: Brief description
- When to use: Context
- Expected outcome: Result
2. [Use Case 2]: Brief description
- When to use: Context
- Expected outcome: Result
Manual Enhancement Guidelines
When automatic enhancement isn't sufficient:
1. Preserve Existing Structure: Don't reorganize unless necessary 2. Append, Don't Replace: Add new content after existing sections 3. Match Style: Follow the existing tone and formatting 4. Be Specific: Include concrete file names, paths, and commands 5. Test Examples: Ensure all code examples work as documented
Quality Checklist
After enhancement, verify:
scripts/ are documentedScripts
analyze_skill.py
Analyzes a skill directory and reports enhancement opportunities.Usage:
python3 scripts/analyze_skill.py /path/to/skill-directory
Output: JSON report with:
char_count: Current SKILL.md character counthas_examples: Whether usage examples existscripts_documented: Whether scripts are documentedhas_best_practices: Whether best practices section existsrecommendations: List of suggested enhancementsenhance_skill.py
Automatically enhances SKILL.md with missing content.Usage:
python3 scripts/enhance_skill.py /path/to/skill-directory [options]
Options:
--dry-run: Preview changes without writing--sections SECTIONS: Comma-separated list of sections to enhanceexamples, scripts, best-practices, use-cases
- Default: all sectionsExample:
# Preview enhancements
python3 scripts/enhance_skill.py /path/to/skill --dry-runEnhance only examples and scripts
python3 scripts/enhance_skill.py /path/to/skill --sections examples,scripts
Example Enhancement Workflow
# 1. Analyze the skill
python3 scripts/analyze_skill.py skills/nano-pdfOutput:
{
"skill_name": "nano-pdf",
"char_count": 1850,
"has_examples": false,
"scripts_documented": false,
"has_best_practices": false,
"recommendations": [
"Add usage examples section",
"Document scripts/pdf_utils.py",
"Add best practices section"
]
}
2. Preview enhancements
python3 scripts/enhance_skill.py skills/nano-pdf --dry-run3. Apply enhancements
python3 scripts/enhance_skill.py skills/nano-pdf4. Review and edit manually if needed
Edit skills/nano-pdf/SKILL.md
Notes
β‘ When to Use
π Tips & Best Practices
4. Common Use Cases
List typical scenarios where the skill applies:
markdown