skill-optimizer

Optimizes SKILL.md bodies against benchmarks using validation-gated text-space optimization.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/AMC-JTC/gbrain-1 --skill skill-optimizer-amc-jtc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skill-optimizer
Source: https://github.com/AMC-JTC/gbrain-1/tree/main/plugin/skills/skill-optimizer
Command: npx skills add https://github.com/AMC-JTC/gbrain-1 --skill skill-optimizer-amc-jtc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Improving an AI agent skill's quality is usually guesswork: you edit the prompt, eyeball a few outputs, and hope it got better. This Skill treats SKILL.md as trainable parameters of a frozen agent and runs a benchmark-driven optimization loop with mandatory validation gating, so only edits that measurably improve scores are committed. ## Core Features & Use Cases - Validation-gated optimization loop: Runs forward rollouts, reflection-based edits, and a median-of-3 plus epsilon=0.05 validation gate before any SKILL.md rewrite is accepted, with atomic versioned snapshots and an audit trail. - Benchmark bootstrapping: Generates a starter benchmark of ~15 tasks with rule judges directly from a SKILL.md via --bootstrap-from-skill, requiring human review and strengthening before optimization. - Safety guardrails for bundled skills: Refuses to mutate shipped skills in place unless both --allow-mutate-bundled and an independent held-out set are provided; otherwise writes a proposed.md for review. - Use Case: You authored a meeting-notes skill and want it to produce tighter agendas. Run the bootstrap, strengthen the generated judges, then launch the optimizer with a 1:1:1 split to iteratively improve the skill body against your benchmark. ## Quick Start Ask the agent to run skillopt on your skill, for example: optimize my meeting-notes skill against its benchmark using gbrain skillopt with a dry run first to preview cost.

Frequently Asked Questions about skill-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize a skill that has no benchmark yet?

Run gbrain skillopt X --bootstrap-from-skill to generate about 15 starter tasks with rule judges from the SKILL.md. Review and strengthen the judges, delete the sentinel line, then rerun with --bootstrap-reviewed --split 1:1:1.

How does the skillopt validation gate work?

Every candidate edit must beat the baseline by median-of-3 scoring plus an epsilon of 0.05 on the selection set before SKILL.md is rewritten. This prevents the optimizer from accepting noise as improvement.

Can skillopt modify skills bundled with gbrain?

Not by default; bundled skills only get a proposed.md for review. In-place mutation requires both --allow-mutate-bundled and --held-out with at least five benchmark-disjoint tasks, otherwise the run hard-refuses.

Why does skillopt fail with d_sel_too_small?

The validation set fell below the five-task minimum. With a 15-task bootstrapped benchmark, the default 4:1:5 split yields one validation task, so you must pass --split 1:1:1 instead.

What parts of SKILL.md does the optimizer change?

Only the Markdown body is edited. Frontmatter fields such as triggers and brain_first are invariant, so routing behavior stays unchanged across optimization runs.

How do I preview skillopt cost before running?

Add --dry-run to the command. The cost preflight estimates spend and refuses to proceed if it exceeds the --max-cost-usd budget you set.