skill-optimizer
できること
このスキルは、候補となる編集を基準に照らしてテストすることで、スキルファイルの指示を改善します。AIスキルを保守し、測定できる改善を望む人向けです。
使う場面
- ✓既存のスキルが、基準に対してどれだけうまく動くかを改善したいとき。
- ✓新しいスキルの基準ファイルを作る必要があるとき。
- ✓別のAIモデルに切り替えて、スキルを調整し直したいとき。
スキルのリンク
https://github.com/garrytan/gbrain/blob/master/plugin/skills/skill-optimizer/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“会議要約スキルを改善してください。いくつかの編集を基準に対してテストし、明確に役立つものだけを残してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはスキル本体への候補の編集を提案し、各案を基準に対して何度か採点します。変更が決められた基準を超えた場合にのみスキルを書き直し、バージョン履歴を保存します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Skill Optimizer
Self-evolving skill optimization. Treats SKILL.md as the trainable parameters of a frozen agent. Validation-gated, budget-capped, atomic-versioned.
Based on SkillOpt (arXiv 2605.23904, Microsoft Research, May 2026).
When to invoke this skill
The user wants to:
- Improve an existing skill's execution quality against a benchmark
- Bootstrap a benchmark file for a new skill
- Re-tune a skill after switching target models
Iron Law
- Validation gating is MANDATORY. Every candidate must clear median-of-3
- epsilon=0.05 margin against the sel-set before SKILL.md gets rewritten.
- Frontmatter mutation is FORBIDDEN. The optimizer only edits the body.
Routing surface (
triggers:,brain_first:) stays invariant. - Bundled skills require explicit opt-in AND an independent held-out set.
Skills shipping with gbrain cannot be auto-mutated. To rewrite one in place
the user passes BOTH
--allow-mutate-bundledAND--held-out <path>with at least 5 benchmark-disjoint tasks; without the held-out set the run hard-refuses (exit 2). Drop--allow-mutate-bundled(or pass--no-mutate, the default for the dream-cycle phase) to write proposed.md for review instead — no held-out needed for review-only output. - Bootstrap output requires human review. Both
--bootstrap-from-skilland--bootstrap-from-routingwrite a sentinel; you must review + STRENGTHEN the generated judges, delete the sentinel, and re-run with--bootstrap-reviewedbefore optimization can use the file.
The pipeline
gbrain skillopt <skill-name> [flags]
│
├── Pre-flight gates
│ ├── working tree clean (or --force)
│ ├── benchmark valid + D_sel >= 5 (D17)
│ ├── cost preflight (D3) — refuses over --max-cost-usd
│ └── per-skill DB lock (D14)
│
├── Baseline eval on D_sel (sets best_sel_score)
│
├── default: one rewrite of the body from a D_train forward pass,
│ accepted only through the same D12 validation gate
├── --loop (opt-in; has not beaten one-shot on benchmarks): for epoch in 1..N:
│ for step in 1..steps_per_epoch:
│ ├── forward pass: rollouts on D_train batch
│ ├── backward pass: reflect × 2 (failures + successes per D7)
│ ├── rank + clip via LR cosine schedule
│ ├── apply edits (body-only per D5, tagged result per D9)
│ ├── validation gate: median-of-3 + epsilon=0.05 (D12)
│ └── if accept: commit via D8 history-intent-first
│ │
│ └── slow update (D6) if no improvement this epoch
│
└── Final test eval on D_test → run receipt
Where your skills live
Plugin-bundled skills ship as a read-only snapshot; you cannot write a
benchmark or optimization artifacts next to them. Run skillopt against your
own writable skills directory: pass --skills-dir <path>
(gbrain skillopt X --skills-dir ~/my-project/skills), or run from a
workspace that contains a skills/ tree and the CLI auto-detects it. Every
skills/X/... path below refers to that writable directory (your own
authored skills, skillify-scaffolded skills, or a brain-resident skillpack),
not the plugin snapshot.
Starting a benchmark from the skill itself (the common case)
The user will NOT hand-write a benchmark, and you shouldn't start from a blank
file either. When the user says "make skill X better" and
skills/X/skillopt-benchmark.jsonl doesn't exist, generate a starter from the
SKILL.md directly:
- Generate the starter. Run:
One LLM call readsgbrain skillopt X --bootstrap-from-skillskills/X/SKILL.md, infers what the skill produces and what "good" looks like, and writes ~15 tasks (each with rule judges) toskills/X/skillopt-benchmark.jsonlplus a# BOOTSTRAP_PENDING_REVIEWsentinel. Norouting-eval.jsonlis needed. Tune the count with--bootstrap-tasks N(max 50). - Review AND STRENGTHEN the judges. This is YOUR job and it is load-bearing.
The generated rule checks are weak drafts — the model tends to emit generic
contains, loosemax_chars, or invented headings. Read each task, fix soft checks, add the must-haves the skill actually requires (real section names, real length ceilings,min_citationswhere sources are expected,tool_called/tool_not_calledfor tools the skill genuinely uses). A thin benchmark optimizes for a thin definition of quality — do not rubber-stamp. - Delete the sentinel line (`# BOOTSTRAP_PENDING_RE
よくある質問
トリガーを変えられますか?
いいえ。スキルのルーティングの部分は固定され、編集されるのは本体だけです。
組み込みのスキルは変えますか?
明示的なオプトインと別の保留テストセットがある場合に限ります。それ以外では、レビュー用の提案を書きます。
基準は必要ですか?
はい。最適化は基準に対して測定され、そのための基準づくりをスキルが手伝えます。
詳細
作者による元の説明
Self-evolving skill optimization via SkillOpt-paper-grounded text-space optimizer.
repo: garrytan/gbrain
人気
- GitHubのスター
- 31k
- ランキング
- #9313
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
gbrain
31kエージェントが、共有の社内ナレッジブレインで人、プロジェクト、決定事項についての事実を検索し、永続的なメモを保存できるようにします。
brain-ingest-gate
31k重複を避け、名前付きのエンティティを先に解決するため、新しい内容をナレッジブレインに追加する前に、既存のブレインと照合するようエージェントを支援します。
brain-link-discipline
31kエージェントが報告する各ブレインのページについて、同じメッセージの中で動くリンクを必ず含め、すぐに開けるようにします。
brain-ops
31kナレッジブレインの基本的な手順をエージェントに与えます。まず既存の文脈を確認し、出典つきで明示的なメモを保存し、関連するページをリンクします。
似ているスキル
writing-skills
311k新しいスキルを書き、それぞれをまず試すようエージェントに教えます。そのスキルが実際にエージェントの動作を変えることを確認します。
writing-for-agents
310kスキル、AGENTS.md、CLAUDE.mdを含め、AIエージェントのための明確な指示の書き方を説明し、エージェントが予測可能に動くようにします。
bengali-nlp
280kエージェントがベンガル語のテキストを処理できるようにします。テキストの正規化など、ベンガル語特有の性質に対応しながら、言語を理解して扱えるようにします。