skill-optimizer
Skill này làm gì
Skill này cải thiện các chỉ dẫn trong file skill bằng cách thử các chỉnh sửa ứng viên trên một benchmark. Nó dành cho người duy trì skill AI và muốn cải thiện có thể đo lường được.
Khi nào nên dùng
- ✓Khi bạn muốn cải thiện mức độ hoạt động của một skill hiện có trên một benchmark.
- ✓Khi bạn cần tạo file benchmark cho một skill mới.
- ✓Khi bạn chuyển sang một mô hình AI khác và muốn tinh chỉnh lại một skill.
Liên kết skill
https://github.com/garrytan/gbrain/blob/master/plugin/skills/skill-optimizer/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Cải thiện skill tóm tắt cuộc họp của tôi bằng cách thử vài chỉnh sửa trên benchmark, và chỉ giữ những chỉnh sửa thật sự có ích.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đề xuất các chỉnh sửa ứng viên cho phần thân skill và chấm điểm từng cái trên benchmark nhiều lần. Nó chỉ viết lại skill khi một thay đổi vượt ngưỡng đã đặt, và lưu lịch sử phiên bản.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Nó có thể thay đổi các điều kiện kích hoạt của skill không?
Không. Phần định tuyến của skill được giữ cố định, chỉ phần thân được chỉnh sửa.
Nó có thay đổi các skill tích hợp sẵn không?
Chỉ khi bạn chọn rõ ràng và có bộ kiểm tra giữ lại riêng. Nếu không, nó viết một đề xuất để bạn xem xét.
Nó có cần benchmark không?
Có. Việc tối ưu được đo bằng benchmark, và skill có thể giúp xây dựng một cái.
Chi tiết
Mô tả gốc của tác giả
Self-evolving skill optimization via SkillOpt-paper-grounded text-space optimizer.
repo: garrytan/gbrain
Độ phổ biến
- Sao GitHub
- 31k
- Vị trí xếp hạng
- #9313
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
gbrain
31kCho phép agent của bạn tìm trong kho tri thức dùng chung của công ty các thông tin về con người, dự án và quyết định, và lưu ghi chú bền vững vào đó.
brain-ingest-gate
31kKiểm tra nội dung mới với kho tri thức hiện có trước khi thêm vào, để tránh trùng lặp và xác định các thực thể được nêu tên trước.
brain-link-discipline
31kĐảm bảo agent của bạn kèm một liên kết hoạt động đến mỗi trang kho tri thức mà nó báo cáo, trong cùng một tin nhắn, để bạn mở được ngay.
brain-ops
31kCung cấp cho agent của bạn thói quen cốt lõi cho kho tri thức: kiểm tra ngữ cảnh có sẵn trước, lưu ghi chú rõ ràng kèm nguồn và liên kết các trang liên quan.
Skill tương tự
writing-skills
311kDạy agent của bạn viết skill mới và kiểm thử từng skill trước, kiểm tra xem skill có thực sự thay đổi cách agent hành xử hay không.
writing-for-agents
310kGiải thích cách viết hướng dẫn rõ ràng cho agent AI, gồm skill, tệp AGENTS.md và CLAUDE.md, để agent cư xử nhất quán.
bengali-nlp
280kGiúp agent của bạn xử lý văn bản tiếng Bengali, hỗ trợ hiểu ngôn ngữ này, chuẩn hóa văn bản và xử lý các đặc điểm riêng của nó.