Claude-skill-registry bench
Generate mitata benchmark files following project conventions
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/bench" ~/.claude/skills/majiayu000-claude-skill-registry-bench && rm -rf "$T"
manifest:
skills/data/bench/SKILL.mdsource content
Generate Benchmark
Generate a mitata benchmark file for the
{{ category }} category.
Project Conventions
This project uses mitata for benchmarking. Follow the patterns in
bench/.
Setup Import
Always import the shared setup:
import { run, bench, group, baseline } from "mitata"; import { Decimal, decimalJs, bigJs, bignumberJs, dineroAmount, } from "./setup";
Benchmark Structure
// Group related benchmarks group("{{ category }} - operation name", () => { // Always include baseline (usually Decimal or native) baseline("Centimal", () => { // benchmark code }); // Compare against other libraries bench("decimal.js", () => { // equivalent operation }); bench("big.js", () => { // equivalent operation }); bench("bignumber.js", () => { // equivalent operation }); }); // Run all benchmarks await run();
Example Pattern (from arithmetic.bench.ts)
group("addition - small numbers", () => { baseline("Centimal", () => { Decimal.from("123.45").add(Decimal.from("67.89")); }); bench("decimal.js", () => { decimalJs("123.45").plus("67.89"); }); bench("big.js", () => { bigJs("123.45").plus("67.89"); }); bench("bignumber.js", () => { bignumberJs("123.45").plus("67.89"); }); });
Test Data Recommendations
| Category | Test Cases |
|---|---|
| Arithmetic | Small numbers, large numbers, high precision |
| Parsing | Integers, decimals, scientific notation, edge cases |
| Comparison | Equal, not equal, less than, greater than |
| Percentage | Small %, large %, fractional % |
| Allocation | 2-way split, 3-way split, uneven ratios |
Output Location
Create:
bench/{{ category }}.bench.ts
Your Task
- Read existing benchmarks in
to understand patternsbench/ - Read
to understand available test fixturesbench/setup.ts - Create
with comprehensive benchmarksbench/{{ category }}.bench.ts - Ensure the new file is imported in
if neededbench/run.ts