Agent-Loop-Skills bundle — loop until it's better
Six verification-gated loops in one open-standard skill bundle — autoresearch, scientific writing, data analysis, code/SQL/prompt optimization, and red-teaming — portable across Claude Code, Codex, and Cursor. Use the red-teaming loop only against systems you own and are authorized to test.
Implementation note
When to use: you want verification-gated looping across more domains than code — the bundle covers autoresearch, scientific writing, data analysis, code, SQL, and prompt optimization, plus red-teaming, in one install. How it works: six loops packaged as open-standard Agent Skills, portable across Claude Code, Codex, and Cursor. Each follows the same loop-until-it-is-better contract: iterate, check the result against a verification gate, and continue only while the gate says the artifact genuinely improved — the same anti-self-grading structure applied per domain. Safety: verification gates are the common rail across all six loops. The red-teaming loop carries its own explicit boundary: use it only against systems you own and are authorized to test — pointing an autonomous adversarial loop at anything else is out of bounds regardless of intent. As with any skill bundle, read each skill before first run and apply your own iteration caps around it.
Source: gaasher/Agent-Loop-Skills ↗
More quality loops
Repair accessibility, highest-impact first
Confirm barriers against an agreed standard, fix the one with the greatest user impact, and rerun the same checks.
Karpathy-Style CLAUDE.md Self-Check Protocol for Loops
A self-check protocol embedded in CLAUDE.md that every loop iteration obeys before ending a turn: re-read the goal, diff the changes against it, run the verification command, and state what remains — a ritual that catches drift between iterations.
Clean up the slop
Review your recent diff for debug code, dead branches, and bad names, then fix with minimal edits until lint and tests pass.