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.
git clone --depth 1 https://github.com/joymin5655/Agentnpx agentmods add skills/joymin5655/agent/loopWrote 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.
[](https://agentmods.dev/skills/joymin5655/agent/loop)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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
-
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.
-
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 armscore/hooks/loop-write-guard.pyfor the rest of the session. -
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 committhe 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'sATTEMPT: status=…line says whether to keep this commit orgit reset --hardback to the pre-attempt commit; then start the next iteration.LOOP: stop(cap)orLOOP: stop(circuit-breaker)— the loop ended on its own; go to step 5.
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.
- 14d ago Changed · +4 lines 1ef42b498d29
- 2mo ago First seen · 93 lines · 103 tokens per session scan A 53e277799889
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.
loop compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| loopjoymin5655/Agent | Skill | 2 | yesterday | MIT | A | 103 | Claude Code |
| computer-useavibe-bot/avibe | Skill | 637 | yesterday | MIT | A | 19 | Claude Code, Codex |
| apple-notesNousResearch/hermes-agent | Skill | 261k | yesterday | MIT | A | 17 | Claude Code, Codex |
| obsidianNousResearch/hermes-agent | Skill | 261k | yesterday | MIT | A | 19 | Claude Code, Codex |
| channels-setupCopilotKit/CopilotKit | Skill | 39k | yesterday | MIT | A | 141 | Claude Code |
| storage-retentionget-bb/bb | Skill | 4.9k | yesterday | MIT | A | 20 | Claude Code, Codex |
| dwsPinvou/pinvou-agent | Skill | 2.9k | yesterday | MIT | A | 193 | Claude Code, Codex |