Ralph Loop 迭代开发循环
ralph-loop
启动 Ralph Loop 以进行迭代式自引用开发。当用户要求运行 ralph loop、启动迭代循环,或希望对某项任务反复自主迭代直至完成时使用。
- License 许可
- Apache-2.0
- 所属仓库
- stigmer/stigmer
- 最近更新
- 2026-11-15
- Stars
- ★ 9
- Forks
- 6
01 前言 Front Matter
- name
- ralph-loop
- description
- Start a Ralph Loop for iterative self-referential development. Use when the user asks to run a ralph loop, start an iterative loop, or wants repeated autonomous iteration on a task until completion.
03 SKILL.md 正文
Ralph Loop
Trigger
The user wants to start a Ralph loop. An iterative development loop where the same prompt is fed back after every turn, and the agent sees its own previous work each iteration.
Workflow
-
Gather the user's task prompt and optional parameters:
max_iterations(number, default 0 for unlimited)completion_promise(text, or "null" if not set)
-
Create the directory
.cursor/ralph/if it doesn't exist, then write the state file at.cursor/ralph/scratchpad.mdwith this exact format:--- iteration: 1 max_iterations: <N or 0> completion_promise: "<TEXT>" or null --- <the user's task prompt goes here>Example:
--- iteration: 1 max_iterations: 20 completion_promise: "COMPLETE" --- Build a REST API for todos with CRUD operations, input validation, and tests. -
Confirm to the user that the Ralph loop is active, then begin working on the task.
-
The stop hook automatically intercepts each turn end and feeds the same prompt back as a followup message. You will see it prefixed with
[Ralph loop iteration N.].
Guardrails
- If a completion promise is set, you may ONLY output
<promise>TEXT</promise>when the statement is completely and genuinely true. - Do not output false promises to escape the loop.
- Always recommend setting
max_iterationsas a safety net. - Quote the
completion_promisevalue in the YAML frontmatter if it contains special characters.
Output
Confirm the loop is active (prompt, iteration limit, promise if set), then start working on the task immediately.
04 同仓库更多 Skills
spreadsheet-export
Use whenever your work makes a table, to save it as a .csv too.
stigmer
Sets up Stigmer for the project in front of you and keeps working with it. Stigmer runs AI agents for the users of the person's own app. Use when the person asks to set up Stigmer, to add an AI agent for their app's users, to put an agent's chat in their app, or to make, run, change or read Stigmer agents.
Hookify 规则编写
writing-hookify-rules
当用户要求“创建 hookify 规则”“编写 hook 规则”“配置 hookify”“添加 hookify 规则”,或需要有关 hookify 规则语法和模式的指导时,应使用此技能。
SQL 数据库迁移
sql-migrations
编写安全的数据库模式迁移——采用可逆步骤、在线索引构建和分批数据回填。
Go 仓库代码规范
repo-conventions
在本仓库中修改 Go 代码的规范——错误包装、表驱动测试、文档注释、不引入新依赖,以及完成前运行 go test。
事故复盘报告撰写
incident-postmortem
撰写无指责的事故复盘报告——包括时间线、影响范围、根本原因、促成因素以及明确负责人的后续行动项。