iterate-agent-harness

iterate-agent-harness is a skill for Claude Code, Codex from kensaurus/cursor-kenji. It costs 79 tokens per session (1,491 once invoked), scanned A, original, MIT.

A workflow for turning an agent failure into a lasting rule, guard, or automated check with a regression test. A regression test checks that a fixed problem does not return.

In plain words
What is it for?
It helps reproduce a failure, classify its cause, add a guard that catches it, apply the smallest durable fix, and test the guard.
Why use it?
It prevents the same class of failure—such as stopping early or claiming unfinished work is complete—from happening silently again.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit It helps reproduce a failure, classify its cause, add a guard that catches it, apply the smallest durable fix, and test the guard.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kensaurus/cursor-kenji/iterate-agent-harness
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.

Any agent
npx skills add kensaurus/cursor-kenji --skill iterate-agent-harness
Clone the repo
git clone --depth 1 https://github.com/kensaurus/cursor-kenji

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for iterate-agent-harness

README.md
[![agentmods](https://agentmods.dev/badge/skills/kensaurus/cursor-kenji/iterate-agent-harness.svg)](https://agentmods.dev/skills/kensaurus/cursor-kenji/iterate-agent-harness)
Your own site
<a href="https://agentmods.dev/skills/kensaurus/cursor-kenji/iterate-agent-harness"><img src="https://agentmods.dev/badge/skills/kensaurus/cursor-kenji/iterate-agent-harness.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,491 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00079 $0.01491
Opus 5 $0.00039 $0.00745
Sonnet 5 $0.00016 $0.00298
Haiku 4.5 $0.00008 $0.00149

Measured 4d ago against content hash 45042fe2b755, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

iterate-agent-harness 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 4d 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/iterate-agent-harness/SKILL.md · 136 lines

How it starts

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

iterate-agent-harness — Failure → Durable Guard

Degree of freedom: MIXED. Failure-class and smallest fix [HIGH freedom]; guard-fails-before-fix and the report shape [LOW freedom — run exactly].

When an agent run ends wrong, the fix is not just to redo the task — it is to change the harness so the whole class of failure cannot recur silently. This skill converts a single failure into a durable guard plus a regression check.

A failure you cannot reproduce, you cannot prove you fixed. Capture the failure mode, add a guard that fails on it, then make the guard pass with the smallest durable change.

How to reason

  1. Observe — happened vs should-have; transcript, state file, diff, CI
  2. Interpret — routing miss, missing guard, or a gate that passed wrongly
  3. Classify — premature stop / false completion / reward hacking / scope / handoff / context loss
  4. Guard — add a guard that fails on the unfixed behavior, then the smallest durable fix

Worked example

Observe: agent said complete-everything was done; .cursor/complete-everything-state.md still has 12 unchecked items. Interpret: false completion — no harness stopped the claim. Classify: false completion; gap is an unwired or skippable completion gate. Fix: add a hook test that fails while unchecked items remain; confirm it fails on this tree; then wire the hook. Do not delete the open items to go green.

Self-critique before reporting

  • Fail-then-pass — the new guard failed on the unfixed tree
  • Class, not incident — the same failure mode would now be caught
  • Guard not weakened — passing did not mean deleting or narrowing the check
  • Right owner — app bug → workflow-fix-and-ship; new SKILL.md from scratch → meta-skill-creator

Phase 0 — Capture the failure precisely [HIGH freedom]

  1. State what happened vs. what should have happened, in one sentence each.
  2. Classify the failure mode (borrow the taxonomy the toolkit already targets):
    • premature stop — quit with actionable work remaining
    • false completion — claimed done without evidence
    • reward hacking — satisfied the check, not the intent (skipped test, narrowed assertion, @ts-ignore, blanket snapshot update)
    • scope boundary error — treated the plan/visible list as the full scope
    • broken handoff — a skill/command/subagent pointed at a missing or wrong target, or a phase transition dropped work
    • context loss — forgot earlier state after compaction
  3. Pull evidence from the agent transcript, .cursor/*-state.md files, git diff, and CI logs. Link the concrete artifacts.

Read the full file on GitHub · 136 lines

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. 4d ago First seen · 136 lines · 79 tokens per session scan A 45042fe2b755

Subscribe to this mod's changes

iterate-agent-harness is a skill published in the GitHub repository kensaurus/cursor-kenji (9 stars, last pushed 10d ago), licensed MIT. It adds 79 tokens to every session and 1,491 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

review-ugc-render

Mandatory pre-publish review gate for a UGC video render. Transcribes the finished render's AUDIO with Whisper and word-diffs it against the approved spoken script, then gates setfinalrender — blocking a render whose generated audio mis-voices a word (e.g. the approved "human-vetted" spoken as "human witted"), drops…

gooseworks-ai/goose-skills · 116 tokens

testing

Use when writing or reviewing Flutter/Dart tests (unit, widget, golden), fixing flaky tests, adding coverage, or choosing between unit and widget tests.

evanca/flutter-ai-rules · 33 tokens

mockito

Use when generating mocks, stubbing methods, verifying interactions, capturing arguments, or choosing between mocks, fakes, and real objects (Mockito).

evanca/flutter-ai-rules · 32 tokens

mocktail

Use when creating mocks, stubbing methods, verifying interactions, registering fallback values, or choosing between mocks, fakes, and real objects (Mocktail).

evanca/flutter-ai-rules · 34 tokens

111-java-maven-dependencies

Use when you need to add or evaluate Maven dependencies that improve code quality or domain modeling — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), architecture testing (ArchUnit), or money and currency support (JavaMoney) — and want a…

jabrena/plinth · 133 tokens

130-java-testing-strategies

Use when you need to apply testing strategies for Java code — RIGHT-BICEP to guide test creation, A-TRIP for test quality characteristics, or CORRECT for verifying boundary conditions. This should trigger for requests such as Review Java code for testing strategies; Apply RIGHT-BICEP testing strategies in Java code…

jabrena/plinth · 96 tokens