ralph-loop-help
它能做什么
该技能解释 Ralph Loop 如何运作以及如何使用。适合初次接触重复式智能体循环、并希望看到简单示例的人。
适用场景
- ✓当你询问 Ralph Loop 是什么或如何运作的时候。
- ✓当你想看一个如何启动 Ralph 循环的示例的时候。
- ✓当你需要了解迭代次数上限或完成短语的选项的时候。
技能链接
https://github.com/cursor/plugins/blob/main/ralph-loop/skills/ralph-loop-help/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“什么是 Ralph Loop?如何启动一个最多运行二十轮的循环?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会解释同一个提示词会被一次又一次地反馈回去,并且它能在文件中看到自己先前的工作。它会展示各项选项以及如何停止循环。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Ralph Loop Help
Trigger
The user asks what Ralph Loop is, how it works, or needs usage guidance.
What to Explain
What is Ralph Loop?
Ralph Loop implements the Ralph Wiggum technique — an iterative development methodology based on continuous AI loops, pioneered by Geoffrey Huntley.
Core concept: the same prompt is fed to the agent repeatedly. The "self-referential" aspect comes from the agent seeing its own previous work in the files and git history, not from feeding output back as input.
Each iteration:
- The agent receives the SAME prompt
- Works on the task, modifying files
- Tries to exit
- Stop hook intercepts and feeds the same prompt again
- The agent sees its previous work in the files
- Iteratively improves until completion
Starting a Ralph Loop
Tell the agent your task along with options:
Start a ralph loop: "Build a REST API for todos" --max-iterations 20 --completion-promise "COMPLETE"
Options:
--max-iterations N— max iterations before auto-stop--completion-promise "TEXT"— phrase to signal completion
How it works:
- Creates
.cursor/ralph/scratchpad.mdstate file - Agent works on the task
- Stop hook intercepts exit and feeds the same prompt back
- Agent sees its previous work and iterates
- Continues until promise detected or max iterations reached
Cancelling a Ralph Loop
Ask the agent to cancel the ralph loop. It will remove the state file and report the iteration count.
Completion Promises
To signal completion, the agent outputs a <promise> tag:
<promise>TASK COMPLETE</promise>
The stop hook looks for this specific tag. Without it (or --max-iterations), Ralph runs indefinitely.
When to Use Ralph
Good for:
- Well-defined tasks with clear success criteria
- Tasks requiring iteration and refinement
- Iterative development with self-correction
- Greenfield projects
Not good for:
- Tasks requiring human judgment or design decisions
- One-shot operations
- Tasks with unclear success criteria
Learn More
- Original technique: https://ghuntley.com/ralph/
- Ralph Orchestrator: https://github.com/mikeyobrien/ralph-orchestrator
Output
Present the above information clearly to the user, tailored to their specific question.
常见问题
最大迭代次数选项有什么作用?
它为循环在自行停止之前最多运行多少轮设定了上限。
什么是完成短语?
智能体用来表示任务已完成的一句话,说出它就会结束循环。
这项技术是谁创造的?
该技能称杰弗里·亨特利(Geoffrey Huntley)是这项技术的先驱。
详情
作者的原始描述
Explain the Ralph Loop plugin, how it works, and available skills. Use when the user asks for help with ralph loop, wants to understand the technique, or needs usage examples.
repo: cursor/plugins
热度
- GitHub 星标
- 15k
- 排名
- #11009
- 许可证
- —
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
advisor
15k如果你开启该功能,让你的智能体在关键节点咨询一个更强的第二模型,例如在重大决定之前,或在错误上卡住时。
check-agent-compatibility
15k全面检查 AI 编程智能体能否启动、验证和记录某个代码仓库,并返回一个兼容性评分以及主要问题。
cli-for-agents
15k教你的智能体设计或审查命令行工具,使 AI 智能体无需提示即可运行,并提供清晰的帮助文字和示例。
continual-learning
15k通过把回顾过往对话的工作交给专门的记忆更新程序,使你的 AGENTS.md 笔记保持最新。