MCP.so
登录

Loops

可复用的提示词和分步工作流,让编码智能体自主推进任务直到完成。

精选

测试manual

Build Until Green

Run the production build, fix compile and bundling errors, and loop until the build succeeds.

CursorClaude Code
质量manual

A11y Audit Until Clean

Run automated accessibility checks on changed routes, fix violations, and repeat until the audit is clean.

Cursor
测试manual

Coverage Until Threshold

Add focused tests until coverage meets your threshold (e.g. 80%), without changing production behavior unnecessarily.

Claude Code
持续集成interval

CI Failure Watcher

Poll CI on an interval, investigate failures when checks go red, and push fixes until green.

CursorClaude Code
持续集成manual

Fix CI Until Green

Fetch the latest failed CI run, reproduce the failure locally, fix it, and repeat until checks pass.

CursorClaude Code
持续集成interval

PR Babysitter

Every 15 minutes, inspect open PRs with a watch label: nudge reviewers, fix CI, rebase if behind main.

CodexCursor
测试manual

Format Until Clean

Run the formatter, fix any remaining style issues, and loop until the codebase formats cleanly with no diffs.

Cursor
自动化manual

Ralph Story Executor

Fresh-context loop: pick one incomplete story from prd.json, implement it, run backpressure checks, commit, and update progress before the next iteration.

CursorClaude Code
测试manual

Flaky Test Triage

Run failing tests repeatedly, classify each failure as flaky or real, and fix only confirmed regressions.

Claude CodeCursor
测试event

Pre-Commit Guard

Hook that runs tests before git commit commands to block commits when the suite is red.

Cursor
代码评审manual

De-Sloppify Pass

After implementation, run a cleanup pass: remove debug code, tighten naming, delete dead branches, and align with project conventions.

Claude CodeCursor
自动化manual

Guardrails Learning Loop

When a check fails twice the same way, append a guardrail sign to .ralph/guardrails.md so the next iteration avoids repeating it.

CursorClaude Code
维护manual

Docs Sync After Edits

After code changes, find affected docs and update README, API references, and inline comments to match.

Cursor
运维interval

Deploy Verification Loop

On an interval, hit health and smoke endpoints after a deploy until all checks return healthy responses.

CodexCursor
持续集成interval

PR Watch Loop

Poll open PRs labeled codex-watch every 15 minutes, review activity, and flag regressions or stale threads.

CodexCursor
安全manual

npm Audit Fix Loop

Fix high/critical npm audit findings one at a time with test verification — not a blind npm audit fix --force.

Cursor
测试manual

Autoloop TDD

Test-first loop: write a failing test, implement the minimum code to pass, refactor, and repeat.

Claude Code
测试manual

Independent Verifier Pass

When implementation claims done, a separate verifier pass runs build, lint, and tests with no access to the implementer's rationale.

Claude Code
接口manual

OpenAPI Sync Until Valid

Keep openapi.yaml valid and in sync with route handlers — lint the spec and fix drift each pass.

Cursor
维护manual

Knip Until Clean

Find and remove dead exports, unused files, and orphan dependencies — loop until knip reports clean.

Cursor
接口manual

API Contract Until Match

Loop until API responses match the OpenAPI or JSON Schema contract — catch drift between docs and implementation.

Cursor
文档manual

Changelog Sync After Ship

After shipping a feature, loop until CHANGELOG.md has a user-facing entry and conventional commits are reflected.

Claude Code
持续集成manual

Ship PR Until Green

Implement on a branch, run tests, push, open a PR, wait for CI, and loop until checks pass and the PR is ready to merge.

Claude CodeCursor
调试manual

Reflexion Debug Loop

On each failed repro attempt, write a short reflection to disk, then retry with that memory — avoids repeating the same wrong fix.

Claude CodeCursor
数据库manual

Migration Until Applied

Run database migrations, fix schema issues, and loop until migrations apply cleanly in dev.

Cursor
测试event

Post-Merge Regression Guard

Hook that runs smoke tests after git merge or rebase to catch integration regressions immediately.

Cursor
运维manual

Staging Smoke Test

Run a fixed smoke checklist against staging after deploy: auth, core flows, and error budgets.

Cursor
代码评审manual

PR Self-Review

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

Claude CodeCursor
测试manual

Lint and Typecheck Fix

Run lint and typecheck, fix reported issues, and loop until the codebase is clean.

Cursor
测试event

Post-Edit Test Guard

Hook-based loop that runs related tests after file edits to catch regressions early.

Cursor

常见问题

关于 AI 编码 Agent 可复用 Loops 的常见问题

1

循环(loop)到底是什么?

循环是面向 AI 编码智能体的一种可复用工作流,由四部分构成:目标、用于客观验证进度的检查命令、退出条件,以及最大迭代次数上限。把启动提示词粘贴给你的智能体,它就会自主推进任务,每一轮都重新运行检查命令,直到满足退出条件为止。

2

这和写一句普通提示词有什么区别?

普通提示词是一轮对话里的一条指令;循环则是围绕多轮重复的一整套系统——它告诉智能体如何验证自己的产出、什么时候该停止,这样它就能持续推进,而不需要你在每次尝试后重新手动下达指令。这种做法就是 Loop Engineering(循环工程)。

3

这些循环支持哪些编码智能体?

本页大多数循环都不绑定特定智能体——启动提示词是纯文本,可以直接粘贴给 Claude Code、Cursor、Codex 或其他任意编码智能体使用。每条循环的详情页都列出了它专门构建并测试过的智能体。

4

什么时候适合使用 AI Agent Loop?

当任务需要多轮修改并且有客观验收方式时,适合使用 Loop,例如修复测试、处理 CI 失败、代码审查、部署验证和批量重构。一次性问答或没有明确完成标准的任务通常不需要循环。

5

如何为循环设计检查命令和退出条件?

优先选择稳定、可重复且返回明确退出码的检查命令,例如测试、类型检查、Lint 或部署健康检查。退出条件应描述可验证的完成状态,并设置最大迭代次数,避免 AI Agent 无限重试。

6

运行 AI 编码循环安全吗?

循环会重复执行提示词和命令,因此应限制文件、网络、密钥与部署权限,在隔离分支或沙盒中运行高风险任务,并保留最大迭代次数和人工复核步骤。不要让循环在未审查的情况下执行破坏性命令。