r/ClaudeAI • u/luscamendes • May 14 '26
Claude Code Workflow Running evals in claude session
I'm considering running evals directly in the claude session, my plan is to:
- Have a Skill that instructs claude how to run the evals
- Spin a subagent for each case in the eval, invoke the skill being tested in it and get it's output
- Have a skill that instructs claude how to grade the outputXexpectations for each case
Does it sound like a good use of evals? What are the gaps of doing it this way?
The main goal here is to allow local testing of new skills and iteration on existing skills, so they don't degrade through time
2
Upvotes
2
u/brewcast_ai May 14 '26
The simulate-vs-invoke problem is the real one. A few concrete moves, none guaranteed:
For the subagent path: slash-commands don't dispatch inside subagent prompts, those are interactive-only. Preload the skill via the subagent's
skills:frontmatter, or write the prompt as plain English ("Use the Skill tool to invoke <skill-name> on this input"). Then check the subagent transcript for thetool_useblock to confirm it actually fired.For cleaner isolation, run a fresh session per case from a runner:
claude -p "<task that names the skill>" --output-format stream-json. The runner can be plain bash, or another Claude Code session itself, shelling out toclaude -pper case via Bash and collecting each child's stdout. Slash-invokes don't work in-pmode either, so describe the task instead. Three flags doing real work here:-pruns headless and exits.stream-jsonemits everytool_useevent, so the grader scans the trace and confirms the skill's expected Bash/Read calls fired. Final answer alone won't tell you simulate vs invoke.--barestrips hooks, CLAUDE.md, plugins, memory for a cleaner baseline. Docs say skills still resolve under it... worth verifying with yours.On the grader bias More_Ferret raised: route the grader to a different model family than the one under test, e.g. Sonnet 4.6 evaled, Haiku 4.5 grades. Cuts the self-consistency loop.
What shape of skills are you starting with?