skill-optimizer
Fungsinya
Skill ini memperbaiki instruksi dalam file skill dengan menguji usulan perubahan terhadap benchmark. Skill ini ditujukan bagi orang yang mengelola skill AI dan menginginkan peningkatan yang bisa diukur.
Kapan dipakai
- βSaat Anda ingin meningkatkan performa skill yang sudah ada terhadap benchmark.
- βKetika Anda perlu membuat file benchmark untuk skill baru.
- βSaat Anda berpindah ke model AI lain dan ingin menyetel ulang sebuah skill.
Link skill
https://github.com/garrytan/gbrain/blob/master/plugin/skills/skill-optimizer/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βPerbaiki skill ringkasan rapat saya dengan menguji beberapa perubahan terhadap benchmark, dan simpan hanya yang jelas membantu.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent mengusulkan perubahan kandidat pada isi skill dan menilai setiap perubahan terhadap benchmark beberapa kali. Agent hanya menulis ulang skill ketika perubahan melewati batas yang ditetapkan, dan menyimpan riwayat versinya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Bisakah ia mengubah pemicu skill?
Tidak. Bagian routing dari skill tetap, dan hanya isinya yang diedit.
Apakah skill bawaan akan diubah?
Hanya dengan persetujuan eksplisit dan kumpulan uji terpisah yang disimpan. Jika tidak, agent menulis usulan untuk ditinjau.
Apakah ini memerlukan benchmark?
Ya. Optimasi diukur terhadap benchmark, dan skill dapat membantu membuatnya.
Detail
Deskripsi asli dari pembuat
Self-evolving skill optimization via SkillOpt-paper-grounded text-space optimizer.
repo: garrytan/gbrain
Popularitas
- Bintang GitHub
- 31k
- Peringkat
- #9313
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
gbrain
31kMemungkinkan agent Anda mencari fakta tentang orang, proyek, dan keputusan di basis pengetahuan bersama perusahaan, serta menyimpan catatan penting.
brain-ingest-gate
31kMemeriksa konten baru terhadap basis pengetahuan yang sudah ada sebelum ditambahkan, untuk menghindari duplikat dan menyelesaikan entitas bernama lebih dulu.
brain-link-discipline
31kMemastikan agent Anda menyertakan tautan yang berfungsi ke setiap halaman basis pengetahuan yang dilaporkannya, dalam pesan yang sama, agar Anda bisa langsung membukanya.
brain-ops
31kMemberi agent Anda rutinitas inti untuk basis pengetahuan: memeriksa konteks yang ada terlebih dahulu, menyimpan catatan eksplisit beserta sumbernya, dan menautkan halaman terkait.
Skill serupa
writing-skills
311kMengajari agent Anda menulis skill baru dan menguji setiap skill lebih dulu, memastikan skill itu benar-benar mengubah perilaku agent.
writing-for-agents
310kMenjelaskan cara menulis instruksi yang jelas untuk agent AI, termasuk file skill, AGENTS.md, dan CLAUDE.md, agar perilaku agent dapat diprediksi.
bengali-nlp
280kMembuat agent Anda memproses teks Bahasa Bengali. Membantu memahami dan mengolah bahasa tersebut, termasuk normalisasi teks dan karakteristik uniknya.