skill-autobench
它能做什么
这项技能根据人们对 AI 技能的实际使用情况,为其构建测试集。它会查看过去的对话,并标记用户纠正智能体的地方,因为这些纠正反映了真实需求。
适用场景
- ✓当你想用某项现有 AI 技能的真实历史使用情况进行测试的时候。
- ✓当一项技能反复失败,而其书面说明无法解释原因时。
- ✓当你想找出用户在哪些地方纠正了技能的回答,并把这些变成测试时。
技能链接
https://github.com/garrytan/gbrain/blob/master/skills/skill-autobench/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请回顾我过去关于会议技能的对话,找出我纠正它的地方,并根据这些案例建立一个测试集。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会在你的对话档案中搜索该技能的使用记录,收集可以重放的案例。每个案例会被标记为来自技能自身的规格,或由历史推断而来,然后测试集会进入待审阅状态。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
skill-autobench — write the eval from lived usage
Convention: see conventions/brain-first.md — mining starts in the brain. Search the conversation archive before touching raw transcript files, and never declare "no history" without having queried the brain first.
Convention: see conventions/model-routing.md — mining and synthesis run on the cheap tier by default. The full multi-model judging pass is an explicit opt-in (see Contract).
The self-improving loop has three legs: an eval, a variant generator
(SkillOpt), and a replay + judge harness (gbrain eval cross-modal). The
generator and the judge ship with gbrain. The persistently missing leg is the
eval author — someone has to WRITE the eval, and a spec-derived benchmark
only tests what the skill promised, not what users actually asked for or what
actually went wrong. This skill writes the eval from reality instead of
imagination.
Pipeline
1. MINE — extract real invocation windows
Substrates, in priority order:
Brain conversation archive — pages under
conversations/, populated by the conversation-archive skill (hard dependency for this substrate: if it hasn't ingested your history yet, run it first). Search for the target skill's name, trigger phrases, and output shapes:gbrain search "<skill-name>" gbrain query "when did I use <skill-name> and what did I ask for"Per-harness session transcripts, as available — use what the harness exposes; do not assume a layout.
gbrain transcripts recent --fullreads the configured local transcript corpus (local-only by design). Claude Code keeps per-project session JSONL under~/.claude/projects/; other harnesses have their own session stores. Absent stores are simply skipped.
From each hit, extract an invocation window: the user ask before the
invocation, the invocation turn itself, and the 2 turns after — because that
is where corrections live. A user correction after an invocation is the
gold signal: it is a real, observed failure mode, and it becomes a
hard_fail plus a replayable case.
FAIL-CLOSED: if no substrate yields a single real invocation of the
target skill, emit an honest no-history report (substrates checked, queries
run, windows scanned, zero matches) and stop. Do NOT invent "typical"
invocations. For a skill with no history, the right tool is
gbrain skillopt <name> --bootstrap-from-skill (spec-derived, and honest
about it) — see Dedup.
2. SYNTH — turn windows into a proposed eval
From the mined windows plus the current SKILL.md, produce:
- A proposed eval_contract: goal, dimensions, hard_fails. Dimensions come from observed asks; hard_fails encode observed corrections.
- 4-8 replayable cases, each shaped
{input, expected_behavior, failure_mode_to_catch}— realistic input, a checkable expected behavior, and the named failure mode the case exists to catch. - Spec-vs-usage gaps: "the spec says X, users consistently ask Y."
HONESTY LABELS are mandatory. Every dimension and every case is labeled:
HISTORY-IMPLIED— a real mined window backs it; cite which one.SPEC-DERIVED— inferred from SKILL.md only; no usage evidence.
Never conflate the two. If history is thin or off-target, say so prominently at the top of the staged file ("GROUNDING WARNING: only N windows found, none exercised the core path") instead of padding with fabricated evidence.
Privacy scrub before staging: staged evals live in the skill repo and are
distributable. Mined windows contain real names, companies, and deals —
rewrite every case onto placeholder slugs (alice-example, acme-example)
before writing the file. A history-grounded case keeps its shape and failure
mode, never its real entities.
3. STAGE — human gate, always
Write skills/<name>/eval/autobench-<date>.md with frontmatter
status: PENDING-HUMAN-APPROVAL.
This skill NEVER rewrites SKILL.md — not the eval_contract, not the body, not the triggers. Merging the staged eval is the human's decision. (This is a workflow contract the agent must honor, not a mechanically-enforced gate.)
The loop (after approval)
- Human reviews, edits, and approves the staged eval; the approved eval_contract is merged into the skill's frontmatter explicitly.
- Convert approved cases into
skills/<name>/skillopt-benchmark.jsonllines
常见问题
为什么要使用真实历史,而不是规格?
规格只测试技能承诺过的内容。真实历史则显示人们实际问了什么,以及哪里出了错。
它需要对话档案吗?
需要。档案是主要来源,因此应该先导入。
测试集会自动运行吗?
不会。它会把测试集放入待审阅和运行的状态。该方法设计为在使用前由人工检查。
详情
作者的原始描述
Author an eval for an existing skill from its REAL usage history, not its spec. Mine invocations from the brain's conversation archive (conversations/) and per-harness session transcripts — a user correction after an invocation is the gold signal — then synthesize an eval_contract plus 4-8 replayable cases with honesty labels (SPEC-DERIVED vs HISTORY-IMPLIED) and stage the result at skills/<name>/eval/autobench-<date>.md as PENDING-HUMAN-APPROVAL. Never rewrites SKILL.md. Ships two guard companions: panel integrity (multi-model judging must prove each provider actually responded) and the fail-
repo: garrytan/gbrain
热度
- GitHub 星标
- 31k
- 排名
- #9323
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …