Automatically analyze and enhance SKILL.md files that are too short or lack sufficient documentation.
Use this skill when:
Run the analysis script to understand what needs enhancement:
python3 scripts/analyze_skill.py <path/to/skill-directory>
This will output:
Based on the analysis, the script will suggest:
scripts/, references/, assets/scripts/, extract:The enhancement script can automatically append content:
python3 scripts/enhance_skill.py <path/to/skill-directory> [--dry-run]
Options:
--dry-run: Preview changes without modifying files--sections examples,scripts,best-practices: Choose which sections to enhanceFor skills with a scripts/ directory, add:
## Scripts Reference
### script-name.py
**Purpose**: Brief description of what the script does
**Usage**:
python3 scripts/script-name.py [arguments]
**Examples**:
python3 scripts/script-name.py input.txt
python3 scripts/script-name.py input.txt --output result.txt
Add concrete examples showing real-world usage:
## Usage Examples
### Example 1: [Task Name]
**Scenario**: Describe when this example applies
**Input**:
- File: `example.txt`
- Content: ...
**Command**:
**Output**:
Expected output
### Example 2: [Another Task]
...
Document recommendations and pitfalls:
## Best Practices
### Do'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
List typical scenarios where the skill applies:
## Common Use Cases
1. **[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
When automatic enhancement isn't sufficient:
After enhancement, verify:
scripts/ are documentedAnalyzes 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 enhancementsAutomatically 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-casesExample:
# Preview enhancements
python3 scripts/enhance_skill.py /path/to/skill --dry-run
# Enhance only examples and scripts
python3 scripts/enhance_skill.py /path/to/skill --sections examples,scripts
# 1. Analyze the skill
python3 scripts/analyze_skill.py skills/nano-pdf
# Output:
# {
# "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-run
# 3. Apply enhancements
python3 scripts/enhance_skill.py skills/nano-pdf
# 4. Review and edit manually if needed
# Edit skills/nano-pdf/SKILL.md
共 1 个版本