当前位置: 首页 > Skill >

skill-optimize

skill-optimize

skill-optimize

Audit and improve existing Agent Skills (SKILL.md files) against the agentskills.io standard. Use this skill whenever the user wants to optimize, polish, improve, audit, review, fix, or refine an existing skill — even if they don't say "skill optimizer" explicitly. Triggers on phrases like "improve my skill", "audit SKILL.md", "make my skill trigger better", "fix the description", "is my skill well written?", "review this skill", "polish my skill", "this skill underperforms", or any request to u

1.0.0 2026.11.14 675
获取Skill文件查看使用说明
作 者:顾舟 许可证: 更新时间:2026.11.14
本文目录展开

Skill Optimizer

A focused, opinionated tool for auditing and improving existing Agent Skills. Where skill-creator covers the full create-from-scratch workflow (interview → draft → eval → iterate), this skill is the lighter, faster counterpart you reach for when the skill already exists and the question is "how do I make it better?"

The optimization framework is built directly on the three pillars from agentskills.io:

  1. Specification — Is the file structurally valid? Does the frontmatter conform? Are naming and length rules respected?
  2. Best Practices — Is the content clear, scoped, and well-organized? Does it follow the writing patterns the agentskills.io guide recommends?
  3. Description Optimization — Will the skill trigger on the right prompts and stay quiet on the wrong ones? Are the right keywords and intent signals present?

When the user wants full eval-driven iteration with subagent runs, baseline comparisons, and an HTML viewer, defer to the skill-creator skill. Use this skill for everything else.

When to use

Use this skill for any of:

  • "Audit my skill against the spec" / "is this SKILL.md well formed?"
  • "Improve the triggering of my skill" / "my skill isn't firing on the right prompts"
  • "Make the description better" / "rewrite the frontmatter description"
  • "This skill is too long, help me trim it"
  • "Review this skill before I publish it"
  • "Add examples and gotchas to my skill"
  • Any request to edit, polish, or refine an existing SKILL.md

Do not use this skill to create a new skill from scratch — for that, start with skill-creator. If the user has a draft and wants to run evals, hand off to skill-creator after the first pass here.

The 3-dimension audit

Every optimization pass runs the same three dimensions. The order matters — fix Specification issues first, then Best Practices, then Description. A skill that violates the spec won't even load; a skill with bad content won't produce good outputs; a skill with a bad description won't be reached at all.

Dimension 1: Specification compliance

The spec is binary — either the file is valid or it isn't. Read the agentskills.io Specification in detail at references/specification-checklist.md. The audit covers:

  • SKILL.md exists at the skill root.
  • YAML frontmatter is present, well-formed, and has the required name and description fields.
  • name is kebab-case, 1–64 chars, no leading/trailing hyphens, no consecutive hyphens, matches the parent directory.
  • description is 1–1024 chars, no angle brackets, non-empty.
  • compatibility (if present) is 1–500 chars.
  • No unexpected frontmatter keys — only name, description, license, allowed-tools, metadata, compatibility.
  • Body length stays under ~500 lines (recommendation) so the full file fits comfortably when activated.
  • File references are one level deep from SKILL.md — no references/sub/deep/file.md chains.

Run scripts/audit_skill.py <path> to perform the mechanical checks. It returns the same errors and warnings the agentskills.io validator would catch, plus a few content-level checks (line count, body structure).

Dimension 2: Best practices alignment

Best practices are softer — a skill can be spec-valid and still be vague, over-long, or unscoped. Read the detailed audit at references/best-practices-checklist.md. The key axes:

  • Scope: One coherent unit of work. If the skill covers two unrelated domains, flag it for splitting.
  • Specificity calibration: Flexible instructions for flexible tasks, prescriptive instructions for fragile ones. Rigid ALWAYS/NEVER directives are a yellow flag — check whether the underlying reason is explained.
  • Default + escape hatch: When multiple tools or approaches could work, the skill should pick a default and mention alternatives briefly, not present them as equal options.
  • Procedure over declaration: Skills should teach the model how to approach a class of problems, not just produce a specific answer.
  • Gotchas section: Non-obvious, environment-specific corrections the model would get wrong without help. This is often the highest-value content in a skill.
  • Output templates: When the skill produces structured output, a template is more reliable than prose describing the format.
  • Progressive disclosure: Long skills move reference material to references/ with explicit triggers (e.g. "Read references/<topic>.md if the API returns a non-200 status").
  • Token budget: Add what the agent lacks, omit what it knows. Cut any sentence that explains what an LLM already knows (e.g., what a PDF is).

