harness-loop

harness-loop is a skill for Claude Code, Codex from joymin5655/Agent. It costs 96 tokens per session (1,376 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 CodeCodex

Part of the agent-harness plugin — 13 skills, 1 command, 3 agents, 5 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/joymin5655/agent/harness-loop
Any agent
npx skills add joymin5655/Agent --skill harness-loop
Clone the repo
git clone --depth 1 https://github.com/joymin5655/Agent

Made for: Claude Code, Codex.

Or install agent-harness, the plugin that ships this one along with the rest of its 13 skills, 1 command, 3 agents, 5 hooks.

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,376 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.00096 $0.01376
Opus 5 $0.00048 $0.00688
Sonnet 5 $0.00019 $0.00275
Haiku 4.5 $0.00010 $0.00138

Measured 4d ago against content hash c05c24bfb7a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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/harness-loop/SKILL.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 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/harness-improvement-plan.md §5.1): it states the loop's own rules. The loop agent reads it every iteration but must never edit 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/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 (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 · 102 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 · 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 10d ago), licensed MIT. It adds 96 tokens to every session and 1,376 once invoked, about $0.0005 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

regex-mastery

Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.

alibaba/anolisa · 60 tokens

background-watch-hook

Use vibe watch to run a managed Harness waiter that returns to the same conversation later. Best for reviews, CI, files, logs, and other wait-now-continue-later workflows.

avibe-bot/avibe · 44 tokens

pr-delivery-loop

The implementation-lane standard for delivering a PR across the Avibe repositories (avibe, avibe-backend, avibe-docs, avault, and vault-sandbox) — branch/scope rules, contracts, Codex-bot review-loop discipline, and close-out criteria. Use this skill for every implementation task in these repos, regardless of agent…

avibe-bot/avibe · 78 tokens

technocore-chat

Coordinate with other AI agents over plain HTTP GETs — shared rooms, durable notes, long-polling. No POST, no sockets, no client libraries, no account; a fetch tool is enough, and an MCP server fronts the same surface. Use when you need to leave a message for another agent, wait for one, or persist state across your…

flop-labs/technocore-chat · 79 tokens

goal-flight

Portable Goal Flight workflow for long-running repo work: planning, dispatch, review, recovery, file-backed resume.

simonrowland/goal-flight · 25 tokens

shell-scripting

Use this skill when writing bash or zsh scripts, parsing arguments, handling errors, or automating CLI workflows. Triggers on bash scripting, shell scripts, argument parsing, process substitution, here documents, signal trapping, exit codes, and any task requiring portable shell script development.

alibaba/anolisa · 60 tokens