skill-optimizer-yashu

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill 优化器

Skill Optimizer

AI 调用规范:本 Skill 专为 AI 设计,人类用户只需用自然语言描述需求,AI 自动完成分析和优化。
AI Calling Specification: This Skill is designed exclusively for AI. Human users only need to describe their requirements in natural language, and the AI will automatically complete analysis and optimization.

如何使用这个 Skill

How to Use This Skill

触发条件

Trigger Conditions

用户输入示例AI 执行
"检查 / 诊断 / review / 看看 / 分析 / 评估 xxx skill"运行 analyze.py 进行质量分析
"优化 / 改进 / 修复 / 升级 / 重构 xxx skill"运行 optimize.py 生成优化后的文档
默认行为:如果用户意图不明确,优先执行 analyze.py(分析场景占 90%)。
User Input ExamplesAI 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 documents
Default Behavior: If the user's intent is unclear, prioritize executing analyze.py (analysis scenarios account for 90%).

执行步骤

Execution Steps

场景步骤AI 执行动作具体命令
分析1运行分析脚本
python skill-optimizer-yashu/scripts/analyze.py <skill-name> --folder <skills-folder>
分析2解析输出结果提取错误/警告/建议/提示数量及详细问题列表
分析3输出分析报告按【分析结果模板】向用户展示结果
优化1运行优化脚本
python skill-optimizer-yashu/scripts/optimize.py <skill-name> --folder <skills-folder> --output /tmp/<skill-name>-optimized.md
优化2确认优化完成检查输出文件是否存在
优化3输出优化摘要向用户展示优化内容概览和文件路径
ScenarioStepAI ActionSpecific Command
Analysis1Run analysis script
python skill-optimizer-yashu/scripts/analyze.py <skill-name> --folder <skills-folder>
Analysis2Parse output resultsExtract the number of errors/warnings/suggestions/hints and detailed problem lists
Analysis3Output analysis reportDisplay results to users according to the [Analysis Result Template]
Optimization1Run optimization script
python skill-optimizer-yashu/scripts/optimize.py <skill-name> --folder <skills-folder> --output /tmp/<skill-name>-optimized.md
Optimization2Confirm optimization completionCheck if the output file exists
Optimization3Output optimization summaryDisplay an overview of optimized content and file path to users

输出模板

Output Templates

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

发现的问题:
  - {类型}: {问题描述}
  - {类型}: {问题描述}
优化结果模板
✅ 优化完成!
📄 优化后的文档已保存至: {文件路径}

优化内容概览:
- {优化项1}
- {优化项2}
- {优化项3}
Analysis Result Template:
==================================================
Analysis Result: {Level}
==================================================
Errors: {N} | Warnings: {N} | Suggestions: {N} | Hints: {N}

Issues Found:
  - {Type}: {Issue Description}
  - {Type}: {Issue Description}
Optimization Result Template:
✅ Optimization Completed!
📄 Optimized document saved to: {File Path}

Optimization Overview:
- {Optimization Item 1}
- {Optimization Item 2}
- {Optimization Item 3}

检查维度

Inspection Dimensions

  1. Frontmatter 格式 - 检查 name、description、metadata 等字段
  2. 渐进式披露结构 - 检查文档长度和内容组织
  3. 文件引用完整性 - 检查引用的文件是否存在
  4. AI 友好性 - 检查 AI 能否准确理解和执行
  5. 使用说明完整性 - 检查是否有清晰的使用说明
  6. Token 效率 - 检查信息组织方式
详细检查标准参见 检查规范
  1. Frontmatter Format - Check fields such as name, description, metadata
  2. Progressive Disclosure Structure - Check document length and content organization
  3. File Reference Integrity - Check if referenced files exist
  4. AI-friendliness - Check whether AI can accurately understand and execute
  5. Completeness of Usage Instructions - Check if there are clear usage instructions
  6. Token Efficiency - Check the way information is organized
For detailed inspection standards, refer to Check Specification.

评级标准

Rating Standards

等级条件说明
需修复存在错误必须修复的问题,影响 skill 正常使用
良好无错误,有警告有小问题需要关注,但不影响使用
优秀无错误/警告,有建议有优化建议,可以进一步提升
很好无错误/警告/建议,有提示有轻微提示,整体质量较高
完美无任何 issues完全符合规范,无任何问题
LevelConditionsExplanation
Needs FixErrors existCritical issues that must be fixed, affecting normal use of the skill
GoodNo errors, with warningsMinor issues that need attention but do not affect usage
ExcellentNo errors/warnings, with suggestionsOptimization suggestions to further improve quality
Very GoodNo errors/warnings/suggestions, with hintsMinor hints, overall quality is high
PerfectNo issues at allFully compliant with specifications, no problems

错误处理

Error Handling

错误场景处理方式
Skill 不存在提示找不到指定 skill 的文件夹
路径错误提示无效的文件夹路径
SKILL.md 缺失标记为错误,提示缺少主文档
Error ScenarioHandling Method
Skill does not existPrompt that the specified skill folder cannot be found
Invalid pathPrompt for invalid folder path
SKILL.md missingMark as error, prompt for missing main document

Resources

Resources

  • analyze.py - 分析 skill 质量的主脚本
  • optimize.py - 根据分析结果生成优化后的 SKILL.md
  • 检查规范 - 详细的检查标准和规范说明
  • analyze.py - Main script for analyzing skill quality
  • optimize.py - Generate optimized SKILL.md based on analysis results
  • Check Specification - Detailed inspection standards and specification descriptions