A curated collection of the best /loop, /goal, and /schedule uses for Claude Code & Codex — real commands sourced from Twitter/X. The awesome-list of agent loops.
# Add to your Claude Code skills
git clone https://github.com/serenakeyitan/awesome-agent-loopsGuides for using ai agents skills like awesome-agent-loops.
awesome-agent-loops is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by serenakeyitan. A curated collection of the best /loop, /goal, and /schedule uses for Claude Code & Codex — real commands sourced from Twitter/X. The awesome-list of agent loops. It has 165 GitHub stars.
awesome-agent-loops's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/serenakeyitan/awesome-agent-loops" and add it to your Claude Code skills directory (see the Installation section above).
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 awesome-agent-loops against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Timer outside, condition inside, skill innermost. /loop re-arms it on a schedule, /goal defines verified-done so it can't stop early, the skill does the work well:
/loop 30m /goal all PR review comments resolved via /review, stop after 10 turns
Claude Code Loops ⚡️
The best
/loop,/goal, and/scheduleprompts — copy-paste commands from X power users who stopped prompting one step at a time and started running loops.
Three built-in ways to make a coding agent keep working on its own: /loop re-runs a prompt on an interval, /goal runs until a condition is true, /schedule runs in the cloud on a cron. No plugins, no harnesses. (/goal is also in Codex, but only tracks a target.)
Copy any prompt, swap in your repo / PR / condition, run it.
Why "loops"? Boris Cherny, who created Claude Code, put it this way: "I don't prompt Claude anymore. I create loops — and the loops do the work. My job is to create loops." (source) For the longer version, @shannholmberg wrote the best primer on what agent looping actually is.
/loop — repeat on an interval
/review-pr on a timer/goal — run until a condition is true
/schedule — cron in the cloud
/loop — repeat on an interval/loop re-runs a prompt (or another slash command) on a time interval, then sleeps between runs. Press Esc to stop. (docs)
/loop run my test suite 20 times, collect every
intermittent failure, fix or quarantine the flaky
ones, and don't stop until you get 5 consecutive
fully-green runs
No interval — Claude self-paces and ends the loop itself once 5 green runs in a row is provably met. source
/loop 15m run the test suite, and if anything fails,
show me the failing tests and the error output
The shape is /loop <interval> <prompt>. Stops when you close the terminal — use /schedule for runs that survive. source
/loop 20m /review-pr 1234
The prompt can be another slash command. This is how Boris Cherny works now — he writes loops that prompt Claude, instead of prompting himself. source
/loop 15m check every open PR labeled `codex-watch`
and keep each healthy: fix CI failures, rebase when
behind main, and nudge if a review is pending
A 15-minute watchdog over a labeled set of PRs. Popularized as the "PR Babysitter" loop (boris-cherny) in the loops! catalog. source
/loop 10m run `gh pr checks 1234`; if all pass, tell
me it's ready to merge; if any fail, summarize which
and why
Use /loop when you want to watch something on a clock, not drive an agent to a finish (that's /goal). source
/goal — run until a condition is true/goal sets a completion condition; after each turn a fast model checks it, and if it's not met Claude keeps going. /goal <condition> to set, /goal to check, /goal clear to stop. (docs)
/goal all tests pass and lint is clean
The most-shared /goal on X. One sentence, and the agent fixes bugs, runs checks, and ships clean — "literally a $200/hr QA engineer." source
/goal the /users endpoint returns 200 with a
paginated JSON body, all tests pass, and lint is
clean — stop after 20 turns
"write /goals like acceptance criteria… you set a completion condition, the agent works until a fast evaluator confirms it's met."
/goal every file importing from `./legacy-api` now
imports from `./v2-api`, all tests pass, and
`npm run typecheck` is clean — stop after 30 turns
"A SINGLE CODEX
/goalRUN IS THE CLEAR WINNER. NO ORCHESTRATION… it completely destroyed the Opus orchestration setup."
Try one /goal with a clear finish line before reaching for a multi-agent harness. source
/goal a PR is open for this change and every CI check
passes — implement it, test locally, push, open the
PR with `gh pr create`, then keep fixing failures
(re-check with `gh pr checks`) until green; stop
after 10 turns
The most-copied loop in the loops! catalog — drives the whole implement → push → PR → fix-CI cycle. source
/goal test coverage is at least 80% with all tests
passing — add focused tests for the least-covered
files, re-run coverage each turn, stop at the
threshold or after 12 turns
A bounded /goal with a numeric end state. Swap in your own threshold. source
/goal `npm run build` exits 0 — run the build, fix
the first error, repeat until it succeeds; stop after
10 turns
Iteratively clears compile and bundling errors until the production build passes. source
/goal the recent diff is clean and convention-aligned
— review it for debug code, dead branches, and bad
names, fix with minimal edits until `npm run lint &&
npm test` passes; stop after 4 turns
The "De-Sloppify Pass" — second most-copied loop in the loops! catalog. Great after an agent leaves a mess. source
/goal all database migrations apply cleanly — run
them, fix schema or SQL errors, repeat until
`npx prisma migrate status` is clean; stop after 6
turns
Keeps applying and repairing migrations until the status check comes back clean. source
/goal `npm run format` leaves no diff — run the
formatter, hand-fix anything it can't auto-fix, repeat
until `git diff` is empty
Runs the formatter on repeat and fixes whatever it can't auto-resolve. source
/goal refactor the dialogue system to support
branching + emotion tags
"Set
/goal… Claude spawned 3 subagents: one for parser, one for UI, one for tests. All three finished."
/goal fanning out across a module. source
/goal the onboard LED blinks in the specified pattern
"I use
/goalto define what the firmware should achieve… Claude writes the code and flashes it to the board via a J-Link debugger."
Not just for web — anything with a verifiable end state works. source
/schedule — cron in the cloud/schedule saves a Routine — a prompt + repo + connectors that runs on Anthropic's cloud on a schedule (min 1 hour), so it keeps running with your computer off. (docs)
/schedule every weekday at 9am, label new issues from
the last 24h by area and priority, and post a
one-line summary on each
"Configure once — prompt + repo + connectors — and it runs 7×24 in the cloud, even with your computer off."
/schedule on every push to main, check whether the
changed code drifted from the docs in /docs, and