[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6N0DBQ5P58YVPNEK966GD2Z":3,"skill-same:01M6N0DBQ5P58YVPNEK966GD2Z":96},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":6,"ownerHtmlUrl":69,"ownerBlogUrl":70,"ownerDescription":71,"updatedAt":72,"install":73,"resources":85},"01M6N0DBQ5P58YVPNEK966GD2Z","skill-optimizer",null,"Self-evolving skill optimization via SkillOpt-paper-grounded text-space optimizer.","garrytan\u002Fgbrain","garrytan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F19957?v=4","01M6DJCCDDG53MTYYRTXAXFG17","Garry Tan","01M6MZQZCEN3RRMD33E1X9ZZR9",32847,"MIT","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Fskill-optimizer\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"skill optimizer","optimizer","paper","space","when","skill optimization","for","true","make","tune","via","run","SkillOpt","self","optimize","use","user","text","Optimization","benchmark","2026-11-10 10:12:30",false,"---\nname: skill-optimizer\nversion: 0.1.0\ndescription: Self-evolving skill optimization via SkillOpt-paper-grounded text-space optimizer.\ntriggers:\n  - \"optimize this skill\"\n  - \"tune the skill against the benchmark\"\n  - \"make the skill better\"\n  - \"run skillopt\"\n  - \"skillopt for\"\nmutating: true\nbrain_first: exempt\nwhen_to_use: \"Use when the user asks: \\\"optimize this skill\\\", \\\"tune the skill against the benchmark\\\", \\\"make the skill better\\\", \\\"run skillopt\\\", \\\"skillopt for\\\".\"\n---\n\n# Skill Optimizer\n\nSelf-evolving skill optimization. Treats SKILL.md as the trainable parameters\nof a frozen agent. Validation-gated, budget-capped, atomic-versioned.\n\nBased on SkillOpt (arXiv 2605.23904, Microsoft Research, May 2026).\n\n## When to invoke this skill\n\nThe user wants to:\n- Improve an existing skill's execution quality against a benchmark\n- Bootstrap a benchmark file for a new skill\n- Re-tune a skill after switching target models\n\n## Iron Law\n\n- **Validation gating is MANDATORY.** Every candidate must clear median-of-3\n  + epsilon=0.05 margin against the sel-set before SKILL.md gets rewritten.\n- **Frontmatter mutation is FORBIDDEN.** The optimizer only edits the body.\n  Routing surface (`triggers:`, `brain_first:`) stays invariant.\n- **Bundled skills require explicit opt-in AND an independent held-out set.**\n  Skills shipping with gbrain cannot be auto-mutated. To rewrite one in place\n  the user passes BOTH `--allow-mutate-bundled` AND `--held-out \u003Cpath>` with\n  at least 5 benchmark-disjoint tasks; without the held-out set the run\n  hard-refuses (exit 2). Drop `--allow-mutate-bundled` (or pass `--no-mutate`,\n  the default for the dream-cycle phase) to write proposed.md for review\n  instead — no held-out needed for review-only output.\n- **Bootstrap output requires human review.** Both `--bootstrap-from-skill`\n  and `--bootstrap-from-routing` write a sentinel; you must review + STRENGTHEN\n  the generated judges, delete the sentinel, and re-run with\n  `--bootstrap-reviewed` before optimization can use the file.\n\n## The pipeline\n\n```\ngbrain skillopt \u003Cskill-name> [flags]\n  │\n  ├── Pre-flight gates\n  │     ├── working tree clean (or --force)\n  │     ├── benchmark valid + D_sel >= 5 (D17)\n  │     ├── cost preflight (D3) — refuses over --max-cost-usd\n  │     └── per-skill DB lock (D14)\n  │\n  ├── Baseline eval on D_sel (sets best_sel_score)\n  │\n  ├── default: one rewrite of the body from a D_train forward pass,\n  │     accepted only through the same D12 validation gate\n  ├── --loop (deprecated, removed on or after 2026-12-03): for epoch in 1..N:\n  │     for step in 1..steps_per_epoch:\n  │       ├── forward pass: rollouts on D_train batch\n  │       ├── backward pass: reflect × 2 (failures + successes per D7)\n  │       ├── rank + clip via LR cosine schedule\n  │       ├── apply edits (body-only per D5, tagged result per D9)\n  │       ├── validation gate: median-of-3 + epsilon=0.05 (D12)\n  │       └── if accept: commit via D8 history-intent-first\n  │     │\n  │     └── slow update (D6) if no improvement this epoch\n  │\n  └── Final test eval on D_test → run receipt\n```\n\n## Where your skills live\n\nPlugin-bundled skills ship as a read-only snapshot; you cannot write a\nbenchmark or optimization artifacts next to them. Run skillopt against your\nown writable skills directory: pass `--skills-dir \u003Cpath>`\n(`gbrain skillopt X --skills-dir ~\u002Fmy-project\u002Fskills`), or run from a\nworkspace that contains a `skills\u002F` tree and the CLI auto-detects it. Every\n`skills\u002FX\u002F...` path below refers to that writable directory (your own\nauthored skills, skillify-scaffolded skills, or a brain-resident skillpack),\nnot the plugin snapshot.\n\n## Starting a benchmark from the skill itself (the common case)\n\n**The user will NOT hand-write a benchmark, and you shouldn't start from a blank\nfile either.** When the user says \"make skill X better\" and\n`skills\u002FX\u002Fskillopt-benchmark.jsonl` doesn't exist, generate a starter from the\nSKILL.md directly:\n\n1. **Generate the starter.** Run:\n   ```\n   gbrain skillopt X --bootstrap-from-skill\n   ```\n   One LLM call reads `skills\u002FX\u002FSKILL.md`, infers what the skill produces and what\n   \"good\" looks like, and writes ~15 tasks (each with rule judges) to\n   `skills\u002FX\u002Fskillopt-benchmark.jsonl` plus a `# BOOTSTRAP_PENDING_REVIEW`\n   sentinel. No `routing-eval.jsonl` is needed. Tune the count with\n   `--bootstrap-tasks N` (max 50).\n2. **Review AND STRENGTHEN the judges.** This is YOUR job and it is load-bearing.\n   The generated rule checks are weak drafts — the model tends to emit generic\n   `contains`, loose `max_chars`, or invented headings. Read each task, fix soft\n   checks, add the must-haves the skill actually requires (real section names,\n   real length ceilings, `min_citations` where sources are expected,\n   `tool_called`\u002F`tool_not_called` for tools the skill genuinely uses). A thin\n   benchmark optimizes for a thin definition of quality — do not rubber-stamp.\n3. **Delete the sentinel line** (`# BOOTSTRAP_PENDING_REVIEW`, the last line).\n4. **Run the optimizer with `--split 1:1:1`:**\n   ```\n   gbrain skillopt X --bootstrap-reviewed --split 1:1:1\n   ```\n   The 1:1:1 split is REQUIRED for a 15-task starter — the default `4:1:5` makes\n   the validation set `floor(15\u002F10)=1`, below the `D_sel >= 5` floor, and the\n   optimizer refuses with `d_sel_too_small`. (4:1:5 needs ~50 tasks.) Add\n   `--dry-run` first to preview cost.\n\nBenchmark line shape (what the generator writes, one per line):\n```\n{\"task_id\":\"x-001\",\"task\":\"\u003Cuser prompt>\",\"judge\":{\"kind\":\"rule\",\"checks\":[{\"op\":\"max_chars\",\"arg\":1800},{\"op\":\"contains\",\"arg\":\"agenda\"}]}}\n```\n\nRule-check vocabulary you'll strengthen with: `contains`, `regex`,\n`section_present`, `max_chars`, `min_citations`, `tool_called`, `tool_not_called`.\nRule judges are deterministic and free, but shallow for skills whose quality is\nsequencing, privacy, refusal boundaries, or file placement — for those, hand-add\nricher checks (or an `llm` judge) during review.\n\n**Fallback — author freehand.** If the generated starter is poor (rare, but\npossible for very behavior-shaped skills), discard it and write the JSONL\nyourself: read the SKILL.md, write ~15 realistic tasks covering the boring middle,\nattach >=2 rule checks each, save to `skills\u002FX\u002Fskillopt-benchmark.jsonl`, run with\n`--split 1:1:1`. The full walkthrough lives at\nhttps:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Ftutorials\u002Fimproving-skills-with-skillopt.md.\n\n## Decision tree\n\n| Situation | Action |\n|---|---|\n| Skill has no benchmark | `gbrain skillopt foo --bootstrap-from-skill` → review + strengthen the judges → delete sentinel → `gbrain skillopt foo --bootstrap-reviewed --split 1:1:1` (see section above) |\n| Skill has a `routing-eval.jsonl` and you want a head start | `gbrain skillopt foo --bootstrap-from-routing` → review the generated tasks → `--bootstrap-reviewed` (routing tasks test dispatch; tighten them into quality tasks before trusting) |\n| Iterating on an existing skill | `gbrain skillopt foo --benchmark skills\u002Ffoo\u002Fskillopt-benchmark.jsonl` |\n| Costly run, want preview | Add `--dry-run` |\n| Bundled skill (skills\u002F in gbrain repo) | Default writes proposed.md; to commit in place add `--allow-mutate-bundled` AND `--held-out \u003Cpath>` (>=5 benchmark-disjoint tasks) — else it hard-refuses. Plugin installs cannot mutate bundled skills in place (the snapshot is read-only): copy the SKILL.md into your own skills dir to iterate, or stick with the default proposed.md review flow |\n| Want to review changes before applying | Add `--no-mutate` (writes proposed.md, no held-out needed) |\n| Guard against benchmark overfitting | Add `--held-out \u003Cpath>` — checked once on the final candidate; one that beats the benchmark but regresses on the held-out set is refused |\n| Want the iterative edit loop | Don't: `--loop` is deprecated and removed on or after 2026-12-03 (it prints `skillopt_loop_deprecated`). Run the default one-shot rewrite or edit the skill directly |\n| Mid-run crash | `gbrain skillopt foo --resume \u003Crun-id>` |\n\n## Output Format\n\nWhen invoked, this skill produces:\n\n- Updated `skills\u002F\u003Cname>\u002FSKILL.md` (when mutation is allowed)\n- `skills\u002F\u003Cname>\u002Fskillopt\u002Fbest.md` — pointer copy of current best\n- `skills\u002F\u003Cname>\u002Fskillopt\u002Fversions\u002FvNNNN_eN_sN.md` — per-step snapshots\n- `skills\u002F\u003Cname>\u002Fskillopt\u002Fhistory.json` — append-only run record\n- `skills\u002F\u003Cname>\u002Fskillopt\u002Frejected.json` — bounded LRU of rejected edits\n- `~\u002F.gbrain\u002Faudit\u002Fskillopt-YYYY-Www.jsonl` — ISO-week-rotated audit trail\n\n## When it fails\n\nFollow the [agent operator protocol](..\u002Fconventions\u002Fagent-operator-protocol.md) for any gbrain error `code`, exit code, `[AGENT]` block or notice block. Specific to this skill:\n\n- Hard refusals: `dirty_tree` (commit or stash skill edits first), `d_sel_too_small` (add benchmark tasks), a bundled skill without `--allow-mutate-bundled` plus `--held-out` (exit 2). Fix the input; never force past them.\n- The cost preflight refuses over `--max-cost-usd`, or `no_pricing` under a user cap: preview with `--dry-run`, then ask the user before raising the cap.\n- `skill_candidate_invalid`: the candidate changed protected frontmatter or produced an empty body; discard it and report.\n\n## Anti-Patterns\n\n- **Don't bypass the validation gate.** The median-of-3 + epsilon=0.05 is\n  load-bearing; without it, the optimizer accepts noise as improvement.\n- **Don't optimize bundled skills without `--allow-mutate-bundled` AND\n  `--held-out`.** They ship with gbrain and are load-bearing for downstream\n  agents. In-place mutation requires both flags (held-out >=5 benchmark-disjoint\n  tasks); without the held-out set the run hard-refuses and points you at\n  proposed.md.\n- **Don't use bootstrap output without strengthening it.** Both\n  `--bootstrap-from-skill` and `--bootstrap-from-routing` have the optimizer\n  model invent success criteria — generic and weak by default. Review and\n  tighten the judges before SkillOpt optimizes against them, or it trains the\n  skill toward benchmark artifacts instead of real quality.\n- **Don't skip `--split 1:1:1` on a ~15-task starter.** The default `4:1:5`\n  split drops the validation set below the `D_sel >= 5` floor and the run\n  aborts with `d_sel_too_small`.\n\n## Contract\n\n`runSkillOpt(opts)` returns:\n```\n{\n  outcome: 'accepted' | 'no_improvement' | 'aborted' | 'errored',\n  receipt: {\n    run_id, skill_sha8, benchmark_sha8, models, cost,\n    baseline_sel_score, best_sel_score,   \u002F\u002F real measured baseline (no longer hardcoded 0)\n    baseline_test_score, test_score,      \u002F\u002F final held-out test-split eval\n  },\n  finalText: string,\n  mutatedSkillFile: boolean,\n  proposedPath?: string\n}\n```\n\n## Related skills\n\n- `skillify` — scaffolds a new skill (use BEFORE skillopt)\n- `skillpack-check` — audits skill conformance (item 13 surfaces skillopt status)\n- `conventions\u002Fquality.md` — output quality standards skillopt enforces via judges\n","# Skill Optimizer\n\nSelf-evolving skill optimization. Treats SKILL.md as the trainable parameters\nof a frozen agent. Validation-gated, budget-capped, atomic-versioned.\n\nBased on SkillOpt (arXiv 2605.23904, Microsoft Research, May 2026).\n\n## When to invoke this skill\n\nThe user wants to:\n- Improve an existing skill's execution quality against a benchmark\n- Bootstrap a benchmark file for a new skill\n- Re-tune a skill after switching target models\n\n## Iron Law\n\n- **Validation gating is MANDATORY.** Every candidate must clear median-of-3\n  + epsilon=0.05 margin against the sel-set before SKILL.md gets rewritten.\n- **Frontmatter mutation is FORBIDDEN.** The optimizer only edits the body.\n  Routing surface (`triggers:`, `brain_first:`) stays invariant.\n- **Bundled skills require explicit opt-in AND an independent held-out set.**\n  Skills shipping with gbrain cannot be auto-mutated. To rewrite one in place\n  the user passes BOTH `--allow-mutate-bundled` AND `--held-out \u003Cpath>` with\n  at least 5 benchmark-disjoint tasks; without the held-out set the run\n  hard-refuses (exit 2). Drop `--allow-mutate-bundled` (or pass `--no-mutate`,\n  the default for the dream-cycle phase) to write proposed.md for review\n  instead — no held-out needed for review-only output.\n- **Bootstrap output requires human review.** Both `--bootstrap-from-skill`\n  and `--bootstrap-from-routing` write a sentinel; you must review + STRENGTHEN\n  the generated judges, delete the sentinel, and re-run with\n  `--bootstrap-reviewed` before optimization can use the file.\n\n## The pipeline\n\n```\ngbrain skillopt \u003Cskill-name> [flags]\n  │\n  ├── Pre-flight gates\n  │     ├── working tree clean (or --force)\n  │     ├── benchmark valid + D_sel >= 5 (D17)\n  │     ├── cost preflight (D3) — refuses over --max-cost-usd\n  │     └── per-skill DB lock (D14)\n  │\n  ├── Baseline eval on D_sel (sets best_sel_score)\n  │\n  ├── default: one rewrite of the body from a D_train forward pass,\n  │     accepted only through the same D12 validation gate\n  ├── --loop (deprecated, removed on or after 2026-12-03): for epoch in 1..N:\n  │     for step in 1..steps_per_epoch:\n  │       ├── forward pass: rollouts on D_train batch\n  │       ├── backward pass: reflect × 2 (failures + successes per D7)\n  │       ├── rank + clip via LR cosine schedule\n  │       ├── apply edits (body-only per D5, tagged result per D9)\n  │       ├── validation gate: median-of-3 + epsilon=0.05 (D12)\n  │       └── if accept: commit via D8 history-intent-first\n  │     │\n  │     └── slow update (D6) if no improvement this epoch\n  │\n  └── Final test eval on D_test → run receipt\n```\n\n## Where your skills live\n\nPlugin-bundled skills ship as a read-only snapshot; you cannot write a\nbenchmark or optimization artifacts next to them. Run skillopt against your\nown writable skills directory: pass `--skills-dir \u003Cpath>`\n(`gbrain skillopt X --skills-dir ~\u002Fmy-project\u002Fskills`), or run from a\nworkspace that contains a `skills\u002F` tree and the CLI auto-detects it. Every\n`skills\u002FX\u002F...` path below refers to that writable directory (your own\nauthored skills, skillify-scaffolded skills, or a brain-resident skillpack),\nnot the plugin snapshot.\n\n## Starting a benchmark from the skill itself (the common case)\n\n**The user will NOT hand-write a benchmark, and you shouldn't start from a blank\nfile either.** When the user says \"make skill X better\" and\n`skills\u002FX\u002Fskillopt-benchmark.jsonl` doesn't exist, generate a starter from the\nSKILL.md directly:\n\n1. **Generate the starter.** Run:\n   ```\n   gbrain skillopt X --bootstrap-from-skill\n   ```\n   One LLM call reads `skills\u002FX\u002FSKILL.md`, infers what the skill produces and what\n   \"good\" looks like, and writes ~15 tasks (each with rule judges) to\n   `skills\u002FX\u002Fskillopt-benchmark.jsonl` plus a `# BOOTSTRAP_PENDING_REVIEW`\n   sentinel. No `routing-eval.jsonl` is needed. Tune the count with\n   `--bootstrap-tasks N` (max 50).\n2. **Review AND STRENGTHEN the judges.** This is YOUR job and it is load-bearing.\n   The generated rule checks are weak drafts — the model tends to emit generic\n   `contains`, loose `max_chars`, or invented headings. Read each task, fix soft\n   checks, add the must-haves the skill actually requires (real section names,\n   real length ceilings, `min_citations` where sources are expected,\n   `tool_called`\u002F`tool_not_called` for tools the skill genuinely uses). A thin\n   benchmark optimizes for a thin definition of quality — do not rubber-stamp.\n3. **Delete the sentinel line** (`# BOOTSTRAP_PENDING_REVIEW`, the last line).\n4. **Run the optimizer with `--split 1:1:1`:**\n   ```\n   gbrain skillopt X --bootstrap-reviewed --split 1:1:1\n   ```\n   The 1:1:1 split is REQUIRED for a 15-task starter — the default `4:1:5` makes\n   the validation set `floor(15\u002F10)=1`, below the `D_sel >= 5` floor, and the\n   optimizer refuses with `d_sel_too_small`. (4:1:5 needs ~50 tasks.) Add\n   `--dry-run` first to preview cost.\n\nBenchmark line shape (what the generator writes, one per line):\n```\n{\"task_id\":\"x-001\",\"task\":\"\u003Cuser prompt>\",\"judge\":{\"kind\":\"rule\",\"checks\":[{\"op\":\"max_chars\",\"arg\":1800},{\"op\":\"contains\",\"arg\":\"agenda\"}]}}\n```\n\nRule-check vocabulary you'll strengthen with: `contains`, `regex`,\n`section_present`, `max_chars`, `min_citations`, `tool_called`, `tool_not_called`.\nRule judges are deterministic and free, but shallow for skills whose quality is\nsequencing, privacy, refusal boundaries, or file placement — for those, hand-add\nricher checks (or an `llm` judge) during review.\n\n**Fallback — author freehand.** If the generated starter is poor (rare, but\npossible for very behavior-shaped skills), discard it and write the JSONL\nyourself: read the SKILL.md, write ~15 realistic tasks covering the boring middle,\nattach >=2 rule checks each, save to `skills\u002FX\u002Fskillopt-benchmark.jsonl`, run with\n`--split 1:1:1`. The full walkthrough lives at\nhttps:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Ftutorials\u002Fimproving-skills-with-skillopt.md.\n\n## Decision tree\n\n| Situation | Action |\n|---|---|\n| Skill has no benchmark | `gbrain skillopt foo --bootstrap-from-skill` → review + strengthen the judges → delete sentinel → `gbrain skillopt foo --bootstrap-reviewed --split 1:1:1` (see section above) |\n| Skill has a `routing-eval.jsonl` and you want a head start | `gbrain skillopt foo --bootstrap-from-routing` → review the generated tasks → `--bootstrap-reviewed` (routing tasks test dispatch; tighten them into quality tasks before trusting) |\n| Iterating on an existing skill | `gbrain skillopt foo --benchmark skills\u002Ffoo\u002Fskillopt-benchmark.jsonl` |\n| Costly run, want preview | Add `--dry-run` |\n| Bundled skill (skills\u002F in gbrain repo) | Default writes proposed.md; to commit in place add `--allow-mutate-bundled` AND `--held-out \u003Cpath>` (>=5 benchmark-disjoint tasks) — else it hard-refuses. Plugin installs cannot mutate bundled skills in place (the snapshot is read-only): copy the SKILL.md into your own skills dir to iterate, or stick with the default proposed.md review flow |\n| Want to review changes before applying | Add `--no-mutate` (writes proposed.md, no held-out needed) |\n| Guard against benchmark overfitting | Add `--held-out \u003Cpath>` — checked once on the final candidate; one that beats the benchmark but regresses on the held-out set is refused |\n| Want the iterative edit loop | Don't: `--loop` is deprecated and removed on or after 2026-12-03 (it prints `skillopt_loop_deprecated`). Run the default one-shot rewrite or edit the skill directly |\n| Mid-run crash | `gbrain skillopt foo --resume \u003Crun-id>` |\n\n## Output Format\n\nWhen invoked, this skill produces:\n\n- Updated `skills\u002F\u003Cname>\u002FSKILL.md` (when mutation is allowed)\n- `skills\u002F\u003Cname>\u002Fskillopt\u002Fbest.md` — pointer copy of current best\n- `skills\u002F\u003Cname>\u002Fskillopt\u002Fversions\u002FvNNNN_eN_sN.md` — per-step snapshots\n- `skills\u002F\u003Cname>\u002Fskillopt\u002Fhistory.json` — append-only run record\n- `skills\u002F\u003Cname>\u002Fskillopt\u002Frejected.json` — bounded LRU of rejected edits\n- `~\u002F.gbrain\u002Faudit\u002Fskillopt-YYYY-Www.jsonl` — ISO-week-rotated audit trail\n\n## When it fails\n\nFollow the [agent operator protocol](..\u002Fconventions\u002Fagent-operator-protocol.md) for any gbrain error `code`, exit code, `[AGENT]` block or notice block. Specific to this skill:\n\n- Hard refusals: `dirty_tree` (commit or stash skill edits first), `d_sel_too_small` (add benchmark tasks), a bundled skill without `--allow-mutate-bundled` plus `--held-out` (exit 2). Fix the input; never force past them.\n- The cost preflight refuses over `--max-cost-usd`, or `no_pricing` under a user cap: preview with `--dry-run`, then ask the user before raising the cap.\n- `skill_candidate_invalid`: the candidate changed protected frontmatter or produced an empty body; discard it and report.\n\n## Anti-Patterns\n\n- **Don't bypass the validation gate.** The median-of-3 + epsilon=0.05 is\n  load-bearing; without it, the optimizer accepts noise as improvement.\n- **Don't optimize bundled skills without `--allow-mutate-bundled` AND\n  `--held-out`.** They ship with gbrain and are load-bearing for downstream\n  agents. In-place mutation requires both flags (held-out >=5 benchmark-disjoint\n  tasks); without the held-out set the run hard-refuses and points you at\n  proposed.md.\n- **Don't use bootstrap output without strengthening it.** Both\n  `--bootstrap-from-skill` and `--bootstrap-from-routing` have the optimizer\n  model invent success criteria — generic and weak by default. Review and\n  tighten the judges before SkillOpt optimizes against them, or it trains the\n  skill toward benchmark artifacts instead of real quality.\n- **Don't skip `--split 1:1:1` on a ~15-task starter.** The default `4:1:5`\n  split drops the validation set below the `D_sel >= 5` floor and the run\n  aborts with `d_sel_too_small`.\n\n## Contract\n\n`runSkillOpt(opts)` returns:\n```\n{\n  outcome: 'accepted' | 'no_improvement' | 'aborted' | 'errored',\n  receipt: {\n    run_id, skill_sha8, benchmark_sha8, models, cost,\n    baseline_sel_score, best_sel_score,   \u002F\u002F real measured baseline (no longer hardcoded 0)\n    baseline_test_score, test_score,      \u002F\u002F final held-out test-split eval\n  },\n  finalText: string,\n  mutatedSkillFile: boolean,\n  proposedPath?: string\n}\n```\n\n## Related skills\n\n- `skillify` — scaffolds a new skill (use BEFORE skillopt)\n- `skillpack-check` — audits skill conformance (item 13 surfaces skillopt status)\n- `conventions\u002Fquality.md` — output quality standards skillopt enforces via judges\n",{"name":5,"version":54,"mutating":55,"triggers":56,"brain_first":62,"description":7,"when_to_use":63},"0.1.0",true,[57,58,59,60,61],"optimize this skill","tune the skill against the benchmark","make the skill better","run skillopt","skillopt for","exempt","Use when the user asks: \"optimize this skill\", \"tune the skill against the benchmark\", \"make the skill better\", \"run skillopt\", \"skillopt for\".","master","074ec301549ded4930f04d2c3b22d709a6c095cc","plugin\u002Fskills\u002Fskill-optimizer",4902,"https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain","https:\u002F\u002Fgithub.com\u002Fgarrytan","https:\u002F\u002Fblog.garrytan.com","Writes software, dreams. ","2026-11-14 04:11:30",{"source":8,"skillName":5,"commands":74,"prompt":84,"zipAvailable":55},[75,78,81],{"tool":76,"command":77},"npx","npx skills add garrytan\u002Fgbrain --skill skill-optimizer",{"tool":79,"command":80},"bunx","bunx skills add garrytan\u002Fgbrain --skill skill-optimizer",{"tool":82,"command":83},"pnpm","pnpm dlx skills add garrytan\u002Fgbrain --skill skill-optimizer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Fskill-optimizer\u002FSKILL.md",[86,92],{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"routing-eval.jsonl","OTHER","其他",578,"https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Fskill-optimizer\u002Frouting-eval.jsonl",{"path":93,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":94,"sourceHtmlUrl":95},"skillopt-benchmark.jsonl",1605,"https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Fskill-optimizer\u002Fskillopt-benchmark.jsonl",[97,110,116,138,162,176],{"skillNo":98,"name":99,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":49},"01M6N109FNGH1PK49T734PZXGB","query-helper","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fquery-helper\u002FSKILL.md",[],[103,104,105,106,107,108,109],"query helper","helper","query","search","page","find","false",{"skillNo":111,"name":112,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":49},"01M6N108A23GW6NGQEQ0E7GV0A","broken","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbroken\u002FSKILL.md",[],[112],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":49},"01M6N105E88C5K2H03H0CC79G1","brain-ops","Read, enrich, and write brain pages with source attribution.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbrain-ops\u002FSKILL.md",[],[123,124,125,36,126,107,127,128,129,130,105,131,132,133,134,135,136,137,106],"brain ops","brain","ops","attribution","read","write","up","look","pages","people","with","enrich","web","path","source",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":147,"publishedAt":49},"01M6N102GRMF22TVCNT6RK5MRD","meeting-prep","Build a briefing before you meet someone, from their recent threads, open loops and what they care about.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Fmeeting-prep\u002FSKILL.md",[144],{"categoryNo":145,"categoryName":146,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000034","行政与办公人员",[148,149,150,151,152,106,153,154,155,105,109,156,157,158,159,160,35,161],"meeting","prep","meeting prep","me","prepare","brief","open","build","loops","about","you","briefing","threads","Meet",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":49},"01M6N1005QK7REHX5KGMNR5PF0","inbox-zero","Triage the inbox into replies, delegations and archives.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Finbox-zero\u002FSKILL.md",[],[169,170,171,106,172,109,173,174,175],"inbox zero","ZeRO","inbox","clear","replies","my","triage",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":49},"01M6N0ZXQ8RRRW71PNV61T57GP","deal-memo","Draft an investment memo from the deal pages and the founder history already in the brain.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Fdeal-memo\u002FSKILL.md",[],[183,184,185,131,124,186,187,128,188,36,106,189],"deal memo","deal","memo","draft","investment","history","founder"]