loop-runner

loop-runner is a skill for Claude Code from frankxai/claude-skills-library. It costs 104 tokens per session (1,971 once invoked), scanned A, original, MIT.

A procedure for running one controlled iteration of a file-based agent loop. The loop's instructions, current state, and journal are stored in a .loop directory.

In plain words
What is it for?
Use it when running one loop iteration manually, continuing a loop, or executing it on a schedule such as a cron job.
Why use it?
It gives recurring agent work a defined unit of progress, so each run follows the saved plan and records what happened.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code; runs codex exec; mentions Codex.

Part of the claude-skills-library plugin — 114 skills shipped together

Good fit Use it when running one loop iteration manually, continuing a loop, or executing it on a schedule such as a cron job.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/frankxai/claude-skills-library/loop-runner
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.

Any agent
npx skills add frankxai/claude-skills-library --skill loop-runner
Clone the repo
git clone --depth 1 https://github.com/frankxai/claude-skills-library

Made for: Claude Code.

Or install claude-skills-library, the plugin that ships this one along with the rest of its 114 skills.

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-runner

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/frankxai/claude-skills-library/loop-runner"><img src="https://agentmods.dev/badge/skills/frankxai/claude-skills-library/loop-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,971 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.00104 $0.01971
Opus 5.5 $0.00042 $0.00788
Sonnet 5.5 $0.00021 $0.00394
Haiku 4.5 $0.00010 $0.00197

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

Security

Grade A, and why

loop-runner 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 1mo 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.

free-skills/loop-runner/SKILL.md · 142 lines

How it starts

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

Loop Runner

You are one iteration of a durable loop. You start cold, you finish clean, and everything you learn goes into files — the next iteration (possibly a different agent, possibly you tomorrow) knows only what the loop directory says. Run exactly one unit; resist finishing "just one more".

The iteration protocol

Execute in order. Do not skip, reorder, or batch steps.

0 · Load

Read, in this order: .loop/<name>/LOOP.md (the whole charter), .loop/<name>/signs.md (every line is a binding rule earned from a past failure — treat them like Guardrails), .loop/<name>/state.json, the last 3 entries of .loop/<name>/journal.md, and .loop/<name>/backlog.md if the archetype uses one. Do not read the full journal — old entries are archive, not context.

1 · Gate

Refuse to run (exit with one journal line explaining why) if ANY of:

  • .loop/STOP or .loop/<name>/STOP exists — the operator's kill switch. Never delete a STOP file.
  • status is paused, stalled, blocked, done, or retired — only an operator or the orchestrator changes those.
  • iteration >= budget.max_iterations.
  • Done-when already passes → set status: done, journal it, report, stop.
  • The working tree is dirty with changes this loop didn't journal → set status: blocked, escalate per charter (H4 debris — a prior iteration died; a human or the orchestrator must adjudicate, not you).

Then check .loop/<name>/STEER.md. If present, it is live operator steering: incorporate it into this iteration's choices, quote it in the journal entry, then delete the file. Steering outranks the journal's Next: hint but never overrides Guardrails or promotion mode.

2 · Pick

Select the single unit per the charter's Iteration contract (top eligible backlog item; next failing test; the current blocker for a babysitter; …). If the last journal entry's Next: names a unit, prefer it unless it's now ineligible. If the same unit appears in the last 2 entries with ❌, you MUST take a different approach or escalate — never re-run a failed approach verbatim.

Read the full file on GitHub · 142 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. 1mo ago First seen · 142 lines · 104 tokens per session scan A 967774c1807c

Subscribe to this mod's changes

loop-runner is a skill published in the GitHub repository frankxai/claude-skills-library (47 stars, last pushed today), licensed MIT. It adds 104 tokens to every session and 1,971 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-09-03.

Related

Other skills, from other repositories

token-saver

Token optimization guide for Claude Code. This skill should be used when the user wants to reduce API costs, learn model routing strategies, or understand how to use free/cheaper tools (Ollama, Haiku) instead of burning expensive Claude tokens on routine tasks. Triggers on: save tokens, reduce costs, token tips, cheap…

chidekina/aria-superpowers · 85 tokens

wayfinder

A planning method that maps a large, uncertain project into linked decision tickets in a repository's issue tracker. An issue tracker is a system for recording and organizing project work.

vinvcn/mattpocock-skills-zh-CN · 40 tokens

scaffold-exercises

A directory scaffold for course exercises, with sections, exercise folders, and optional problem, solution, or explanation versions. It creates the required Markdown files and checks the result with the repository's linter.

vinvcn/mattpocock-skills-zh-CN · 46 tokens

domain-modeling

A practice for building and maintaining a project’s domain model: the shared terms, concrete scenarios, and recorded architecture decisions that describe what the software is about.

vinvcn/mattpocock-skills-zh-CN · 38 tokens

migrate-to-shoehorn

A testing guide for Shoehorn, a TypeScript library that lets tests provide only the fields they need from a larger data type.

vinvcn/mattpocock-skills-zh-CN · 53 tokens

ask-matt

A skill router that helps choose the right workflow or skill for the current task. It maps work from an initial idea through building and shipping, with separate paths for research, prototypes, and multi-session projects.

vinvcn/mattpocock-skills-zh-CN · 28 tokens