For each axis, give a verdict: Pass / Warning / Fail with one sentence of evidence.

Dimension 3: Description optimization

The description field is the entire triggering mechanism. The agentskills.io guide emphasizes that agents only consult skills for tasks requiring knowledge beyond what they can handle alone — so simple one-step requests may not trigger even a perfect description. The audit covers the wording; triggering accuracy in practice also depends on the user actually having non-trivial work to do.

Read the full guide at references/description-guide.md. The audit checks:

  • Imperative framing: "Use this skill when..." not "This skill does..."
  • User intent over implementation: Describes what the user is trying to achieve, not internal mechanics.
  • Pushy coverage: Explicitly lists contexts where the skill applies, including cases where the user doesn't name the domain directly ("even if they don't say 'X' explicitly").
  • Concrete keywords: Specific phrases the user would actually type — file types, domain names, action verbs. Avoid generic verbs like "handle", "process", "deal with".
  • Length: Stays under 1024 chars. Long descriptions are usually a sign of trying to enumerate every possible trigger — better to generalize.
  • No angle brackets: Spec rule, will fail validation.
  • No vague verbs: "Helps with PDFs" → "Extracts text and tables from PDFs, fills forms, merges files. Use when working with PDF documents."

The output of this dimension is a list of specific edits to the description, often in before/after form.

Workflow

A single optimization pass follows this sequence. Skip steps only if the user is explicit ("just fix the description").

Step 1: Capture intent (always)

Ask the user one focused question if it's not obvious: What problem are you trying to solve with this skill? Common intents:

  • "It doesn't trigger when it should" → focus on Dimension 3.
  • "The output quality is inconsistent" → focus on Dimension 2.
  • "I want to publish it / the spec linter is failing" → focus on Dimension 1.
  • "All of the above" → run the full audit.

Don't ask more than one question at a time. The user's intent shapes which dimensions get the deepest treatment.

Step 2: Locate and snapshot

  • Find the target SKILL.md. The user usually points at it directly. If not, search common locations: ~/.claude/skills/, ~/.agents/skills/, project-local .claude/skills/, plugin caches.
  • Read the file in full before judging it.
  • Snapshot the original (e.g., copy to <workspace>/original-SKILL.md) so the user can diff the changes. Don't write back to a read-only path without copying first.

Step 3: Run the audit

Read the relevant reference checklist for each dimension as you go. Use the bundled scripts/audit_skill.py for the mechanical (Dimension 1) checks — it produces a structured pass/fail list. For Dimensions 2 and 3, do them by reading and applying the checklist; LLMs are better judges of content quality than regex.

Step 4: Generate the report

Use the template at assets/report-template.md. Fill in:

  • Findings grouped by dimension, each with a severity (Blocker / Major / Minor / Nit) and a one-sentence evidence statement.
  • Proposed edits as concrete before/after diffs.
  • Effort estimate: trivial edit / refactor / rewrite.

The report is what the user reviews and approves. Don't apply changes silently.

Step 5: Apply with approval

Walk through each proposed edit with the user. For each:

  • Show the diff.
  • Explain why the change improves the skill (e.g., "this adds the 'even if you don't say CSV' pattern that boosts trigger recall on near-miss queries").
  • Wait for approval.

Apply all approved edits, then re-run scripts/audit_skill.py to confirm the result is still spec-valid.

Step 6: Optional — hand off to skill-creator for eval

