Agent eval scaffold
Skill thebharathkumar/agent-flight-recorder/skills/agent-eval-scaffold
Generate an evals directory for an agent repo with a deterministic pytest harness, fixed seeds, golden files, a JSONL dataset format, and a GitHub Actions CI gate. Use when the user asks to add evals, regression tests for agent behavior, golden or snapshot testing for an agent, or a CI quality gate on agent output.From its SKILL.md
npx -y skills add thebharathkumar/agent-flight-recorder --skill agent-eval-scaffoldAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.9 KB, as published. Nobody here has run it
Agent Eval Scaffold
Generates a self-contained evals/ directory in the target repo. The
harness runs dataset cases through the user's agent deterministically and
compares normalized output against committed golden files. CI fails the PR
when goldens drift.
Procedure
- Locate the agent entrypoint: the function or graph invocation that takes an input and returns a result. If ambiguous, ask the user which callable the evals should exercise.
- Materialize
evals/in the target repo from the bundled templates:templates/harness.pytoevals/harness.py, then rewrite the line markedEDIT MEto import the real entrypoint.run_case(case)must call the agent with the case input and return a JSON-serializable result; adapt the call signature here.templates/conftest.pytoevals/conftest.py(seed pinning plus the--update-goldenflag; it also puts the repo root on sys.path).templates/test_golden.pytoevals/test_golden.pyunchanged.templates/smoke.jsonltoevals/datasets/smoke.jsonl, then replace the sample cases with 3 to 5 real ones based on the project's README or existing tests. Fields:id,input, optionalexpectedsubstring.templates/evals-README.mdtoevals/README.md.- Create an empty
evals/golden/directory.
- Copy
templates/evals-ci.ymlto.github/workflows/evals.ymland adjust the dependency install step to match the project (requirements file, uv, poetry, whatever it uses). - Determinism check: LLM-backed agents must run with temperature 0 and a
pinned model, or better, a recorded or stubbed model for CI. If some
output fields still vary, strip them in
normalize()inevals/harness.pyand note it inevals/README.md. Do not loosen the golden comparison itself. - Seed goldens:
pytest evals/ --update-golden, then immediately runpytest evals/twice. Two consecutive clean passes prove determinism; if the second pass fails, fixnormalize()before continuing. Commitevals/includinggolden/. - Show the user the failure mode: change one byte in a golden file, run
pytest evals/, show the drift failure, restore the file.
Files
templates/harness.py: run_case and normalize, the one file users edit.templates/conftest.py: seeds and the--update-goldenoption.templates/test_golden.py: parametrized golden comparison.templates/smoke.jsonl: dataset format example.templates/evals-README.md: docs dropped into the generated directory.templates/evals-ci.yml: PR gate workflow.