Agent Skills › withcoral/coral › to-benchmark

to-benchmark

GitHub

根据Issue创建基准测试技能,通过对比主分支与指定分支的编码Agent表现,评估问题行为是否改善。

.agents/skills/to-benchmark/SKILL.md withcoral/coral

触发场景

需要为特定Issue创建自动化基准测试 需要评估代码变更对Agent行为的影响

安装

npx skills add withcoral/coral --skill to-benchmark -g -y
更多选项

非标准路径

npx skills add https://github.com/withcoral/coral/tree/main/.agents/skills/to-benchmark -g -y

不安装直接使用

npx skills use withcoral/coral@to-benchmark

指定 Agent (Claude Code)

npx skills add withcoral/coral --skill to-benchmark -a claude-code -g -y

安装 repo 全部 skill

npx skills add withcoral/coral --all -g -y

预览 repo 内 skill

npx skills add withcoral/coral --list

SKILL.md

Frontmatter
{
    "name": "to-benchmark",
    "description": "Create a benchmark skill from an issue. The benchmark skill runs coding agents against main and an optional branch and reports whether the issue's behaviour improved.",
    "disable-model-invocation": true
}

To Benchmark

Purpose

Create a benchmark skill for one issue. The benchmark skill runs coding agents headlessly against builds of Coral and reports whether the behaviour described in the issue improved.

Input

An issue. Any of the following counts:

  • A GitHub or Linear issue reference, passed as the argument.
  • A spec file path, passed as the argument.
  • The current conversation, when no argument is given.

Output

A new directory .agents/benchmark-skills/bench-<behaviour>/ containing:

  • SKILL.md, produced by filling in TEMPLATE.md.
  • results.jsonl, empty. The benchmark skill appends one line per run and it is committed. Run output itself goes under tasks/benchmarks/, which git ignores, and is never committed.
  • run.py, a copy of run.py. The benchmark skill runs it once per repeat, and again to read each run's standard metrics. Edit the copy if an agent needs different flags.
  • plot.py, a copy of plot.py. The benchmark skill runs it to write plots.png from results.jsonl. Edit the copy if the benchmark needs a different plot.

Claude Code and Codex runs load the arm's Coral plugin (plugins/coral, which holds the Coral skill), because users run agents with it installed and a branch may change it. OpenCode runs do not load the plugin, so they cannot measure changes made in the Coral skill. Users who connect only the MCP server never see the skill, so when a change targets agent behaviour, run each agent in two setups: with --coral-plugin and without it.

Procedure

  1. Obtain the issue text.

    • If a reference was passed, fetch the full body and all comments.
    • If no reference was passed, use the conversation.
    • If neither describes an agent behaviour, ask the user for the issue.
  2. Write the task prompt.

    • The task prompt is the message a user would have sent that leads an agent into the behaviour the issue describes.
    • Write it as a user would write it. Do not describe the failure or how to avoid it.
    • Agents run with their default tools, so the prompt alone has to lead them to Coral and into the behaviour. When a smoke run shows an agent answering another way, or never showing the behaviour, the benchmark skill reports back with a revised prompt; expect to revise.
    • Each run produces its own failure. Runs are expected to fail in different ways. The repeat count accounts for this.
    • If it is unclear what request leads to the behaviour, or more than one plausible request exists, ask the user before continuing.
  3. Write the comparison and the metrics to track.

    • The comparison is one sentence: what we want to know about main versus the branch.
    • The metrics to track are the values recorded per run that the comparison is computed from. Each is yes/no or a number, read from the transcript. Progress is counted in tool calls, never turns, since transcripts do not mark model rounds.
    • EXAMPLE.md is the template filled in for one issue. There, the comparison is recovery rate and speed after a Program failure, and the metrics to track are: hit a Program failure, recovered, calls to recover, execs to recover, correct final answer.
  4. Confirm with the user.

    • Show the task prompt, the comparison, and the metrics to track. These are developed with the user, so expect changes.
    • Ask which agents to run. Offer Claude Code, Codex, and OpenCode as the default.
    • For each agent, ask which model and reasoning effort to use. Offer claude-opus-5-5 for Claude Code and gpt-6.1-sol for Codex, at medium effort, as the default. gpt-6.1-sol needs Codex CLI 0.160.0 or later; see KNOWN_ISSUES.md.
    • Ask how many repeats per agent per arm. Offer 5 as the default.
    • Ask how the repeats are scheduled. Offer one lane per agent per arm, lanes in parallel, repeats within a lane in sequence, as the default.
    • Revise until approved.
  5. Write the benchmark skill.

    • Name the skill after the behaviour, for example bench-program-failure-recovery.
    • Copy TEMPLATE.md, fill in every placeholder, including the agents with their models and reasoning efforts, the repeat count, and the schedule, and save it as .agents/benchmark-skills/bench-<behaviour>/SKILL.md.
    • Create an empty results.jsonl beside it.
    • Copy run.py and plot.py beside it.
    • Keep the template's standard metrics and report format unless the issue or the user gives a reason to change them.
    • Delete the Execution bullet for any agent the user did not choose.
  6. Report to the user.

    • State the skill's path.
    • State that running it without a target produces the baseline for main, and that a target can be a branch, a commit, or a pull request number.

Reference

EXAMPLE.md is TEMPLATE.md filled in for withcoral/lagoon#122.

版本历史

  • e44880e 当前 2026-10-19 01:35

同 Skill 集合

.agents/skills/add-recipe/SKILL.md
.agents/skills/ask-matt/SKILL.md
.agents/skills/code-review/SKILL.md
.agents/skills/codebase-design/SKILL.md
.agents/skills/diagnosing-bugs/SKILL.md
.agents/skills/domain-modeling/SKILL.md
.agents/skills/grilling/SKILL.md
.agents/skills/handoff/SKILL.md
.agents/skills/implement-spec/SKILL.md
.agents/skills/implement/SKILL.md
.agents/skills/improve-codebase-architecture/SKILL.md
.agents/skills/prototype/SKILL.md
.agents/skills/research/SKILL.md
.agents/skills/show-me/SKILL.md
.agents/skills/tdd/SKILL.md
.agents/skills/teach/SKILL.md
.agents/skills/to-questionnaire/SKILL.md
.agents/skills/to-spec/SKILL.md
.agents/skills/to-tickets/SKILL.md
.agents/skills/triage/SKILL.md
.agents/skills/wait-what/SKILL.md
.agents/skills/wayfinder/SKILL.md
.agents/skills/wizard/SKILL.md
.agents/skills/writing-for-agents/SKILL.md
plugins/coral/skills/coral-create-source-spec/SKILL.md
plugins/coral/skills/coral-review-source-spec/SKILL.md
plugins/coral/skills/coral/SKILL.md
.agents/skills/pr/SKILL.md
.agents/skills/retro/SKILL.md
.agents/skills/grill-me/SKILL.md
.agents/skills/grill-with-docs/SKILL.md

元信息

文件数
0
版本
e44880e
Hash
51b34810
收录时间
2026-10-19 01:35

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-20 20:36
浙ICP备14020137号-1