loop

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

A controlled iteration process for running a mission as a series of separate coding attempts. Each attempt makes one change, checks it, and can resume from saved state after a restart.

In plain words
What is it for?
Use it to try multiple small improvements to a codebase while keeping a record of attempts and results. It is intended for ongoing missions, not a single task.
Why use it?
It limits repeated experimentation with timeouts, an attempt cap, and a stop rule after repeated failures. This prevents an automated loop from running indefinitely or relying only on trust.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: mentions subagents.

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 init <slug> --target '<regex>' --base <ref> \.

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

Good fit Use it to try multiple small improvements to a codebase while keeping a record of attempts and results. It is intended for ongoing missions, not a single task.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/joymin5655/agent/loop/github.svg)](https://agentmods.dev/skills/joymin5655/agent/loop)
Your own site
<a href="https://agentmods.dev/skills/joymin5655/agent/loop"><img src="https://agentmods.dev/badge/skills/joymin5655/agent/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 loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/joymin5655/agent/loop"><img src="https://agentmods.dev/badge/skills/joymin5655/agent/loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,264 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.00103 $0.01264
Opus 5.5 $0.00041 $0.00506
Sonnet 5.5 $0.00021 $0.00253
Haiku 4.5 $0.00010 $0.00126

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

Security

Grade A, and why

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 14d 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/loop/SKILL.md · 97 lines

How it starts

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

/loop

Goal

Run a mission as a bounded series of attempts: pick one idea, make exactly one change, grade it, keep or discard, and stop at a hard cap, a per-attempt timeout, or two consecutive GATE failures (circuit breaker) — never on trust alone. All mechanical enforcement (state, ledger, cap, breaker) lives in core/infra/loop-run.sh; this skill is the iteration protocol that calls it.

Run it from the root of a harness checkout: the default grader (core/tests/grade.sh) replays the harness's own batteries, so a mission in another project has no grader yet.

Relationship to skills/harness-loop

This skill is the generic protocol: fresh context per iteration, exactly one task per iteration, resumable on-disk state, hard budget. /harness-loop is a SPECIALIZATION of it for one fixed mission — improving this harness's own reviewer prompts under §5's rules (fixed TARGET regex, GATE floor, branch convention). If the mission is "improve the harness itself", follow /harness-loop instead of the generic steps below — its numbered procedure is the maintained regulation for that mission.

Steps

  1. Mission intake. From the request, determine: a slug (short, kebab-case), a TARGET file-path regex the loop may edit, a base ref (the mission's starting commit — usually HEAD), an attempt cap (default 5), and a per-attempt timeout in seconds (default 600). Confirm any ambiguous one with the user — a loop whose edit scope isn't pinned down is not this skill's contract.

  2. Initialize.

    bash core/infra/loop-run.sh init <slug> --target '<regex>' --base <ref> \
      [--cap N] [--timeout-s N] --mission "<one-line description>"
    

    This creates the SQLite goal row (supervisor-goal.sh, attempts modeled as waves), the JSON state file, and the active-loop flag that arms core/hooks/loop-write-guard.py for the rest of the session.

  3. Iterate. Each iteration is a fresh context turn — start a new conversation turn or subagent dispatch per iteration rather than carrying the previous iteration's reasoning forward, so each attempt is judged on its own diff, not on accumulated history — doing exactly one task: a. Pick one improvement idea within the declared TARGET. b. Edit only TARGET files. c. git commit the change. d. Grade it:

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

    e. Read the LOOP: line at the end of the output — the only line to act on:

    • LOOP: continue — the same output's ATTEMPT: status=… line says whether to keep this commit or git reset --hard back to the pre-attempt commit; then start the next iteration.
    • LOOP: stop(cap) or LOOP: stop(circuit-breaker) — the loop ended on its own; go to step 5.

Read the full file on GitHub · 97 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. 14d ago Changed · +4 lines 1ef42b498d29
  2. 2mo ago First seen · 93 lines · 103 tokens per session scan A 53e277799889

Subscribe to this mod's changes

loop is a skill published in the GitHub repository joymin5655/Agent (2 stars, last pushed yesterday), licensed MIT. It adds 103 tokens to every session and 1,264 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

loop compared with skills from other repositories

loop next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
loopjoymin5655/AgentSkill2yesterdayMITA103Claude Code
computer-useavibe-bot/avibeSkill637yesterdayMITA19Claude Code, Codex
apple-notesNousResearch/hermes-agentSkill261kyesterdayMITA17Claude Code, Codex
obsidianNousResearch/hermes-agentSkill261kyesterdayMITA19Claude Code, Codex
channels-setupCopilotKit/CopilotKitSkill39kyesterdayMITA141Claude Code
storage-retentionget-bb/bbSkill4.9kyesterdayMITA20Claude Code, Codex
dwsPinvou/pinvou-agentSkill2.9kyesterdayMITA193Claude Code, Codex