{"id":50975641,"url":"https://github.com/serenakeyitan/awesome-agent-loops","last_synced_at":"2026-06-19T07:32:37.532Z","repository":{"id":363463544,"uuid":"1263461743","full_name":"serenakeyitan/awesome-agent-loops","owner":"serenakeyitan","description":"A curated collection of the best /loop, /goal, and /schedule uses for Claude Code \u0026 Codex — real commands sourced from Twitter/X. The awesome-list of agent loops.","archived":false,"fork":false,"pushed_at":"2026-06-09T02:33:47.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-09T03:24:30.175Z","etag":null,"topics":["agentic","ai-agents","awesome","awesome-list","claude-code","codex"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serenakeyitan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-09T01:26:51.000Z","updated_at":"2026-06-09T02:33:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/serenakeyitan/awesome-agent-loops","commit_stats":null,"previous_names":["serenakeyitan/awesome-agent-loops"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/serenakeyitan/awesome-agent-loops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serenakeyitan%2Fawesome-agent-loops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serenakeyitan%2Fawesome-agent-loops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serenakeyitan%2Fawesome-agent-loops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serenakeyitan%2Fawesome-agent-loops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serenakeyitan","download_url":"https://codeload.github.com/serenakeyitan/awesome-agent-loops/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serenakeyitan%2Fawesome-agent-loops/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34522035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic","ai-agents","awesome","awesome-list","claude-code","codex"],"created_at":"2026-06-19T07:32:36.710Z","updated_at":"2026-06-19T07:32:37.526Z","avatar_url":"https://github.com/serenakeyitan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Awesome Agent Loops [![Awesome](https://awesome.re/badge.svg)](https://awesome.re)\n\n![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)\n\n- use this [link](https://cloud.first-tree.ai/login?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=awesome-loops-app) to use [first-tree 🌳](https://first-tree.ai/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=awesome-loops-site) for **free!!!** — the most efficient way to **loopmaxx your engineering work** :D\n- too lazy to remember loops? [loopable](https://github.com/serenakeyitan/loopable) suggests them while you chat, never auto-runs :)\n\n## The shape of a perfect loop\n\n![nested loop: /loop 30m wraps /goal, /goal wraps the /review skill](assets/nested-loop.svg)\n\n**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:\n\n```\n/loop 30m /goal all PR review comments resolved via /review, stop after 10 turns\n```\n\nClaude Code Loops ⚡️\n\u003e The best **`/loop`, `/goal`, and `/schedule`** prompts — copy-paste commands from X power users who stopped prompting one step at a time and started running loops.\n\nThree 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.)\n\nCopy any prompt, swap in your repo / PR / condition, run it.\n\n\u003e **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](https://x.com/0xMovez/status/2064047579499770218)) For the longer version, [@shannholmberg](https://x.com/shannholmberg/status/2063924108535197842) wrote the best primer on what agent looping actually is.\n\n## Table of Contents\n\n**`/loop` — repeat on an interval**\n- [Kill flaky tests](#kill-flaky-tests) · until 5 green runs in a row\n- [Watch tests](#watch-tests) · re-run every 15m, report failures\n- [Babysit a PR](#babysit-a-pr) · re-run `/review-pr` on a timer\n- [Babysit many PRs](#babysit-many-prs) · keep labeled PRs green \u0026 rebased\n- [Wait for CI, ping when green](#wait-for-ci) · poll a PR's checks\n\n**`/goal` — run until a condition is true**\n- [Fix tests + lint](#fix-tests--lint) · the \"$200/hr QA engineer\"\n- [Hit acceptance criteria](#hit-acceptance-criteria) · endpoint behaves to spec\n- [Migrate an API](#migrate-an-api) · move every call site, keep green\n- [Ship a PR until green](#ship-a-pr-until-green) · implement → PR → fix CI\n- [Reach coverage target](#reach-coverage-target) · add tests until 80%\n- [Get the build green](#get-the-build-green) · fix errors until build passes\n- [Clean up the slop](#clean-up-the-slop) · strip debug code, dead branches\n- [Apply DB migrations](#apply-db-migrations) · run + fix until status clean\n- [Format until clean](#format-until-clean) · run formatter until no diff\n- [Refactor with subagents](#refactor-with-subagents) · fan out across a module\n- [Flash firmware](#flash-firmware) · loop until the hardware behaves\n\n**`/schedule` — cron in the cloud**\n- [Morning issue triage](#morning-issue-triage) · label + summarize daily\n- [Keep docs in sync](#keep-docs-in-sync) · on every push to main\n\n---\n\n## A. `/loop` — repeat on an interval\n\n`/loop` re-runs a prompt (or another slash command) on a time interval, then sleeps between runs. Press `Esc` to stop. ([docs](https://code.claude.com/docs/en/scheduled-tasks))\n\n### Kill flaky tests\n\n```\n/loop run my test suite 20 times, collect every\nintermittent failure, fix or quarantine the flaky\nones, and don't stop until you get 5 consecutive\nfully-green runs\n```\n\nNo interval — Claude self-paces and ends the loop itself once 5 green runs in a row is provably met. [source](https://x.com/ericzakariasson/status/2064122350866682100)\n\n### Watch tests\n\n```\n/loop 15m run the test suite, and if anything fails,\nshow me the failing tests and the error output\n```\n\nThe shape is `/loop \u003cinterval\u003e \u003cprompt\u003e`. Stops when you close the terminal — use `/schedule` for runs that survive. [source](https://x.com/cnemalek/status/2062977991328583923)\n\n### Babysit a PR\n\n```\n/loop 20m /review-pr 1234\n```\n\nThe prompt can be another slash command. This is how Boris Cherny works now — he writes loops that prompt Claude, instead of prompting himself. [source](https://x.com/0xAndros/status/2064063929517777147)\n\n### Babysit many PRs\n\n```\n/loop 15m check every open PR labeled `codex-watch`\nand keep each healthy: fix CI failures, rebase when\nbehind main, and nudge if a review is pending\n```\n\nA 15-minute watchdog over a labeled set of PRs. Popularized as the \"PR Babysitter\" loop (boris-cherny) in the [loops!](https://loops.elorm.xyz/loops) catalog. [source](https://loops.elorm.xyz/loops)\n\n### Wait for CI\n\n```\n/loop 10m run `gh pr checks 1234`; if all pass, tell\nme it's ready to merge; if any fail, summarize which\nand why\n```\n\nUse `/loop` when you want to *watch* something on a clock, not drive an agent to a finish (that's `/goal`). [source](https://x.com/louiswharmby/status/2063962089819869227)\n\n---\n\n## B. `/goal` — run until a condition is true\n\n`/goal` sets a completion condition; after each turn a fast model checks it, and if it's not met Claude keeps going. `/goal \u003ccondition\u003e` to set, `/goal` to check, `/goal clear` to stop. ([docs](https://code.claude.com/docs/en/goal))\n\n### Fix tests + lint\n\n```\n/goal all tests pass and lint is clean\n```\n\nThe most-shared `/goal` on X. One sentence, and the agent fixes bugs, runs checks, and ships clean — \"literally a $200/hr QA engineer.\" [source](https://x.com/RodmanAi/status/2054975035639812170)\n\n### Hit acceptance criteria\n\n```\n/goal the /users endpoint returns 200 with a\npaginated JSON body, all tests pass, and lint is\nclean — stop after 20 turns\n```\n\n\u003e \"write /goals like acceptance criteria… you set a completion condition, the agent works until a fast evaluator confirms it's met.\"\n\n[source](https://x.com/akshay_pachaar/status/2055208848609460525)\n\n### Migrate an API\n\n```\n/goal every file importing from `./legacy-api` now\nimports from `./v2-api`, all tests pass, and\n`npm run typecheck` is clean — stop after 30 turns\n```\n\n\u003e \"A SINGLE CODEX `/goal` RUN IS THE CLEAR WINNER. NO ORCHESTRATION… it completely destroyed the Opus orchestration setup.\"\n\nTry one `/goal` with a clear finish line before reaching for a multi-agent harness. [source](https://x.com/KingBootoshi/status/2060068980728184842)\n\n### Ship a PR until green\n\n```\n/goal a PR is open for this change and every CI check\npasses — implement it, test locally, push, open the\nPR with `gh pr create`, then keep fixing failures\n(re-check with `gh pr checks`) until green; stop\nafter 10 turns\n```\n\nThe most-copied loop in the [loops!](https://loops.elorm.xyz/loops) catalog — drives the whole implement → push → PR → fix-CI cycle. [source](https://loops.elorm.xyz/loops)\n\n### Reach coverage target\n\n```\n/goal test coverage is at least 80% with all tests\npassing — add focused tests for the least-covered\nfiles, re-run coverage each turn, stop at the\nthreshold or after 12 turns\n```\n\nA bounded `/goal` with a numeric end state. Swap in your own threshold. [source](https://loops.elorm.xyz/loops)\n\n### Get the build green\n\n```\n/goal `npm run build` exits 0 — run the build, fix\nthe first error, repeat until it succeeds; stop after\n10 turns\n```\n\nIteratively clears compile and bundling errors until the production build passes. [source](https://loops.elorm.xyz/loops)\n\n### Clean up the slop\n\n```\n/goal the recent diff is clean and convention-aligned\n— review it for debug code, dead branches, and bad\nnames, fix with minimal edits until `npm run lint \u0026\u0026\nnpm test` passes; stop after 4 turns\n```\n\nThe \"De-Sloppify Pass\" — second most-copied loop in the [loops!](https://loops.elorm.xyz/loops) catalog. Great after an agent leaves a mess. [source](https://loops.elorm.xyz/loops)\n\n### Apply DB migrations\n\n```\n/goal all database migrations apply cleanly — run\nthem, fix schema or SQL errors, repeat until\n`npx prisma migrate status` is clean; stop after 6\nturns\n```\n\nKeeps applying and repairing migrations until the status check comes back clean. [source](https://loops.elorm.xyz/loops)\n\n### Format until clean\n\n```\n/goal `npm run format` leaves no diff — run the\nformatter, hand-fix anything it can't auto-fix, repeat\nuntil `git diff` is empty\n```\n\nRuns the formatter on repeat and fixes whatever it can't auto-resolve. [source](https://loops.elorm.xyz/loops)\n\n### Refactor with subagents\n\n```\n/goal refactor the dialogue system to support\nbranching + emotion tags\n```\n\n\u003e \"Set `/goal`… Claude spawned 3 subagents: one for parser, one for UI, one for tests. All three finished.\"\n\n`/goal` fanning out across a module. [source](https://x.com/hui1231123/status/2064147531194642525)\n\n### Flash firmware\n\n```\n/goal the onboard LED blinks in the specified pattern\n```\n\n\u003e \"I use `/goal` to define what the firmware should achieve… Claude writes the code and flashes it to the board via a J-Link debugger.\"\n\nNot just for web — anything with a verifiable end state works. [source](https://x.com/EitanRevach/status/2064135652288217093)\n\n---\n\n## C. `/schedule` — cron in the cloud\n\n`/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](https://code.claude.com/docs/en/routines))\n\n### Morning issue triage\n\n```\n/schedule every weekday at 9am, label new issues from\nthe last 24h by area and priority, and post a\none-line summary on each\n```\n\n\u003e \"Configure once — prompt + repo + connectors — and it runs 7×24 in the cloud, even with your computer off.\"\n\n[source](https://x.com/chenchengpro/status/2044212236881932637)\n\n### Keep docs in sync\n\n```\n/schedule on every push to main, check whether the\nchanged code drifted from the docs in /docs, and open\na PR fixing anything out of date\n```\n\n\u003e \"Trigger agents on a schedule, from a GitHub event, or via API. Anthropic uses this internally for docs and backlog maintenance.\"\n\n[source](https://x.com/starmexxx/status/2044653921629606204)\n\n---\n\n## More loops\n\n- [loops!](https://loops.elorm.xyz/loops) by [elorm](https://elorm.xyz) — a searchable catalog of 40+ ready-to-copy loops for Claude Code, Cursor, and Codex.\n\n## Contributing\n\nGot a great `/loop`, `/goal`, or `/schedule` use from X? Add it — one of these three commands, the actual command in a code block, the tweet as `[source](url)`. See [contributing.md](contributing.md).\n\n[![CC BY 4.0](https://licensebuttons.net/l/by/4.0/88x31.png)](https://creativecommons.org/licenses/by/4.0/) Licensed under [CC BY 4.0](license).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserenakeyitan%2Fawesome-agent-loops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserenakeyitan%2Fawesome-agent-loops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserenakeyitan%2Fawesome-agent-loops/lists"}