Token导航 LogoToken导航TokenDH.com
开发执行命令clawhub未标认证来源可访问clear审计提醒

ralph-loop-agent拉尔夫·洛普特工

Agent Skill

ralph-loop-agent 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

93,960

周安装

3,915

GitHub Stars

公开资料未说明

下载量

31,320
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ralph-loop-agent(拉尔夫·洛普特工)
来源仓库:https://github.com/addozhang/ralph-loop-agent
安装命令:
openclaw skills install ralph-loop-agent
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install ralph-loop-agent

简介

指导 OpenClaw 代理使用 exec 和 process 工具执行 Ralph Wiggum 循环。代理通过 pty:true 协调编码代理(Codex、Claude Code、OpenCode、Goose)并提供适当的 TTY 支持。通过 PROMPT.md + AGENTS.md、SPECS 和 IMPLMENTATION_PLAN.md 计划/构建代码。包括规划与建设模式、背压、沙箱和完成条件。用户请求循环,代理使用工具执行。

SKILL.md

name
ralph-loop
description
Guide OpenClaw agents to execute Ralph Wiggum loops using exec and process tools. Agent orchestrates coding agents (Codex, Claude Code, OpenCode, Goose) with proper TTY support via pty:true. Plans/builds code via PROMPT.md + AGENTS.md, SPECS and IMPLEMENTATION_PLAN.md. Includes PLANNING vs BUILDING modes, backpressure, sandboxing, and completion conditions. Users request loops, agents execute using tools.
version
1.1.0
author
OpenClaw Community
keywords
[ralph-loop, ai-agent, coding-agent, pty, tty, automation, loop, opencode, codex, claude, goose, exec-tool, process-tool]
license
MIT

Ralph Loop

Overview

This skill guides OpenClaw agents to execute Ralph Loop workflows using the exec and process tools. The agent orchestrates AI coding agent sessions following the Ralph playbook flow:

1) Define Requirements → JTBD → Focus Topics → specs/*.md 2) PLANNING Loop → Create/update IMPLEMENTATION_PLAN.md (do not implement) 3) BUILDING Loop → Implement tasks, run tests (backpressure), update plan, commit

The loop persists context via PROMPT.md + AGENTS.md (loaded each iteration) and the plan/specs on disk.

How This Skill Works

This skill generates instructions for OpenClaw agents to execute Ralph Loops using the exec and process tools.

  • The agent calls exec tool with the coding agent command
  • Uses pty: true to provide TTY for interactive CLIs
  • Uses background: true for monitoring capabilities
  • Uses process tool to monitor progress and detect completion

Important: Users don't run these scripts directly - the OpenClaw agent executes them using its tool capabilities.


TTY Requirements

Some coding agents require a real terminal (TTY) to work properly, or they will hang:

Interactive CLIs (need TTY):

  • OpenCode, Codex, Claude Code, Pi, Goose

Non-interactive CLIs (file-based):

  • aider, custom scripts

Solution: Use exec + process mode for interactive CLIs, simple loops for file-based tools.


Agent Tool Usage Patterns

Interactive CLIs (Recommended Pattern)

For OpenCode, Codex, Claude Code, Pi, and Goose - these require TTY support:

When I (the agent) receive a Ralph Loop request, I will:

  1. Use exec tool to launch the coding agent:
   exec tool with parameters:
   - command: "opencode run --model <MODEL> \"$(cat PROMPT.md)\""
   - workdir: <project_path>
   - background: true
   - pty: true
   - yieldMs: 60000
   - timeout: 3600
  1. Capture session ID from exec tool response
  1. Use process tool to monitor:
   process tool with:
   - action: "poll"
   - sessionId: <captured_session_id>
   
   process tool with:
   - action: "log"
   - sessionId: <captured_session_id>
   - offset: -30  (for recent output)
  1. Check completion by reading IMPLEMENTATION_PLAN.md for sentinel text
  1. Clean up with process kill if needed:
   process tool with:
   - action: "kill"
   - sessionId: <session_id>

Benefits: TTY support, real-time logs, timeout handling, parallel sessions, workdir isolation


Agent Workflow

1) Gather Inputs

Required:

  • Goal / JTBD
  • CLI (opencode, codex, claude, goose, pi, other)
  • Mode (PLANNING, BUILDING, or BOTH)
  • Max iterations (default: PLANNING=5, BUILDING=10)

Optional:

  • Completion sentinel (default: STATUS: COMPLETE in IMPLEMENTATION_PLAN.md)
  • Working directory (default: $PWD)
  • Timeout per iteration (default: 3600s)
  • Sandbox choice
  • Auto-approval flags (--full-auto, --yolo, --dangerously-skip-permissions)

Auto-detect:

  • If CLI in interactive list → use exec tool with pty: true
  • Extract model flag from CLI requirements

2) Requirements → Specs (Optional)

If requirements are unclear:

  • Break JTBD into focus topics
  • Draft specs/<topic>.md for each
  • Keep specs short and testable

3) PROMPT.md + AGENTS.md

PROMPT.md references:

  • specs/*.md
  • IMPLEMENTATION_PLAN.md
  • Relevant project files

AGENTS.md includes:

  • Test commands (backpressure)
  • Build/run instructions
  • Operational learnings

4) Prompt Templates

PLANNING Prompt (no implementation):

You are running a Ralph PLANNING loop for this goal: <goal>.

Read specs/* and the current codebase. Only update IMPLEMENTATION_PLAN.md.

Rules:
- Do not implement
- Do not commit
- Create a prioritized task list
- Write down questions if unclear

Completion:
When plan is ready, add: STATUS: PLANNING_COMPLETE

BUILDING Prompt:

You are running a Ralph BUILDING loop for this goal: <goal>.

Context: specs/*, IMPLEMENTATION_PLAN.md, AGENTS.md

Tasks:
1) Pick the most important task
2) Investigate code
3) Implement
4) Run backpressure commands from AGENTS.md
5) Update IMPLEMENTATION_PLAN.md
6) Update AGENTS.md with learnings
7) Commit with clear message

Completion:
When all done, add: STATUS: COMPLETE

5) CLI Command Reference

The agent constructs command strings using these patterns:

CLICommand String Pattern
OpenCodeopencode run --model <MODEL> "$(cat PROMPT.md)"
Codexcodex exec <FLAGS> "$(cat PROMPT.md)" (requires git)
Claude Codeclaude <FLAGS> "$(cat PROMPT.md)"
Pipi --provider <PROVIDER> --model <MODEL> -p "$(cat PROMPT.md)"
Goosegoose run "$(cat PROMPT.md)"

Common flags:

  • Codex: --full-auto, --yolo, --model <model>
  • Claude: --dangerously-skip-permissions

Detailed Agent Tool Usage Examples

Example 1: OpenCode Ralph Loop

Agent executes this sequence:

Step 1: Launch OpenCode with exec tool
{
  command: "opencode run --model github-copilot/claude-opus-4.5 \"$(cat PROMPT.md)\"",
  workdir: "/path/to/project",
  background: true,
  pty: true,
  timeout: 3600,
  yieldMs: 60000
}

Step 2: Capture session ID from response
sessionId: "abc123"

Step 3: Monitor with process tool every 10-30 seconds
{
  action: "poll",
  sessionId: "abc123"
}

Step 4: Check recent logs
{
  action: "log",
  sessionId: "abc123",
  offset: -30
}

Step 5: Read IMPLEMENTATION_PLAN.md to check for completion
- Look for: "STATUS: COMPLETE" or "STATUS: PLANNING_COMPLETE"

Step 6: If complete or timeout, cleanup
{
  action: "kill",
  sessionId: "abc123"
}

Example 2: Codex with Full Auto

Agent tool calls:

exec tool:
{
  command: "codex exec --full-auto --model anthropic/claude-opus-4 \"$(cat PROMPT.md)\"",
  workdir: "/path/to/project",
  background: true,
  pty: true,
  timeout: 3600
}

# Then monitor with process tool as above

Completion Detection

Use flexible regex to match variations:

grep -Eq "STATUS:?\s*(PLANNING_)?COMPLETE" IMPLEMENTATION_PLAN.md

Matches:

  • STATUS: COMPLETE
  • STATUS:COMPLETE
  • STATUS: PLANNING_COMPLETE
  • ## Status: PLANNING_COMPLETE

Safety & Safeguards

Auto-Approval Flags (Risky!)

  • Codex: --full-auto (sandboxed, auto-approve) or --yolo (no sandbox!)
  • Claude: --dangerously-skip-permissions
  • Recommendation: Use sandboxes (docker/e2b/fly) and limited credentials

Escape Hatches

  • Stop: Ctrl+C
  • Kill session: process tool with action: "kill"
  • Rollback: git reset --hard HEAD~N

Best Practices

  1. Start small: Test with 1-2 iterations first
  2. Workdir isolation: Prevent reading unrelated files
  3. Set timeouts: Default 1h may not fit all tasks
  4. Monitor actively: Check logs, don't terminate prematurely
  5. Requirements first: Clear specs before building
  6. Backpressure early: Add tests from the start

Troubleshooting

ProblemSolution
OpenCode hangsEnsure agent uses exec tool with pty: true
Session won't startCheck CLI path, git repo, command syntax
Completion not detectedVerify sentinel format in IMPLEMENTATION_PLAN.md
Process timeoutAgent should increase timeout parameter or simplify tasks
Parallel conflictsAgent should use git worktrees for isolation
Can't see progressAgent should use process tool with action: "log"

License

MIT

Credits

This skill builds upon work by:

  • @jordyvandomselaar - Original Ralph Loop concept and workflow design
  • @steipete - Coding agent patterns and exec/process tool usage with pty support

Key improvement: Uses OpenClaw's exec tool with pty: true to provide TTY for interactive CLIs, solving the hanging issue that occurs with simple background bash execution.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

84.47%
按下载量换算26,456

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install ralph-loop-agent 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills