loop-run

A command that repeats a coding cycle in which one agent makes changes and another checks them against a written rubric, meaning a list of requirements.

In plain words
What is it for?
Running one or repeated maker-and-checker cycles, selecting Codex or Claude as the implementer, grading a project against its rubric, and reporting whether the requirements pass.
Why use it?
It keeps implementation work tied to explicit checks and can resume from unresolved requirements. A verification-only mode grades the result without changing files.

Skill for Claude CodeCodex

Part of the loopy plugin — 8 skills, 5 agents, 4 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hhamja/claude-code-harness/loop-run
Any agent
npx skills add hhamja/claude-code-harness --skill loop-run
Clone the repo
git clone --depth 1 https://github.com/hhamja/claude-code-harness

Made for: Claude Code, Codex.

Or install loopy, the plugin that ships this one along with the rest of its 8 skills, 5 agents, 4 hooks.

Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 906 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.00906
Opus 5 $0.00018 $0.00453
Sonnet 5 $0.00007 $0.00181
Haiku 4.5 $0.00004 $0.00091

Measured 2d ago against content hash 33662ff92094, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

loop-run scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/loop-run/SKILL.md · 44 lines

How it starts

The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.

loop-run — verified maker/checker cycles

Arguments ($ARGUMENTS): --once = exactly one cycle. --verify-only = grade once, report, write NOTHING (no marker, no state updates — strictly read-only).

Before anything

  1. No .claude/loop/: tell the user to run /loopy:loop-init and stop.
  2. Read, in order: state.md (entry point — resume from its unresolved list), goal.md, rubric.md, loop.config.md, and memory.md's ## Distilled rules.
  3. Preflight (skip for --verify-only): choose the implementer (codex vs claude) and write the run marker — procedure in references/preflight.md.

--verify-only path

Spawn the verifier agent with "grade .claude/loop/rubric.md". Print its report verbatim plus a one-paragraph summary. Update no file, then stop.

Cycle (repeat until a stop condition)

  1. Implement by the implementer chosen at preflight:
    • claude (or any fallback): pick the unresolved rubric criteria (from state.md), make the smallest change that could pass them — skip any approach under ## Approaches tried. Prefer the cheap explorer agent for reconnaissance over broad main-context reading.
    • codex: ONE fresh codex exec per cycle, never resume, prompt rebuilt from disk each cycle. Full procedure (prompt construction, the exact command, retry/fallback) in references/codex-exec.md.
  2. Phase gate — end of cycle only: spawn the verifier once with "grade .claude/loop/rubric.md". Never invoke it per file edit; it only reports.
  3. Apply the report — the main agent does ALL updates to rubric.md, state.md, memory.md, and review.md. Exact fields and rules: references/apply-report.md.

Stop conditions

  • Success: every rubric criterion passes → do NOT stop yet. Run the green gate ONCE (full runs only) before declaring done — procedure in references/green-gate.md.
  • Safety rails (mandatory, never skip):
    • iteration count would exceed max_iterations (loop.config.md) → stop, record the reason in state.md.
    • the same criterion failed 3 consecutive cycles → do NOT escalate yet. Replan first per the loop-engineering skill's references/replan.md: up to replan_max (default 2) genuinely different strategies (change approach / decompose / spike), never weakening the criterion. Only once replan is exhausted, escalate with 2-3 options (interactive: ask; headless: record them + the stall reason in state.md, set human_gate: stalled, end the turn).
    • An unbounded "repeat until pass" loop is forbidden.
  • --once: stop after one full cycle regardless of outcome (state/memory/review still updated).

Read the full file on GitHub · 44 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 44 lines · 36 tokens per session scan A 33662ff92094

Subscribe to this mod's changes

loop-run is a skill published in the GitHub repository hhamja/claude-code-harness (1 stars, last pushed 1mo ago), licensed MIT. It adds 36 tokens to every session and 906 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories