
Skill Optimizer
Tunes an existing agent skill's SKILL.md against a benchmark, keeping only validated improvements.
- Repository
- garrytan/gbrain
- Stars
- 31,447
- Licence
- MIT
- Files
- 1 file
What it does
Once installed, the agent can take a skill you already have and try to improve its instructions automatically. It generates a starter test set (benchmark) from the skill, lets you strengthen the tests, then runs repeated rounds of rewriting the skill's body text and keeps a change only if it scores better on a held-out validation set. Frontmatter routing settings such as triggers are not changed, and bundled skills are protected from in-place rewrites unless you pass explicit flags and a separate held-out set.
Great for
- Developers maintaining custom agent skills in the gbrain ecosystem who want measurable quality gains
- Teams re-tuning a skill after switching the target model
- Users who already have a benchmark file and want to iterate on a skill's wording
Skip it if
- Anyone without the gbrain CLI installed, since the skill calls gbrain skillopt commands that the SKILL.md alone cannot run; it is not useful without that tooling
- Skills you do not own or want to rewrite automatically: bundled skills need --allow-mutate-bundled and a held-out set, and auto-rewrites can drift from intent if judges are weak
- Quick one-off edits to a skill, because the pipeline makes many LLM calls and can be costly (it has a cost preflight and --max-cost-usd cap, but still spends money)
Try asking
- “Optimize this skill: skills/meeting-notes”
- “Make the skill better, it keeps missing the action items section”
- “Bootstrap a benchmark for my new invoice-summary skill, then run skillopt with the 1:1:1 split”
- “Run skillopt for the research-brief skill in dry-run mode to preview cost first”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
skill-optimizer.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip skill-optimizer.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip skill-optimizer.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Always review and strengthen the auto-generated judges before deleting the sentinel line; the generated checks are described as weak drafts.
- Run with --dry-run first to preview cost, and set --max-cost-usd to cap spending.
- Use --split 1:1:1 for a small starter benchmark of about 15 tasks, since the default split needs around 50 tasks.
What's inside
- SKILL.md
Redistributed unmodified from garrytan/gbrain under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.