serejaris/personal-corp-os / skills/benchmark
benchmark
VerifiedUse when choosing between engines or models for an agent pipeline and the answer must come from measurement on your own data, not from marketing pages: speech recognition for meeting recordings, the model that turns a transcript into notes, the critic model that checks it. Runs every variant in an isolated container, measures time, cost per hour of input (USD and RUB, with price source and date) and quality (WER/CER and course terms for ASR; code checks plus a judge of a different model for LLM steps), writes results.json/csv and one static analytics page. Triggers on "бенчмарк", "сравни движки", "сколько стоит час записи", "какую модель взять для пайплайна", "benchmark the pipeline", "compare ASR engines".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.3 KB |
| examples/adapter_example.py | script | 4.9 KB |
| prices.example.json | config | 3.3 KB |
| scripts/asr.py | script | 10.8 KB |
| scripts/claude_step.py | script | 5.8 KB |
| scripts/common.py | script | 2.1 KB |
| scripts/llm.py | script | 4.0 KB |
| scripts/report.py | script | 10.4 KB |
| scripts/score.py | script | 14.6 KB |
| task.example.json | config | 1.7 KB |
scripts/llm.py
View on GitHub#!/usr/bin/env python3
"""Run the LLM variants of a benchmark task through the task's pipeline adapter.
python3 llm.py --task task.json --out runs/<name> [--only id1,id2] [--force]
The skill does not know your pipeline. The task names an adapter script
(task["llm"]["adapter"]) that runs one variant end to end:
python3 <adapter> --task task.json --variant variant.json --out runs/<name>/llm/<id> --stage all|author|judge
and writes runs/<name>/llm/<id>/result.json. `--stage author` runs the author step and code checks,
`--stage judge` adds judges to an existing result (useful when the judge's key lives on another
machine); `--stage all` does both. Result format:
{"steps": [{"name", "role": "author|fixer|judge", "provider", "model", "wall_s",
"usage": {...}, "model_usage": {...}, "cost_usd_reported", "ok"}],
"checks_first": [{"name", "ok"}], # code checks right after the author step
"checks_final": [{"name", "ok"}], # after the fix rounds
"fix_rounds": 0, "checks_ok": true,
"judges": [{"provider", "model", "verdict", "critical", "major", "minor", "summary"}],
"artifacts": {"...": "sizes, counts"}}
Adapters use claude_step.run_step() so every model runs in the same harness.
Rule: a judge is never the author's model (the script refuses such a variant).
"""
from __future__ import annotations
import argparse
import subprocess
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent))
from common import Meter, load_task, read_json, task_path, utc_now, write_json # noqa: E402
def main() -> int:
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
ap.add_argument("--task", required=True, type=Path)
ap.add_argument("--out", required=True, type=Path)
ap.add_argument("--only", help="comma-separated variant ids")
ap.add_argument("--force", action="store_true")
ap.add_argument("--python", default=sys.executable)
ap.add_argument("--stage", choices=["all", "author", "judge"], default="all",
help="author: author+checks only; judge: judges on an existing author run (other machine/key)")
args = ap.parse_args()
task = load_task(args.task)
llm = task["llm"]
adapter = task_path(task, llm["adapter"])
only = set(args.only.split(",")) if args.only else None
for v in llm["variants"]:
if (only and v["id"] not in only) or v.get("skip"):
continue
author = (v["author"]["provider"], v["author"]["model"])
if any((j["provider"], j["model"]) == author for j in v.get("judges", [])):
print(f"{v['id']}: judge equals author model, refusing", file=sys.stderr)
return 2
out = args.out / "llm" / v["id"]
meta_path = out / ("meta-judge.json" if args.stage == "judge" else "meta.json")
if meta_path.exists() and read_json(meta_path).get("status") == "ok" and not args.force:
print(f"{v['id']}: already ok, skip")
continue
out.mkdir(parents=True, exist_ok=True)
write_json(out / "variant.json", v)
meta = {"id": v["id"], "author": v["author"], "judges": v.get("judges", []), "started_at": utc_now()}
print(f"{v['id']}: start", flush=True)
with Meter() as m:
p = subprocess.run([args.python, str(adapter), "--task", str(args.task), "--variant", str(out / "variant.json"),
"--out", str(out), "--stage", args.stage], capture_output=True, text=True)
(out / f"adapter-{args.stage}.log").write_text(p.stdout + "\n--- stderr ---\n" + p.stderr[-8000:], encoding="utf-8")
ok = p.returncode == 0 and (out / "result.json").exists()
meta.update(status="ok" if ok else "error", wall_s=m.wall_s, exit=p.returncode, finished_at=utc_now(),
error=None if ok else (p.stderr or p.stdout)[-400:])
write_json(meta_path, meta)
print(f"{v['id']}: {meta['status']} {m.wall_s}s", flush=True)
return 0
if __name__ == "__main__":
raise SystemExit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |