Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/cynthiajones34/gbrain/skill-optimizernpx skills add cynthiajones34/GBrain --skill skill-optimizergit clone --depth 1 https://github.com/cynthiajones34/GBrainWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cynthiajones34/gbrain/skill-optimizer)<a href="https://agentmods.dev/skills/cynthiajones34/gbrain/skill-optimizer"><img src="https://agentmods.dev/badge/skills/cynthiajones34/gbrain/skill-optimizer.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00019 | $0.02366 |
| Opus 5 | $0.00010 | $0.01183 |
| Sonnet 5 | $0.00004 | $0.00473 |
| Haiku 4.5 | $0.00002 | $0.00237 |
Grade A, and why
skill-optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
91% identical to skill-optimizer — 17 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on 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)
│
├── 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
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 189 lines · 19 tokens per session scan A ba3028c7351d
skill-optimizer is a skill published in the GitHub repository cynthiajones34/GBrain (0 stars, last pushed 29d ago), licensed MIT. It adds 19 tokens to every session and 2,366 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to skill-optimizer, differing in 17 lines, and is treated as a copy.
Other skills, from other repositories
memory-proactive
Proactive layered recall and generic domain-aware routing.
memory-archivist
自动归档 + 知识图谱同步 + 记忆生命周期管理.
memory-starter-kit
Historical starter note for the memory sidecar stack.
mind
Local project memory with recall, provenance, policy, and dreams.
personal-knowledge-graph
Use when maintaining a LoomKG/Obsidian knowledge graph.
graph-mutation-plan
Cookbook for composing an applygraphmutations plan — stable entitykey patterns, the canonical label/edge vocabulary, evidence/invalidation/confidence discipline, and a worked example. Load this when building a non-trivial mutation plan.