If the user wants to verify the improvements actually change behavior (not just structure), hand off to skill-creator. That skill's eval-driven iteration is the right tool for measuring output quality, not this one. This skill optimizes the artifact; skill-creator measures the outcome.

Outputs the user should expect

A single optimization pass produces:

  1. A report (markdown, structured by dimension) with severity-ranked findings.
  2. A set of proposed edits as diffs.
  3. After approval, an updated SKILL.md plus a validation pass confirming the file is still spec-valid.

It does not produce: eval runs, baseline comparisons, triggering-rate measurements. Those are skill-creator's job.

Common anti-patterns to flag

These come up over and over. When you see them, name them explicitly — the user is more likely to act on a named pattern than a generic "this is unclear."

  • Vague verb syndrome: "Helps with X", "Processes X", "Manages X". Replace with the specific operations the skill performs.
  • Generic best-practices skill: A skill that says "follow best practices for X" without any of your project's specifics. The agentskills.io guide is explicit: skills grounded in real expertise outperform ones synthesized from generic references. If a skill could apply to any project, it's probably not pulling its weight.
  • Kitchen-sink skill: One skill that covers three domains. Flag for splitting — multiple narrow skills beat one broad one.
  • Tutorial instead of skill: The body explains what a concept is (what a PDF is, how HTTP works) instead of focusing on what the model wouldn't know. Cut the background.
  • Bait description: A description that lists every conceivable trigger keyword in a comma-separated list, hoping to match anything. This is overfitting — generalize to categories instead.
  • Missing gotchas: A skill that doesn't list the non-obvious things the model would get wrong. The gotchas section is often the highest-leverage content.
  • No examples: Output formats and edge cases are easier to convey with concrete examples than with prose.
  • Body longer than 500 lines: Push detailed reference material to references/ and tell the model when to read each file.

For the full list and how to fix each, see references/common-issues.md.

Bundled resources

  • references/specification-checklist.md — Detailed Dimension 1 audit checks.
  • references/best-practices-checklist.md — Detailed Dimension 2 audit checks.
  • references/description-guide.md — Detailed Dimension 3 audit guide.
  • references/common-issues.md — Catalog of recurring problems and their fixes.
  • scripts/audit_skill.py — Programmatic Dimension 1 checks (spec + body length).
  • assets/report-template.md — The report structure to fill in for the user.

Read the relevant reference file before auditing in that dimension. Don't try to hold all four checklists in your head at once.

Communicating with the user

Match the user's familiarity. Most users optimizing a skill know what YAML and frontmatter are; some don't. When in doubt:

  • "frontmatter" / "kebab-case" → safe to use without definition.
  • "trigger rate" / "eval" / "assertion" → brief definition on first use.
  • "progressive disclosure" → worth a one-sentence definition; it's the central concept.

The user is iterating on an artifact they care about. Be direct about what's wrong and why. Don't pad the report with "great question!" — they want signal.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,016
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,004
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,002
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,001
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,001
PHP集成RabbitMQ实现消息队列的完整步骤

使用 php-amqplib 库,通过建立连接、声明交换机与队列并绑定,即可在 PHP 中实现消息的发送与消费。

2026.05.24 1,001
Skill 文件
  • SKILL.md
    • Skill Optimizer
    • When to use
    • The 3-dimension audit
      • Dimension 1: Specification compliance
      • Dimension 2: Best practices alignment
      • Dimension 3: Description optimization
    • Workflow
      • Step 1: Capture intent (always)
      • Step 2: Locate and snapshot
      • Step 3: Run the audit
      • Step 4: Generate the report
      • Step 5: Apply with approval
      • Step 6: Optional — hand off to skill-creator for eval
    • Outputs the user should expect
    • Common anti-patterns to flag
    • Bundled resources
    • Communicating with the user
  • 项目或源文件

相关 Skill

更多
My skill My skill 捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
Skill Optimizer Skill Optimizer 审计并改进现有Agent技能(SKILL.md文件),使其符合agentskills.io标准。在用户需要优化、完善或提升技能时使用本技能。
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。