SuperAPI AI Directory

skill-optimizer-yashu

General & other

View repository

Updated 10-16 08:46

About this skill

Skill Optimizer

AI Invocation Specification: This Skill is designed specifically 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

Triggering Conditions

User Input Examples AI Execution
"check / diagnose / review / look at / analyze / evaluate xxx skill" Run analyze.py to perform 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 completion Check whether the output file exists
Optimization 3 Output optimization summary Show the user an overview of the optimized content and the file path

Output Template

Analysis Result Template:

==================================================
分析结果: {等级}
==================================================
错误: {N} | 警告: {N} | 建议: {N} | 提示: {N}

发现的问题:
  - {类型}: {问题描述}
  - {类型}: {问题描述}

Optimization Result Template:

✅ 优化完成!
📄 优化后的文档已保存至: {文件路径}

优化内容概览:
- {优化项1}
- {优化项2}
- {优化项3}

Inspection Dimensions

  1. Frontmatter Format - Check fields such as name, description, metadata
  2. Progressive Disclosure Structure - Check document length and content organization
  3. File Reference Completeness - Check whether referenced files exist
  4. AI-Friendliness - Check whether AI can accurately understand and execute
  5. Completeness of Usage Instructions - Check whether there are clear usage instructions
  6. Token Efficiency - Check the way information is organized

For detailed inspection standards, see Inspection Specification。

Rating Standards

Level Condition Description
Needs Fixing Errors exist Issues that must be fixed, affecting the normal use of the skill
Good No errors, warnings exist There are minor issues that need attention, but they do not affect use
Excellent No errors/warnings, suggestions exist There are optimization suggestions that can be further improved
Very Good No errors/warnings/suggestions, hints exist There are minor hints, 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 Prompt that the folder for the specified skill cannot be found
Invalid path Prompt that the folder path is invalid
SKILL.md missing Mark as error, prompt that the main document is missing

Resources

  • analyze.py - Main script for analyzing skill quality
  • optimize.py - Generate an optimized SKILL.md based on the analysis results
  • Check specification - Detailed inspection standards and specification description