go-loop
Skill0 starsChanged 7 months agoMITView on GitHub
Close the AI media iteration loop autonomously. Generate → verify via quality gate → auto-regen items below threshold → build composite → commit → notify. Use whenever the user finishes a generation batch, says "go", "go loop", "ship it", "close the loop", "run the loop", or asks to automate the generate-verify-regen-commit cycle for AI images or video. Even when the user just says "finish this batch", "we're done generating", or appends /go-loop to any prompt, trigger this skill to close the loop properly without babysitting. Applies Boris Cherny's /go pattern to AI media pipelines.
In this repository5 other files it gives its agents.
- clip-feedbackSkill
- debug-pipelineSkill
- lockscenesSkill
- nb2-batchSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Run your verification script (see the verify skill for a CLIP-based implementation):
- Distinctive: line 35
Read the verdict JSON. If Claude just generated multiple items, iterate.
- Very specific: line 40
Look at failed_metrics — targeted fix per metric:
- Very specific: line 56
Run /simplify on any supporting code Claude wrote (prompt builders, batch scripts, helper utilities).
- Distinctive: line 92
Only send if the channel is configured.
- Very specific: line 99
Respect file locks: If /lockscenes is active, respect the guard.
- Distinctive: line 100
If FAIL after 2 passes: stop, summarize, ask: Don't auto-escalate to a different generator without user input.
- Very specific: line 104
When /go-loop completes, print a compact summary (no headers, no celebration):
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/go-loop — Iteration Loop Closer
Boris Cherny's /go pattern applied to AI media pipelines: when invoked, Claude tests its own work end-to-end, simplifies, commits, and pings you. No babysitting.
The Loop
GENERATE → VERIFY → [regen if FAIL, max 2 passes] → COMPOSITE → COMMIT → NOTIFYWhen to Invoke
Invoke at the end of any generation task. Safe to chain after batch generators, direct API calls, or MCP tool calls.
Example prompts:
regen shot-06 with updated prompt /go-loopgenerate remaining CGI shots using approved refs /go-looptry shot-08 variants for energy match /go-loop
Execution
Step 1 — Verify what was just generated
Run your verification script (see the verify skill for a CLIP-based implementation):
python3 scripts/verify.py <ITEM_ID> --jsonRead the verdict JSON. If Claude just generated multiple items, iterate.
Step 2 — Regen if FAIL (max 2 passes)
For any item with verdict FAIL:
- Look at
failed_metrics— targeted fix per metric:characterfail → ensure character refs are passed to the generatorpalettefail → check world/palette assignment, enforce palette hint in promptprompt_matchfail → revise prompt wording, tighten focal lengthcompositefail → cross-check frame selection
- Regen via same path. Do NOT burn credits if a prompt fix alone would resolve.
- Re-verify. If still FAIL after 2 regens → surface to user, do NOT continue loop.
Step 3 — Build composite
python3 scripts/assemble.py --composite <ITEM_ID>Step 4 — Simplify (optional)
Run /simplify on any supporting code Claude wrote (prompt builders, batch scripts, helper utilities). Skip for pure generation work.
Step 5 — Commit
Summary commit with:
- Items touched (IDs)
- Pre/post quality scores
- Regen count per item
- References used
Commit message format:
<item-ids>: <short description>
Quality deltas: shot-06 0.31→0.42 (GOOD), shot-08 0.28→PASS, shot-11 FAIL after 2 regens
Co-Authored-By: Claude <noreply@anthropic.com>Step 6 — Notify (optional)
Send summary to the user via your preferred channel (Telegram, Slack, email). Format:
/go-loop complete
<N> items verified, <M> regenned
Results:
shot-06: GOOD (0.42)
shot-08: PASS (0.31)
shot-11: FAIL after 2 passes — needs manual review
Composite: runs/composites/latest.png
Commit: <hash>Only send if the channel is configured. Otherwise skip silently.
Invariants (don't break these)
- Never regen more than 2x per item per invocation. Burns credits; if still failing, the prompt or reference is the issue — hand back to user.
- Never skip verification. The whole point is the tight loop. No verification = no /go.
- Always pass references to the generator. Double-check before regen.
- Respect file locks. If
/lockscenesis active, respect the guard. - If FAIL after 2 passes: stop, summarize, ask. Don't auto-escalate to a different generator without user input.
Output format to user
When /go-loop completes, print a compact summary (no headers, no celebration):
shot-06 GOOD 0.42 (1 regen)
shot-08 PASS 0.31 (0 regens)
shot-11 FAIL — 2 regens, character metric stuck at 0.48
composite: runs/composites/2026-04-16.png
commit: a7b3c9d
notifiedRelated Skills
verify— the underlying quality gateclip-feedback— for single-clip intent analysisnb2-batch— for batch-generating reference gridslockscenes— for locking approved items during assembly
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

