generate-benchmark-api
Implement or update LearnwareScaling benchmark dataset classes under scaling/benchmark/dataset so they plug into BenchmarkRegistry, evaluation.py, and…
Skill by ErrDivine
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/errdivine-generate-benchmark-api
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, ml, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/generate-benchmark-api
What's inside
- Skill name
generate-benchmark-api- Description
- Implement or update LearnwareScaling benchmark dataset classes under scaling/benchmark/dataset so they plug into BenchmarkRegistry, evaluation.py, and BenchmarkOrganizer. Use when Codex needs to add a new benchmark, adapt a Hugging Face dataset into the repo's prompt/answer interface, port scoring or normalization from an official benchmark GitHub repo, fix split loading, or adjust filter_fn, process_docs, scoring, or registry wiring for an existing benchmark class.
- License
- MIT
- Instructions
- 85 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: contains an absolute path from the author's machine
Files (3)
- SKILL.md
- openai.yaml · agents/
- learnware-benchmark-patterns.md · references/
SKILL.md (first lines)
# Generate Benchmark API
## Overview
Implement repo-specific benchmark adapters for LearnwareScaling. Build concrete dataset classes that produce `KEY_PROMPT`, `KEY_GT`, and optionally `KEY_TEST`, register them with `BenchmarkRegistry`, and match the evaluation contract used by `/Users/errdivine/ErrDivine/SeriousResearches/LearnwareScaling/evaluation.py`.
## Workflow
1. Inspect the nearest existing benchmark family before editing:
- Generative or multiple-choice benchmarks: `general.py`, `medical.py`, `math.py`, `finance.py`
- Code-execution benchmarks: `code.py`
- Shared contract: `base.py`, `config.py`, `filter_fns.py`, `evaluation.py`
2. Check whether the benchmark has an official GitHub repo with evaluation code. If it does, clone or update that repo locally outside LearnwareScaling and inspect the stable evaluator before writing code.
3. Read `references/learnware-benchmark-patterns.md` for the repo map, class family patterns, evaluation invariants, and official-repo porting rules.
4. Place the new class in the existing domain module when it matches the file's grouping. Create a new module only when the benchmark family does not fit an existing one, then update `scaling/benchmark/dataset/__init__.py`.
5. Keep the implementation dataset-specific and direct. Do not add extra framework layers, factories, or abstractions that the current repo does not use.
## Implementation Rules
- Start `__init__` with `super().__init__(**kwargs)`. `BenchmarkRegistry.get()` passes `name=...`, so the base initializer must run.
- Define `dataset_path` as a class attribute unless the path must vary by subset.
- Load real dataset splits in `__init__`. If the source dataset uses nonstandard split names such as `validation`, map them explicitly.
- When an official GitHub evaluator exists, port its stable extraction, normalization, scoring, and test-harness behavior instead of re-inventing them. Refactor that logic into LearnwareScaling's interfaces rather than importing the external repo at runtime.
- Convert raw samples with `dataset.map(...)` into repo columns:
- `KEY_PROMPT`: final model prompt, including any task instruction or guide prompt
- `KEY_GT`: normalized reference answer for exact-match style scoring
- `KEY_TEST`: executable tests or structured scoring payload for code tasks
- After `map`, follow the repo pattern that remaps with `load_from_cache_file=False` if expected columns are missing.
- Implement `get_train_dataset()` and `get_test_dataset()` to return the prepared datasets or raise `NotImplementedError` when the benchmark truly has no train split.
- Implement `filter_fn(predictions, samples)` as a batch transform. Return one parsed answer per prediction.
- Reuse repo helpers before writing custom parsing:
- `regex_filter_fn` for simple extraction
- `filter_multi_choice` for option selection
- `extract_code_from_model` for code blocks
- Match scoring to the benchmark's real metric:
- Use `super().calculate_exact_match_score(...)` when normalized exact match is correct
- Override `calculate_score()` for code or test-based tasks
- Add custom normalization only when the benchmark requires it
- Prefer the official benchmark implementation over local convenience helpers whenever the two would differ in observable behavior.
- Add `get_generation_kwargs()` when the family already uses stop sequences or deterministic decoding settings.
- Register the class with `@BenchmarkRegistry.register("benchmark_name")`.
## Decision Guide
- Multiple-choice benchmark:
- Follow `medical.py` or `general.py`
- Provide `doc_to_text()` and usually `doc_to_choice()`
- In `filter_fn`, extract the last line first, then fall back to `filter_multi_choice`
- Short classification benchmark:
- Follow `finance.py`
- Keep prompts light, often just `doc["query"]` plus an answer cue
- Use a small label regex and case normalization
- Free-form math or QA benchmark:
- Follow `math.py` or `medical.py`
- Preserve any benchmark-specific normalization logic instead of forcing generic exact match
- Code generation benchmark:
- Follow `code.py`
- Store tests in `KEY_TEST`; `DatasetBase.ref_key` will route evaluation to that column
- Score with execution helpers instead of string exact match
- Benchmark with an official GitHub evaluator:
- Clone or update the upstream repo first
- Identify the stable scoring and answer-processing files
- Port that behavior into the closest family above without adding a dependency on the upstream package
## Validation
- Check that the class is imported through `scaling/benchmark/dataset/__init__.py` if needed.
- Confirm the registered name appears in `BenchmarkRegistry.list_benchmarks()`.
- When an official repo was used, verify the adapted parser and scorer still match the upstream evaluator's behavior on representative examples.
- Smoke-test the class locally with a short Python snippet or the evaluation path if dependencies are available.
- Verify these invariants before finishing:
- `get_test_dataset()` returns mapped rows with `prompt` and the expected reference column
- `filter_fn` returns the same number of items as the input predictions
- `calculate_score()` or `calculate_exact_match_score()` accepts lists and returns a scalar score
- The class works with `/Users/errdivine/ErrDivine/SeriousResearches/LearnwareScaling/evaluation.py` without extra glue code
## Pitfalls
- Do not rely on the missing `casual_reasoning.py` example mentioned elsewhere; use the benchmark modules that actually exist in this checkout.
- Do not skip the upstream repo review when the benchmark has an official GitHub evaluator; that is the source of truth for benchmark-specific behavior.
- Do not pass raw dataset columns into evaluation without renaming them to `KEY_PROMPT`, `KEY_GT`, and optionally `KEY_TEST`.
- Do not forget that `evaluation.py` passes mapped sample rows into `filter_fn`; parsing logic can use those samples.
- Do not switch code benchmarks back to `GenerativeDataset`; that breaks `ref_key` handling for test-based evaluation.From ErrDivine/LiteCode, MIT.
More from ErrDivine/LiteCode
- 0.474score
learnware-code-style
ErrDivine
Restyle only the user's changed files in the Learnware/Learnware-Private repository before commit.
SkillCFreshness: CClaude Code +9 - 0.470score
generate-ready-benchmark-api
ErrDivine
Implement or update ANCHOR inference-ready benchmark dataset classes under ready_datasets so they subclass InferenceReadyDataset, register with…
SkillCFreshness: CClaude Code +9 - 0.455score
skill-creator
ErrDivine
Create new skills, modify and improve existing skills, and measure skill performance.
SkillCFreshness: CClaude Code +9 - 0.455score
mcp-builder
ErrDivine
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools.
SkillCFreshness: CClaude Code +9 - 0.450score
pdf
ErrDivine
Use this skill whenever the user wants to do anything with PDF files.
SkillCFreshness: CClaude Code +9 - 0.450score
algorithmic-art
ErrDivine
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration.
SkillCFreshness: CClaude Code +9 - 0.450score
brand-guidelines
ErrDivine
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel.
SkillCFreshness: CClaude Code +9 - 0.450score
canvas-design
ErrDivine
Create beautiful visual art in .png and .pdf documents using design philosophy.
SkillCFreshness: CClaude Code +9 - 0.450score
doc-coauthoring
ErrDivine
Guide users through a structured workflow for co-authoring documentation.
SkillCFreshness: CClaude Code +9 - 0.450score
frontend-design
ErrDivine
Create distinctive, production-grade frontend interfaces with high design quality.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 20, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ErrDivine/LiteCode
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ErrDivine
- 0.474score
learnware-code-style
ErrDivine
Restyle only the user's changed files in the Learnware/Learnware-Private repository before commit.
SkillCFreshness: CClaude Code +9 - 0.470score
generate-ready-benchmark-api
ErrDivine
Implement or update ANCHOR inference-ready benchmark dataset classes under ready_datasets so they subclass InferenceReadyDataset, register with…
SkillCFreshness: CClaude Code +9 - 0.455score
skill-creator
ErrDivine
Create new skills, modify and improve existing skills, and measure skill performance.
SkillCFreshness: CClaude Code +9 - 0.455score
mcp-builder
ErrDivine
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools.
SkillCFreshness: CClaude Code +9 - 0.450score
pdf
ErrDivine
Use this skill whenever the user wants to do anything with PDF files.
SkillCFreshness: CClaude Code +9 - 0.450score
algorithmic-art
ErrDivine
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration.
SkillCFreshness: CClaude Code +9
Cite this page
generate-benchmark-api skill. Agent Mart. https://agentmart.dev/skills/errdivine-generate-benchmark-api (last updated 2026-10-24)