/kenji:iterate-agent-harnessfrom kenji skills
Converts agent failures (premature stop, false completion, gamed checks) into durable guards with regression tests. Use when an agent stops early, fakes progress, or misses files.
Ships in kenji skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
Observe: agent said complete-everything was done;
.cursor/complete-everything-state.mdstill 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.
workflow-fix-and-ship; new SKILL.md from scratch → meta-skill-creator@ts-ignore, blanket snapshot update).cursor/*-state.md files,
git diff, and CI logs. Link the concrete artifacts.Find where the harness should have caught it:
Name the single smallest change that closes the class, not just this instance. Prefer strengthening an existing skill/rule/hook over adding a new one; only add a new component when no existing one owns the concern.
Before fixing, add something that fails on the captured failure:
scripts/, a hook test like
scripts/test-completion-gate.mjs, a validation rule) — preferred; orFor premature-stop and false-completion classes, two guards are mechanical: (1) transcript audit — every claimed action maps to a tool result; (2) turn-ending check — the last paragraph of a turn lists done vs owed, and an owed item with no named blocker means the turn should not have ended. Encode those as the guard rather than a wording tweak.
Confirm the guard actually fails against the current (unfixed) behavior — a guard that passes before the fix proves nothing.
Apply the minimal change that makes the guard pass by satisfying intent:
Do not weaken the guard to pass, and do not delete working behavior. Keep the public behavior of unrelated skills unchanged.
npm test or equivalent) so the new guard is wired in.CHANGELOG.md and/or a durable lessons note, so the same mistake
surfaces a reference next time.## Harness Iteration — <date>
Failure mode: <class> — <one-sentence description>
Root gap: <missing/weak guard or conflicting rule>
Guard added: <script/test/rule> — failed before, passes after
Durable fix: <smallest change>
Validation: <check suite> → green
Lesson recorded: <where>
verification-before-completion — the evidence discipline guards enforcecompletion-judge — independent verdict that catches false completioncomplete-everything / burndown-full — the closure loops guards protectcreate-skill / create-rule / create-hook — build the new guardmeta-skill-creator — author or refine a skill correctlyWhat SKILL.md sets; muted values are Claude Code's defaults
highThree short reads, in order
npx claudepluginhub kensaurus/skills --plugin kenji162 skills in this plugin
/audit-accessibilityWCAG 2.2 AA audit via playwright-cli: axe-core, keyboard, contrast, target size, focus, ARIA. Use when "audit accessibility", "check a11y", "WCAG audit", "check keyboard nav", or "test screen reader".
/audit-agent-speedMeasure and fix a slow coding-agent setup: status line, hooks, instruction bloat, effort, worktree pile-up, antivirus and indexer scans. Use when "Claude is slow" or "CPU is pinned". App speed → audit-performance.
/audit-analyticsRead-only audit of product-analytics events (PostHog, Amplitude, Mixpanel, GA4): taxonomy, funnels, consent-gated firing, dead or duplicate events. Use when "audit our analytics", "are we tracking the right events", or "funnel instrumentation".
/audit-auth-flowsRead-only audit of app-layer auth: route×gate matrix, session lifecycle, OAuth, provider traps (getSession vs getUser, middleware-only gates, CVE-2025-29927). Use when "audit our auth" or "check middleware protection". RLS → plan-rls-audit.
/audit-backend-architectureRead-only backend-architecture audit and pattern advisor, gated by stack. Use when "audit backend architecture", "which pattern should I use", "am I over-engineering", or "sync vs event-driven". Enforced boundaries → enhance-arch-boundaries.
/audit-bundle-sizeAnalyse and shrink a web app's JavaScript bundle. Use when "reduce bundle size", "code splitting", "slow initial load", or "why is the bundle so big". Runtime → audit-performance.
Other plugins' skills for the same job