harness-loop

harness-loop is a skill for Claude Code from joymin5655/Agent. It costs 98 tokens per session (1,685 once invoked), scanned A, original, MIT.

A fixed procedure for repeatedly improving two reviewer instruction files in an agent harness. It limits each improvement cycle to approved files and uses tests to judge changes.

In plain words
What is it for?
Use it to refine code-review and security-review prompts through repeated, test-checked improvement cycles. It can also cover a hook when that hook already has its own tests.
Why use it?
It keeps automated self-improvement focused and prevents the process from changing the rules that control it. This reduces the risk of judging changes without suitable tests.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash core/infra/loop-run.sh attempt <slug> --desc "<idea, <=80 chars>".

Part of the agent-harness-extras plugin — 10 skills, 1 agent shipped together

Good fit Use it to refine code-review and security-review prompts through repeated, test-checked improvement cycles. It can also cover a hook when that hook already has its own tests.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/joymin5655/Agent
agentmods
npx agentmods add skills/joymin5655/agent/harness-loop

Made for: Claude Code.

Or install agent-harness-extras, the plugin that ships this one along with the rest of its 10 skills, 1 agent.

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 harness-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/joymin5655/agent/harness-loop/github.svg)](https://agentmods.dev/skills/joymin5655/agent/harness-loop)
Your own site
<a href="https://agentmods.dev/skills/joymin5655/agent/harness-loop"><img src="https://agentmods.dev/badge/skills/joymin5655/agent/harness-loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for harness-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/joymin5655/agent/harness-loop"><img src="https://agentmods.dev/badge/skills/joymin5655/agent/harness-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,685 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.
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.00098 $0.01685
Opus 5.5 $0.00039 $0.00674
Sonnet 5.5 $0.00020 $0.00337
Haiku 4.5 $0.00010 $0.00169

Measured 16d ago against content hash a0200c372219, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

harness-loop 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 16d 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.

extras/skills/harness-loop/SKILL.md · 122 lines

How it starts

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

/harness-loop

HUMAN-ONLY-EDITED. This file is the §5 "program.md analog" (docs/internal/harness-improvement-plan.md §5.1): it states the loop's own rules. The loop agent reads it every iteration but must never edit extras/skills/harness-loop/SKILL.md itself — TARGET below is fixed to the reviewer-prompt pair precisely so a candidate cannot rewrite the regulation it runs under. Changing this file is a deliberate, human-reviewed act outside any loop session.

Mission

Apply the autonomous-improvement-loop procedure (§5, docs/internal/harness-improvement-plan.md) to this harness's own reviewer prompts. Default TARGET (the only files a loop iteration may edit): agents/code-reviewer.md and agents/security-reviewer.md. A hook-surface mission (editing core/hooks/) is allowed only when the target hook already has its own per-hook test battery (P1-3) — otherwise the grader's signal doesn't cover it and the loop would be scoring blind.

This skill specializes /loop (extras/skills/loop/SKILL.md) to one fixed mission; all mechanical enforcement is still core/infra/loop-run.sh — nothing here duplicates it.

Procedure

Work on branch harness-loop/<tag> (e.g. harness-loop/reviewer-precision-2026-08). Steps 2–9 repeat per attempt, subject to the cap, timeout, and circuit-breaker checked in step 9.

  1. Check git state. Confirm the current branch and commit (git status, git log -1) before touching anything — the loop must know exactly what "the mission's starting ref" (--base) means for this run.

  2. Edit TARGET only. Pick one improvement idea and change only the declared TARGET files — by default agents/code-reviewer.md and agents/security-reviewer.md. No other file changes in this step, tracked or untracked.

  3. Commit. git commit the TARGET-only change. This commit is the candidate loop-run.sh attempt will grade.

  4. Grade. Run:

    bash core/infra/loop-run.sh attempt <slug> --desc "<idea, <=80 chars>"
    

    Internally this calls bash core/tests/grade.sh --base <base ref> --target 'agents/(code-reviewer|security-reviewer)\.md' with output redirected to a run log — never straight into this conversation, which would be context pollution (C1 in the security review). --base and --target are mandatory: an unscoped grading call skips the TARGET-boundary check entirely, and grade.sh fails closed to harness_score: 0 rather than score blind.

Read the full file on GitHub · 122 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. 16d ago Changed · +20 lines · +2 tokens per session a0200c372219
  2. 1mo ago Changed 7f81d015ef55
  3. 2mo ago First seen · 102 lines · 96 tokens per session scan A c05c24bfb7a2

Subscribe to this mod's changes

harness-loop is a skill published in the GitHub repository joymin5655/Agent (2 stars, last pushed yesterday), licensed MIT. It adds 98 tokens to every session and 1,685 once invoked, about $0.0004 per session on Opus 5.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

harness-loop compared with skills from other repositories

harness-loop next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
harness-loopjoymin5655/AgentSkill2yesterdayMITA98Claude Code
autoreviewsimonrowland/goal-flightSkill2010d agoMITA32Claude Code
githublibrefang/librefang-registrySkill111mo agoMITA20Claude Code, Codex
otto-pr-review-loopomnigent-ai/omnigentSkill11kyesterdayApache-2.0A17Claude Code, Codex
meta-codereview-current-diffopensquilla/opensquillaSkill7.1k6d agoApache-2.0A73Claude Code, Codex
background-watch-hookavibe-bot/avibeSkill637yesterdayMITA32Claude Code, Codex
review-prdyoshikawa/rulesyncSkill1.6kyesterdayMITA61Claude Code, Codex