AI Invocation Specification: This Skill is designed for AI. Human users only need to describe their needs in natural language, and AI automatically completes the analysis and optimization.
How to Use This Skill
Trigger Conditions
| User Input Example | AI Execution |
|---|---|
| "Check / diagnose / review / look at / analyze / evaluate xxx skill" | Run analyze.py for quality analysis |
| "Optimize / improve / fix / upgrade / refactor xxx skill" | Run optimize.py to generate optimized documentation |
Default Behavior: If the user's intent is unclear, prioritize running analyze.py (analysis scenarios account for 90%).
Execution Steps
| Scenario | Step | AI Execution Action | Specific Command |
|---|---|---|---|
| Analysis | 1 | Run analysis script | python skill-optimizer-yashu/scripts/analyze.py <skill-name> --folder <skills-folder> |
| Analysis | 2 | Parse output results | Extract the counts of errors/warnings/suggestions/hints and the detailed issue list |
| Analysis | 3 | Output analysis report | Present the results to the user according to the [Analysis Result Template] |
| Optimization | 1 | Run optimization script | python skill-optimizer-yashu/scripts/optimize.py <skill-name> --folder <skills-folder> --output /tmp/<skill-name>-optimized.md |
| Optimization | 2 | Confirm optimization is complete | Check whether the output file exists |
| Optimization | 3 | Output optimization summary | Present an overview of the optimization content and the file path to the user |
Output Templates
Analysis Result Template:
==================================================
分析结果: {等级}
==================================================
错误: {N} | 警告: {N} | 建议: {N} | 提示: {N}
发现的问题:
- {类型}: {问题描述}
- {类型}: {问题描述}
Optimization Result Template:
✅ 优化完成!
📄 优化后的文档已保存至: {文件路径}
优化内容概览:
- {优化项1}
- {优化项2}
- {优化项3}
Check Dimensions
- Frontmatter Format - Check fields such as name, description, metadata, etc.
- Progressive Disclosure Structure - Check document length and content organization
- File Reference Integrity - Check whether referenced files exist
- AI-Friendliness - Check whether AI can accurately understand and execute
- Usage Instructions Completeness - Check whether there are clear usage instructions
- Token Efficiency - Check the way information is organized
For detailed check standards, see Check Specification。
Rating Standards
| Grade | Condition | Description |
|---|---|---|
| Needs Fixing | Errors exist | Problems that must be fixed, affecting the normal use of the skill |
| Good | No errors, warnings exist | Minor issues that need attention, but do not affect use |
| Excellent | No errors/warnings, suggestions exist | There are optimization suggestions and it can be further improved |
| Very Good | No errors/warnings/suggestions, hints exist | There are minor hints and the overall quality is relatively high |
| Perfect | No issues whatsoever | Fully compliant with the specification, no issues at all |
Error handling
| Error scenario | Handling method |
|---|---|
| Skill does not exist | Indicates that the folder for the specified skill cannot be found |
| Invalid path | Indicates an invalid folder path |
| SKILL.md missing | Marked as an error, indicating that the main document is missing |
Resources
- analyze.py - Main script for analyzing skill quality
- optimize.py - Generate the optimized SKILL.md based on the analysis results
- Check specifications - Detailed inspection standards and specification description