looper
Design visual, review-gated agent loops for Claude Code before you run them.
Install / Use
npx skills add ksimback/looperInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Skill content
View source on GitHubExample loop diagram
Looper turns a fuzzy automation idea into a reviewable loop shape before any
runner starts changing files. This example comes from
examples/ai-workflow-mapping.
flowchart TD
G["Goal + context<br/>process notes + definition of done"] --> P["Draft plan.md<br/>host: codex / gpt-5"]
P --> PG{"Plan gate<br/>judge: reviewer-1"}
PG -- "revise <= 3" --> P
PG -- "pass" --> D["Write delivery-N.md<br/>map the workflow"]
D --> DG{"Delivery gate<br/>programmatic check + judge"}
DG -- "revise <= 3" --> D
DG -- "pass" --> F["Final output<br/>all gates clean"]
S["State + log<br/>state.json + run-log.md"] -. "records" .-> P
S -. "records" .-> D
Stop["Stop guards<br/>max 12 iterations<br/>no progress x2<br/>budget caps"] -. "watch" .-> PG
Stop -. "watch" .-> DG
A loop design coach for Claude Code. Looper is a skill that helps you design a good agent loop — a sharp goal, checkable verification, and a second model in the review seat — then lets you run it in the same session or save it as a portable spec. It is a design layer first: it writes files and hands the current session a clear execution prompt.
Invoke it with /looper. It interviews you, critiques your design against built-in best-practice rubrics, lets you wire in a cross-model reviewer or judge (including non-Claude models), shows you the loop as a terminal-friendly ASCII flow preview, and writes out RUN_IN_SESSION.md, loop.yaml, a compiled loop.resolved.json, a human-readable LOOP.md, a thin run-loop.py you own and edit, plus an empty loop-workspace/ and a README for the loop.
Maintainer: Kevin Simback · GitHub @ksimback · X @ksimback License: MIT
Where Looper fits among Claude Code's loops
The Claude Code team's own taxonomy ("Getting started with loops") sorts loops by what you hand off: turn-based loops hand off the check (verification skills), goal-based loops hand off the stop condition (/goal), time-based loops hand off the trigger (/loop, /schedule), and proactive loops hand off the whole prompt (routines composing all of the above). Every one of those primitives runs a loop. Looper is the layer in front of them: it helps you design a loop that's worth running, then emits a spec any of the four can execute.
Concretely, what each loop type asks you to hand off is exactly what Looper coaches and hardens:
- Turn-based — the check you'd encode as a verification skill is Looper's typed
verificationblock: programmatic first, judge rubric second, human signoff last. - Goal-based —
/goal's stop condition is Looper'sdefinition_of_doneplus gates; the difference is who judges it (a model family you chose, against a typed rubric) and what surrounds it (revision caps, no-progress stalls, budget guards). - Time-based —
/loopand/schedulere-fire whatever you give them; give them a loop that already passed compile and lint, and each firing followsRUN_IN_SESSION.mdorrun-loop.pyinstead of an ad-hoc prompt. - Proactive — a routine is only as good as the prompt it repeats; the compiled
loop.resolved.jsonis a versionable, reviewable artifact you can hand to a routine and audit later.
What /goal actually does
/goal sets a persistent objective for the session. Once set, Claude keeps it as a reference point, checks after each significant action whether the current state satisfies the goal, and keeps working until it does — so it doesn't stop and ask after every step.
That's genuinely useful for persistence. But three things are missing for serious work:
- No coaching.
/goaltakes whatever goal you type, however vague. It won't tell you the goal is unfalsifiable or that "done" was never defined. Garbage goal in, confidently-wrong loop out. - Single-vendor evaluation. The stop condition is checked by an evaluator model, but it's the same vendor in the same pipeline — not a model family you chose for blind-spot coverage, and there's no typed rubric behind the verdict. A review council exists precisely to put a different set of eyes, with explicit criteria, on the work.
- No structure to inspect or reuse. The goal lives in the session, not as a portable, versionable artifact. There's no typed verification, no explicit gates, no second model.
What /loop and /schedule actually do
/loop is a scheduler. You give it an interval and a task; it re-fires the prompt or skill on that cadence — polling CI, watching a deploy, monitoring a background job. (Omit the interval and it self-paces.) /schedule is the same hand-off moved to the cloud: a routine that keeps firing when your machine is off.
They're the right tool for "run this thing every five minutes until I say stop." Neither is a loop designer: they don't help you decide what runs, define success criteria, or bring in a reviewer. They schedule; they don't critique.
Side by side
Looper is the design layer that sits in front of all of them. It produces a well-specified loop — coached goal, typed verification, a cross-model gate — then gives you a default in-session handoff prompt plus a portable spec. The same design can be run immediately in the conversation, driven by /goal for persistence, fired on a schedule by /loop or /schedule, or run later with Python. Looper doesn't replace them; it gives them something good to run.
| | /goal | /loop / /schedule | Looper |
| :-- | :-- | :-- | :-- |
| Layer | execution (in-session) | execution (scheduling, local / cloud) | design (pre-flight) |
| You hand off | the stop condition | the trigger | the design, checked before anything runs |
| Coaches your goal | no | no | yes |
| Typed, checkable verification | no | no | yes (programmatic / judge / human) |
| Reviewer model | built-in evaluator, same vendor | none | a different model family, by default |
| Explicit review gates | implicit | none | plan gate + delivery gate |
| Termination guards | goal-condition only | interval / until | iteration + revision + no-progress + budget caps |
| Portable, versionable artifact | no | the cron job / routine | loop.yaml + resolved spec |
| Static design checks | no | no | looper lint (CI-friendly) |
| Runs the loop | yes | yes | yes, by handing the current session a runnable prompt; Python runner optional |
The honest summary: if you already know your loop is well-designed and you just need it to persist or to fire on a schedule, /goal, /loop, and /schedule are the right reach. Looper exists for the part those don't touch — making sure the loop is worth persisting before you hand it off, and making sure something other than the author is checking the work.
Sources for the behavior described above: the Claude Code team's "Getting started with loops" guide and the skills/commands documentation at code.claude.com/docs. Behavior and version gates change frequently; verify against upstream before shipping.
What Looper provides
Looper provides loop design discipline: a clear goal, context sources, checkable verification, reviewer/judge gates, termination guards, a portable spec, a same-session execution handoff, and lightweight run state/log files.
Looper does not provide durable orchestration. It does not schedule cron jobs for you, persist step-level retries across process restarts, manage sub-agent lifecycles, enforce concurrency controls, or store a production run history. If you need those guarantees, use Looper to design the loop and hand the resulting spec to an orchestrator built for durable execution.
Healthy loop checklist
Before running a loop, Looper pushes you to make these explicit:
- Goal: what outcome the loop is trying to produce.
- Context: which files, commands, issues, or external sources the loop may inspect.
- Actions: which model, tools, commands, or human handoffs may change state.
- Feedback: which programmatic checks, judges, reviewers, or humans decide whether work is good enough.
- State: where the loop records status, decisions, blockers, and outputs.
- Stop conditions: success, max iterations, revision caps, no-progress signals, and budget caps. The external runner enforces wall-clock caps; token/USD caps are operator-visible advisory limits unless you add accounting around the configured CLIs.
- Execution boundary: current workspace, branch/worktree, external runner, or a separate durable orchestrator.
Quick start
Install as a global personal skill and slash command.
On Windows PowerShell:
irm https://raw.githubusercontent.com/ksimback/looper/main/install.ps1 | iex
On macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/ksimback/looper/main/install.sh | bash
If you prefer to inspect each step, use the manual install:
<details> <summary>Manual install commands</summary>Windows PowerShell:
git clone https://github.com/ksimback/looper "$env:USERPROFILE\.claude\skills\looper"
New-Item -ItemType Directory -Force "$env:USERPROFILE\.claude\commands" | Out-Null
Copy-Item "$env:USERPROFILE\.claude\skills\looper\commands\looper.md" "$env:USERPROFILE\.claude\commands\looper.md" -Force
macOS/Linux:
git clone https://github.com/ksimback/looper "$HOME/.claude/skills/looper"
mkdir -p "$HOME/.claude/commands"
cp "$HOME/.claude/skills/looper/commands/looper.md" "$HOME/.claude/commands/looper.md"
</details>
Then, in Claude Code:
/looper
Looper interviews you, writes the artifacts into a folder called looper-output,
and shows you an ASCII flow preview to confirm before anything is finalized. The
installer also creates a private .venv inside the skill directory and installs
PyYAML, which the helper compiler needs to read loop.yaml. It
then offers to run the loop right there in the same Claude Code session.
If you want a different folder name, pass it after /looper, for example
/looper client-onboarding-loop.
Start from a pattern template
Instead of a blank interview, start from a named, pre-designed loop:
/looper my-review --template code-review
| Template | Use when |
|----------|----------|
| security-scan | Read-only sweep of a repo for secrets, PII, and vulnerabilities → triaged SECURITY-FINDINGS.md. |
| code-review | Review a branch's diff against its base → typed, severity-rated REVIEW.md grounded in the diff. |
| bug-hunt | Reproduce a reported bug, fix the root cause, prove it with before/after repro evidence. |
| docs-sync | Find and fix doc/code drift → per-item DRIFT-REPORT.md; docs follow code, code untouched. |
| research-synthesis | Synthesize collected sources into a cited REPORT.md; every claim traceable to a file. |
Each template is a complete, compiler-validated loop.yaml with a handful of
{{PLACEHOLDER}} slots; the wizard asks only for those, picks models from
what's installed, and still runs its full critique, privacy, and preview flow
before emitting. See templates/loops/ for the catalog
and per-template docs — including how to add your own.
Lint any loop.yaml
The design rubrics also exist as a static checker — no wizard, no interview:
python scripts/loo
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
84.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
73.0k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
nanobot
48.5kUltra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps
Scrapling
82.8k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ
