Skip to content

Grade and Iterate Agent Loop

Grade an AI agent's output against a rubric and retry within a fixed iteration cap

Stars
29,149
Licence
MIT
Files
5 files

What it does

This skill helps an AI agent run a bounded test-and-improve loop on another agent it is building. You write a rubric (a checklist of criteria), a separate grader scores the agent's work, and the skill reads the result and recommends whether to ship, revise and retry, escalate to a human, or resume. Iterations are capped (1 to 20), and a set of held-back test cases can be run in parallel to check the agent generalizes.

Great for

  • Developers building Claude Managed Agents who want a structured way to check quality before deploying
  • Teams that want a hard cap on automated retry attempts to control cost and runaway loops
  • People who need held-out test cases to confirm an agent works beyond the examples it was tuned on

Skip it if

  • Someone who has no agent to build or evaluate, since it only makes sense inside an existing agent-building workflow
  • Anyone expecting the grader to be a fully trustworthy judge; rubric scoring by a model can be wrong and still needs human review
  • Users who need open-ended self-improvement, because the skill explicitly stops at the iteration cap instead of improving indefinitely

Try asking

  • “Grade my agent against this rubric and tell me what to fix”
  • “Make the agent pass the rubric, but stop after 5 iterations”
  • “Is this agent good enough to ship? Run held-back eval cases in parallel”
  • “Read this grader result and tell me the next move”
Step-by-step guide: how to use Grade and Iterate Agent LoopInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 5 original files, the MIT licence and an attribution note.

    grade-iterate.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip grade-iterate.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip grade-iterate.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Write 3 to 5 specific, checkable rubric lines so the grader gives clear pass or fail verdicts
  • Keep held-back eval cases strictly separate from the cases used during iteration, at least 3 of them
  • Review the verdict explanation yourself before accepting a SHIP recommendation

What's inside

  • README.md
  • scripts/eval_scaffold.py
  • scripts/outcome_builder.py
  • scripts/verdict_reader.py
  • SKILL.md

Redistributed unmodified from alirezarezvani/claude-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.