skills/optimise-skill/SKILL.md
Audits and rewrites Agent Skills (SKILL.md + supporting files) for clarity, token efficiency, and progressive disclosure. Use when the user asks to optimize, improve, review, or clean up a skill. Do NOT use for creating new skills from scratch or for editing files that are not part of a skill directory.
npx skillsauth add laitszkin/apollo-toolkit optimise-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze a skill's full directory and produce an optimized rewrite. The goal is not to change what the skill does — it's to make the skill easier for an LLM to understand and execute effectively, by removing redundancy, separating concerns, and replacing rigid instructions with guiding principles. Every change must be gated by verification.
A well-structured skill separates three distinct concerns:
| Layer | What it contains | Where it lives | | -------------- | ------------------------------------------------------ | --------------- | | Behavioral | How to think, what to check, what principles to follow | SKILL.md | | Format | What the output structure looks like | Template files | | Tool | CLI flags, API params, external commands | Reference files |
The most common problem in unoptimized skills is mixing these layers — templates that tell the agent what to do, SKILL.md that describes output formats, references that contain behavioral rules. Your job is to untangle them.
Read the full skill directory — SKILL.md, templates, references. Before optimizing, understand:
The description in YAML frontmatter is the only metadata the agent uses to decide whether to load this skill. If it's wrong, the skill is invisible.
Check the existing description against these criteria:
If the description fails any criterion, rewrite it. This is the highest-leverage single change you can make to a skill — a bad description makes the entire skill body invisible.
For each instruction in SKILL.md, ask: "Would a frontier model do this correctly without this instruction?"
If yes → delete it. Instructions the model would follow anyway waste tokens and dilute the rules that actually matter.
Examples of content to delete:
git diff to see changes" — the model knows gitKeep only what's project-specific, non-obvious, or where the model's default behavior would be WRONG.
Go through every section across all files and classify it as behavioral, format, or tool guidance. When you find content in the wrong layer, move it:
references/The key question: "If I removed this file, what would the agent lose?" If the answer is "behavioral guidance," that content belongs in SKILL.md. "Structure to fill" → template. "CLI flags to look up" → references.
For each field, section, and table in the skill's output, ask who actually reads it downstream. Prune what nobody consumes:
Compare closely related rules across files. Contradictions confuse agents. Look for:
After untangling, restructure SKILL.md so it guides the agent's thinking rather than scripting every keystroke. Use the structure in references/example_skill.md as a format reference.
Principles:
Review the original skill for environment-specific facts that would break the model's default assumptions. These are the highest-value content per token. Add a ## Gotchas section to SKILL.md.
Good gotchas (keep):
.tsx files"Bad gotchas (delete — too vague):
Verification is not optional. An unverified optimization is indistinguishable from degradation. If any check fails, go back to the relevant phase and fix it, then re-run the check.
Paste this prompt into the conversation and answer it honestly for the optimized skill:
I am evaluating an Agent Skill's frontmatter. Agents decide whether to load
this skill based entirely on the YAML metadata below.
---
name: [insert name]
description: [insert description]
---
Based strictly on this metadata:
1. Generate 3 realistic user prompts that SHOULD trigger this skill.
2. Generate 3 user prompts that sound similar but should NOT trigger.
3. Critique the description: too broad? too narrow? missing negative triggers?
4. Propose a revised description if improvements are needed.
If the description triggers incorrectly (false positives or false negatives), fix it now.
Paste this prompt into the conversation with the full optimized SKILL.md:
Act as an autonomous agent that has just triggered this skill. Simulate
execution step-by-step on a typical input.
For each step, write your internal monologue:
1. What exactly are you doing?
2. Which specific file are you reading or running?
3. Flag any Execution Blockers: exact lines where you must guess or
hallucinate because the instructions are ambiguous.
If the simulated agent guesses or hallucinates at any step, that instruction needs to be clearer. Fix it.
Paste this prompt into the conversation:
Switch roles. Act as a ruthless QA tester. Your goal is to break this skill.
Ask 3-5 highly specific questions about edge cases, failure states,
or missing fallbacks.
Focus on:
- What if a referenced file is missing or renamed?
- What if the input violates assumptions baked into the skill?
- Are there implicit environment or toolchain assumptions?
- What happens if a script fails mid-execution?
Do not fix these issues yet. Just ask the numbered questions and wait
for me to answer them.
Answer the questions, then apply the fixes to the skill.
Final pass:
Output the complete optimized skill. If the original skill had supporting files (templates, references, scripts), include the updated versions of those too. Flag any files that should be deleted because their content was merged into SKILL.md or pruned.
references/example_skill.md — Format reference for optimized SKILL.md structuredevelopment
Guides the agent through creating a new Agent Skill from scratch. Use when the user wants to build a skill, create a new skill, scaffold a skill directory, or author a SKILL.md. Do NOT use for optimising or rewriting existing skills — use 'optimise-skill' for that. Do NOT use for editing files that are already part of a skill. Do NOT use for creating non-skill content like documentation, scripts, or project files.
development
Guides the agent through creating a new Agent Skill from scratch. Use when the user wants to build a skill, create a new skill, scaffold a skill directory, or author a SKILL.md. Do NOT use for optimising or rewriting existing skills — use 'optimise-skill' for that. Do NOT use for editing files that are already part of a skill. Do NOT use for creating non-skill content like documentation, scripts, or project files.
development
Review a pull request — interactive PR selection via `gh`, 4-dimension code review (hallucinated code, architecture, performance, test validity), then post severity-graded comments with fix suggestions on the PR. Not for spec-based review — use `review` instead.
tools
協助完成自動化版本發佈。同步文檔、更新版本號、推送 tag 並建立 GitHub Release。