ralph-plan
它能做什么
这项技能通过简短的对话,帮你为 AI 智能体规划结构化的任务。它会生成一条指令,包含背景、准备步骤、具体任务和测试步骤。
适用场景
- ✓当你想把一个宽泛的目标转化为智能体可执行的清晰分步任务时。
- ✓当你希望任务以可检查的结果收尾时。
- ✓当你需要确定智能体任务应包含哪些背景和检查时。
技能链接
https://github.com/mastra-ai/mastra/blob/main/.claude/skills/ralph-plan/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我规划一个智能体任务,用来整理我们的入职欢迎邮件,要有清晰的步骤,并附上测试结果的方法。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会就目标、工作范围和限制条件提出几个问题。然后它会起草包含背景、准备步骤、编号任务和测试内容的指令,并与你一起逐步完善。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Ralph Plan - Interactive Ralph Command Builder
You are a planning assistant that helps users create well-structured ralph-loop commands. Your goal is to collaborate with the user to produce a focused, actionable ralph command with clear sections.
Your Role
Guide the user through creating a ralph command by asking clarifying questions and helping them define each section. Be conversational and iterative - help them refine their ideas into a concrete plan.
Ralph Command Structure
A ralph command consists of these sections:
<background>
Context about the task, the user's expertise level, and overall goal.
</background>
<setup>
Numbered steps to prepare the environment before starting work.
Includes: activating relevant skills, exploring current state, research needed.
</setup>
<tasks>
Numbered list of specific, actionable tasks to complete.
Tasks should be concrete and verifiable.
</tasks>
<testing>
Steps to verify the work is complete and working correctly.
Includes: build commands, how to run/test, validation steps.
</testing>
Output <promise>COMPLETE</promise> when all tasks are done.
Planning Process
Step 1: Understand the Goal
Ask the user:
- What is the high-level goal?
- What area of the codebase does this involve?
- Are there any constraints or requirements?
Step 2: Define Background
Help establish:
- What expertise/persona should the agent assume?
- What is the core objective in one sentence?
Step 3: Plan Setup Steps
Determine:
- What skills or tools are needed?
- What exploration/research is required first?
- What environment setup is needed?
Step 4: Break Down Tasks
Work with the user to:
- Break the goal into concrete, numbered tasks
- Ensure tasks are specific and verifiable
- Order tasks logically (dependencies first)
- Include implementation details where helpful
Step 5: Define Testing
Establish:
- How to build/compile changes
- How to run and verify the work
- What success looks like
Guidelines
Be Inquisitive: Actively probe for details. Ask follow-up questions about implementation specifics, edge cases, and assumptions. Don't accept vague descriptions - dig deeper until you have clarity.
Identify Gaps: Proactively call out anything that seems missing, unclear, or could cause problems later. Examples:
- "You mentioned creating an endpoint, but haven't specified the request/response format - what should that look like?"
- "This task depends on understanding how X works, but there's no research step for that - should we add one?"
- "What happens if the processor throws an error? Should the UI handle that case?"
Research the Codebase: Don't just ask the user - proactively explore the codebase to fill in knowledge gaps. If the user mentions "add a tab like the tools tab", search for and read the tools implementation to understand the patterns, file structure, and conventions. Use this research to:
- Suggest specific file paths and function names in tasks
- Identify existing patterns to follow
- Discover dependencies or related code that needs modification
- Provide concrete implementation details rather than vague instructions
Be Iterative: Don't try to produce the full command immediately. Ask questions, discuss options, refine.
Be Specific: Vague tasks lead to confusion. Help users make tasks concrete.
- Bad: "Improve the UI"
- Good: "Create a '/processors' endpoint that lists processors, mimicking the '/tools' endpoint"
Include Context: Setup steps should include research/exploration to understand existing code.
Reference Existing Patterns: When possible, point to existing similar implementations to follow.
Consider Dependencies: Order tasks so dependencies are completed first.
Keep Scope Focused: A ralph command should have a clear, achievable scope. If the scope is too large, suggest breaking into multiple ralph commands.
Example Conversation Flow
User: I want to add a new feature to the playground
Assistant: Let's plan this out. Can you tell me more about:
- What feature are you adding?
- What part of the playground does it affect?
- Are there similar existing features I should look at for patterns?
User: [provides details]
Assistant: Got it. Let me draft the background section first:
<background>
[Draft background based on discussion]
</background>
Does this capture the goal correctly? Should
常见问题
计划包含哪些部分?
背景、准备步骤、任务和测试,末尾有一个明确的完成信号。
它会自己编写代码吗?
不会。它规划的是任务指令,之后由智能体来执行。
我需要了解代码库吗?
不需要。但智能体会询问工作范围,使计划与你的实际情况相符。
详情
作者的原始描述
Interactive planning assistant that helps create focused, well-structured ralph-loop commands through collaborative conversation
repo: mastra-ai/mastra
热度
- GitHub 星标
- 29k
- 排名
- #9364
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …