by ksimback
Design visual, review-gated agent loops for Claude Code before you run them.
# Add to your Claude Code skills
git clone https://github.com/ksimback/looperLast scanned: 7/5/2026
{
"issues": [
{
"file": "README.md",
"line": 141,
"type": "remote-install",
"message": "Install command (remote install script piped to a shell — review the source before running): \"curl -fsSL https://raw.githubusercontent.com/ksimback/looper/main/install.sh | b\"",
"severity": "low"
},
{
"file": "README.md",
"line": 240,
"type": "dangerous-command",
"message": "Dangerous command (recursive delete of home/root): \"rm -rf \"$HOME\"",
"severity": "medium"
}
],
"status": "PASSED",
"scannedAt": "2026-07-05T07:24:47.203Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}looper is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by ksimback. Design visual, review-gated agent loops for Claude Code before you run them. It has 684 GitHub stars.
Yes. looper passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/ksimback/looper" and add it to your Claude Code skills directory (see the Installation section above). looper ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
looper is primarily written in Python. It is open-source under ksimback on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh looper against similar tools.
No comments yet. Be the first to share your thoughts!
Use Looper as a loop design coach and scaffolder. During design, interview,
critique, validate, and write files. After emission, offer to run the loop in
the current session using RUN_IN_SESSION.md; keep run-loop.py as the
advanced external runner.
--template <name> from the
/looper arguments. If no target is given, use ./looper-output. If the
target contains an existing loop.yaml, treat the task as an edit/resume
instead of a fresh scaffold. If a template was requested, follow Template
Mode below instead of the blank-slate interview in step 3.references/goal-rubric.md.references/verification-rubric.md.references/council-rubric.md.references/control-rubric.md.references/model-detection.md.revise_until_clean must name a judge member
or human as verdict_source.max_iterations, a revision cap on
each gate, a no-progress stop, and either a budget cap or an explicit human
stop point.loop.yamlloop.resolved.jsonLOOP.mdRUN_IN_SESSION.mdrun-loop.pyloop-workspace/README.mdloop.yaml, resolve the helper Python (see Helper Python
below) and run:
"$LOOPER_PYTHON" ${CLAUDE_SKILL_DIR}/scripts/looper.py compile <target>/loop.yaml --out <target>/loop.resolved.json --render <target>/LOOP.md --session-prompt <target>/RUN_IN_SESSION.md
Then run
"$LOOPER_PYTHON" ${CLAUDE_SKILL_DIR}/scripts/looper.py lint <target>/loop.yaml
and relay the findings: fix any error[...] before continuing (the spec
would not behave as written), and surface warning[...] lines to the user
as design coaching they may accept or address.RUN_IN_SESSION.md directly as the active task. If no, explain that
the same file is the easy restart path and run-loop.py is available for
advanced external execution.The pattern library lives at ${CLAUDE_SKILL_DIR}/templates/loops/ — one
directory per template containing a complete, compilable loop.yaml (with
{{PLACEHOLDER}} tokens marking project-specific slots), a README.md
(use-when, placeholder table, customization notes), and optionally
scripts/ with helper checkers. The catalog index is
templates/loops/README.md.
A template is a pre-answered interview, not a bypass of design review:
loop.yaml, the edit/resume
rule in step 1 wins: do not overwrite it with a template. Say the
directory already has a loop and ask the user to pick an empty target or
confirm they want it replaced before continuing.--template has no name, an unknown name, or the user asks what is
available, show the catalog table (template + use-when) and let them pick.loop.yaml and README.md. Use the template as the
seed instead of a blank spec.{{PLACEHOLDER}} slot named in the template README, run
the host-model stage against detected CLIs (detect-models) and swap
host / council invocations to what is actually installed and authed,
then confirm target and workspace paths.{{ token remains in loop.yaml. The compiler
prints looper: warning: unresolved template placeholders remain ...
for this case — treat that warning as a blocker, not advice.scripts/ directory (when present)
into <target>/scripts/ alongside the standard emitted files, before
running compile.loop.yaml, loop.resolved.json, or model registries..env, .env.*, secrets/**, and **/*.key.loop.yaml human-readable and commented where useful. The emitted
runner reads only loop.resolved.json.RUN_IN_SESSION.md as the default/easy execution handoff. It is meant
for the current LLM session or a future pasted prompt.templates/run-loop.py exactly unless the user explicitly asks to edit
the external runner contract.The installer creates a private venv inside the skill directory. Its Python
lives at .venv/bin/python on macOS/Linux and .venv/Scripts/python.exe on
Windows. Shell state does not persist between commands, so prefix every helper
invocation below with this resolution (works in POSIX shells and Git Bash on
Windows):
LOOPER_PYTHON="${CLAUDE_SKILL_DIR}/.venv/bin/python"; [ -x "$LOOPER_PYTHON" ] || LOOPER_PYTHON="${CLAUDE_SKILL_DIR}/.venv/Scripts/python.exe"; [ -x "$LOOPER_PYTHON" ] || { LOOPER_PYTHON=python3; "$LOOPER_PYTHON" -c "" >/dev/null 2>&1 || LOOPER_PYTHON=python; }
The final fallback executes the candidate rather than just locating it: on
Windows, python3 on PATH is often the Microsoft Store alias stub, which
exists but cannot run scripts. If no candidate can execute -c "", tell the
user to rerun the Looper installer (it creates the venv).
Each command below assumes the Helper Python resolution is prefixed in the same shell invocation:
"$LOOPER_PYTHON" ${CLAUDE_SKILL_DIR}/scripts/looper.py detect-models --write"$LOOPER_PYTHON" ${CLAUDE_SKILL_DIR}/scripts/looper.py register-model <id> --invoke "<cmd> [args...]""$LOOPER_PYTHON" ${CLAUDE_SKILL_DIR}/scripts/looper.py compile <target>/loop.yaml --out <target>/loop.resolved.json --render <target>/LOOP.md --session-prompt <target>/RUN_IN_SESSION.md--strict to fail on warnings, --json for tooling):
"$LOOPER_PYTHON" ${CLAUDE_SKILL_DIR}/scripts/looper.py lint <target>/loop.yaml"$LOOPER_PYTHON" ${CLAUDE_SKILL_DIR}/scripts/looper.py session-prompt <target>/loop.resolved.json --out <target>/RUN_IN_SESSION.mdUse this shape and customize labels:
+--------------------------------+
| 1. Goal + context |
| read sources |
+--------------------------------+
|
v
+--------------------------------+
| 2. Draft plan.md |
| state -> state.json |
+--------------------------------+
|
v
+--------------------------------+
| 3. Plan gate |
| verdict: reviewer-1 |
+--------------------------------+
| needs work -> revise <= 3 -> step 2
| pass
v
+--------------------------------+
| 4. Write delivery-N.md |
| log -> run-log.md |
+--------------------------------+
|
v
+--------------------------------+
| 5. Delivery gate |
| verdict: reviewer-1 |
+--------------------------------+
| needs work -> revise <= 3 -> step 4
| pass
v
+--------------------------------+
| 6. Final output |
| all gates clean |
+--------------------------------+
Stops: pass gates | max 12 iterations | no progress x2 | budget 30m, $5.0, 2000000 tokens
programmatic, judge, or human.revise_until_clean gate has a valid verdict_source.loop_control has iteration, revision, no-progress, and wall-clock or budget
caps.run-log.md and state.json path.loop.resolved.json, LOOP.md, and RUN_IN_SESSION.md compile
successfully before handoff.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
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:
verification block: programmatic first, judge rubric second, human signoff last./goal's stop condition is Looper's definition_of_done plus 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)./loop and /schedule re-fire whatever you give them; give them a loop that already passed compile and lint, and each firing follows RUN_IN_SESSION.md or run-loop.py instead of an ad-hoc prompt.loop.resolved.json is a versionable, reviewable artifact you can hand to a routine and audit later./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:
/goal takes 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./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.
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.
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.
Before running a loop, Looper pushes you to make these explicit:
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:
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://