Skip to main content
ClaudeWave
Skill556 repo starsupdated 7d ago

ln-34-benchmark-comparator

Compares tools or implementations through reproducible A/B workloads, correctness oracles, and controlled measurements. Use to choose alternatives; not to optimize a known bottleneck.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/levnikolaevich/claude-code-skills /tmp/ln-34-benchmark-comparator && cp -r /tmp/ln-34-benchmark-comparator/plugins/optimization-suite/skills/ln-34-benchmark-comparator ~/.claude/skills/ln-34-benchmark-comparator
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Benchmark Comparator

**Goal:** Compare alternatives under controlled, reproducible conditions. Correctness comes before speed, and measured data must remain separate from estimates, setup cost, and interpretation.

**Execution contract:** Treat the ordered checkbox workflow below as this skill's Definition of Done. Track every checkbox as `PENDING`, then resolve it to `PROVEN` with concrete evidence, `CLEARED` with evidence that its conditional trigger is absent, or `UNPROVEN`; reading, mentioning, delegating, skipping, or tool failure is not proof.
Before returning, resolve every `PENDING`, count only `PROVEN` and `CLEARED` items as complete, apply this skill's verdict, decision, and approval rules to every `UNPROVEN`, and prepend **Checklist: X/Y complete**<br>**Incomplete: None | section/item — reason; outcome impact; exact next action**; list every `UNPROVEN` item.

## Tool Routing

| Need | Preferred tool | Use it when | Fallback |
|---|---|---|---|
| Canonical workload and oracle | Repository fixtures, tests, expected diffs, schemas, or independently specified outcomes | Defining what success means before either candidate runs | Create the smallest deterministic fixture that represents the decision |
| Isolation | Clean Git worktrees, temporary directories, controlled environment, fixed seeds, and resettable caches | Preventing one candidate or run from contaminating another | Sequential clean-room setup with verified cleanup |
| Execution | The same shell runner and wrapper for every candidate | Capturing commands, exit status, stdout, stderr, timing, and artifacts consistently | Manual execution with an explicit reproducibility limitation |
| Activation proof | Logs, traces, command records, process metadata, or candidate-specific artifacts | Verifying the intended alternative actually ran and did not fall back | Treat the run as invalid when activation cannot be proven |
| Correctness grading | Tests, output parser, diff, schema validation, or independent oracle | Every scenario before cost comparison | Manual blind grading against written expectations |
| Performance and cost | Monotonic timer, resource metrics, token or usage telemetry, tool-call logs, and failure counts | Metrics are observable through the same method for all candidates | Label derived or estimated values and keep them out of measured aggregates |
| External semantics | Official documentation and specifications | Candidate configuration or claimed behavior needs current verification | Primary-source web research; otherwise mark the claim `UNVERIFIED` |

Do not tune the scenario after observing a preferred candidate, mix measurements from different workloads, or present internal estimates as externally measured facts. Benchmarking may create temporary worktrees and artifacts but must not change the source baseline or unapproved external state.

## Evidence Rules

- Specify scenarios, oracle, metrics, exclusions, and decision rule before running candidates.
- Hold all non-tested variables constant or record and analyze the confounder.
- Correctness failure cannot be compensated by better speed, token use, or cost unless the decision explicitly allows degraded correctness.
- Use repeated runs and report raw values, center, spread, failures, and outliers; never headline the best run.
- Keep setup or indexing cost, steady-state cost, maintenance burden, and runtime cost separate.
- Report measured, derived, estimated, and qualitative evidence in distinct fields.

## Checklist

### 1. Define the Decision and Experiment

- [ ] State the decision the benchmark must support, the candidates, intended users, representative workloads, and explicit non-goals.
- [ ] Include ordinary cases where a simpler or built-in candidate could reasonably win as well as cases exercising each candidate's claimed advantage; do not construct a feature demo for one side.
- [ ] Define scenario inputs, expected outcomes, correctness criteria, failure conditions, and an oracle independent of candidate self-report.
- [ ] Define primary and secondary metrics, units, measurement point, acceptance threshold, allowed tradeoffs, and tie or inconclusive rules.
- [ ] Identify variables that must remain fixed: repository revision, model, prompts, permissions, runtime, hardware, data, cache policy, and network conditions.
- [ ] Predeclare a pilot-derived repetition count tied to the minimum meaningful effect and observed noise, or a bounded sequential stopping rule with fixed error tolerance and maximum runs.
- [ ] Freeze and hash the scenario text, fixtures, expectations, runner, parser, and decision rule before the first candidate result is inspected.
- [ ] Read repository instructions and inspect Git state before creating worktrees, temporary data, or runners.
- [ ] Start a run-owned resource ledger with every created absolute path, worktree, process ID, cache, account, dataset, report, and temporary artifact; never register pre-existing resources or credentials as cleanup targets.
- [ ] Require side-effect-free or idempotent scenarios and disposable accounts or datasets; define external-write authorization, cost and rate budgets, cleanup, and rollback evidence before execution.
- [ ] Return `BLOCKED` if candidates do not solve the same task, correctness cannot be independently graded, external effects cannot be isolated, or the decision rule is being chosen after results.

### 2. Build a Symmetric Harness

- [ ] Use the same runner, timeout, logging, environment construction, and artifact collection for every candidate.
- [ ] Create clean worktrees or equivalent isolated copies from the same commit and verify identical starting state.
- [ ] Inventory global and user-level instructions, hooks, plugins, settings, credentials, caches, and environment variables that can leak candidate behavior across supposedly isolated arms; disable, equalize, or record each one.
- [ ] Control seeds, clock, locale, concurrency, network access, dependency versions,
ln-71-system-design-baseline-builderSkill

Creates a project baseline of architecture drivers and constraints. Use before design or planning; not for target design, plan review, implementation, or architecture audit.

ln-72-current-architecture-documenterSkill

Documents implemented current-state architecture from repository evidence. Use for onboarding or migration baselines; not for target design, audit verdicts, or code changes.

ln-73-system-design-proposal-builderSkill

Creates a decision-complete target system design from requirements and constraints. Use before implementation planning; not for requirements baselines, reviews, audits, or code changes.

ln-74-architecture-decision-recorderSkill

Records one architecture decision with context, alternatives, tradeoffs, and consequences. Use for a significant choice; not for broad design, audit, or implementation.

ln-75-architecture-diagram-builderSkill

Creates evidence-backed current or target architecture diagrams when the diagram is the primary deliverable. Not for UI design, architecture audit, or invented structure.

ln-76-architecture-migration-plannerSkill

Plans a reversible architecture migration with compatibility, data movement, rollout, and rollback. Use for current-to-target transitions; not execution, generic planning, or delivery review.

ln-21-documentation-auditorSkill

Audits documentation and code comments for structure, coverage, factual accuracy, and maintainability. Use for documentation trust reviews; not code, test, or architecture audits.

ln-22-codebase-auditorSkill

Audits cross-cutting code health across security, delivery, maintainability, dependencies, diagnosability, concurrency, and lifecycle. Use when no specialist audit is primary.