MCP.so
Sign In

Loops

Reusable prompts and step-by-step workflows that let coding agents self-pace through a task until it's done.

Featured

Reviewmanual

PR Self-Review

Review your own diff like a senior reviewer, fix issues, and repeat for three passes before opening the PR.

Claude CodeCursor
Maintenanceinterval

Dependency Audit Weekly

Weekly loop to check outdated dependencies, propose safe upgrades, and open a summary.

Claude Code
Maintenancemanual

Dependency Upgrade One-by-One

Upgrade a single outdated package per iteration, fix breakages, and commit — safer than bulk npm update.

Cursor
Gitmanual

Merge Conflict Resolver

Rebase or merge target branch, resolve conflicts file by file, and loop until the branch is current and tests pass.

CursorClaude Code
Testingmanual

Test Until Green

Run your test suite, fix the smallest root cause on failure, and repeat until every test passes.

CursorClaude Code
Debuggingmanual

Investigation Script Loop

Write a small throwaway script to reproduce a bug, run it, read output, and iterate until the root cause is proven.

CursorClaude Code
Planningmanual

Spec-First Ship

Implement from a written spec.md checklist — each iteration completes one unchecked requirement with verification.

Claude CodeCursor
Performancemanual

Bundle Size Budget

Ship features without bloating the client bundle — loop until size checks pass under your budget threshold.

Cursor
Testingmanual

Visual Regression Until Match

Run Playwright or Percy visual snapshots on UI changes; fix unintended diffs until baselines match intentionally.

Cursor
Testingmanual

E2E Until Green

Run end-to-end tests, fix UI and integration failures, and loop until the E2E suite passes.

Cursor

Frequently asked questions

Common questions about reusable Loops for AI coding agents

1

What is a loop, exactly?

A loop is a reusable workflow for AI coding agents built around four parts: a goal, a check command that objectively verifies progress, an exit condition, and a max-iteration limit. Paste the kickoff prompt into your agent and it self-paces through the task, re-running the check command after each pass until the exit condition is met.

2

How is this different from writing a normal prompt?

A normal prompt is one instruction for one turn. A loop is the system around repeated turns — it tells the agent how to verify its own work and when to stop, so it can keep going without you re-prompting it after every attempt. This practice is known as loop engineering.

3

Which coding agents do these loops work with?

Most loops on this page are agent-agnostic — the kickoff prompt is plain text you can paste into Claude Code, Cursor, Codex, or any other coding agent. Each loop's page lists which agents it was specifically built and tested for.

4

When should I use an AI agent loop?

Use a loop when a task needs several revision passes and has an objective acceptance check, such as fixing tests, resolving CI failures, reviewing code, verifying a deployment, or completing a large refactor. One-off questions and tasks without a clear definition of done usually do not need a loop.

5

How should I design a check command and exit condition?

Choose a stable, repeatable check with a meaningful exit code, such as tests, type checking, linting, or a deployment health check. Define an observable completion state and set a maximum iteration count so the AI agent cannot retry forever.

6

Are AI coding loops safe to run?

A loop repeatedly executes prompts and commands, so restrict file, network, secret, and deployment access; run risky work in an isolated branch or sandbox; and keep iteration limits and human review. Never let an unreviewed loop run destructive commands.