Overview
- Skill Key
- endogen/monitored-ralph-loop
- Author
- endogen
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/endogen/monitored-ralph-loop
- Latest Commit SHA
- 642d82ee7ed27b0e3f2f05136a4f8cc97449c218
Generate copy-paste bash scripts for Ralph Wiggum/AI agent loops (Codex, Claude Code, OpenCode, Goose). Use when asked for a "Ralph loop", "Ralph Wiggum loop", or an AI loop to plan/build code via PROMPT.md + AGENTS.md, SPECS, and IMPLEMENTATION_PLAN.md, including PLANNING vs BUILDING modes, backpressure, sandboxing, and completion conditions.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 ralph-loop 技能。 若已安装,则直接安装 ralph-loop 技能。
# Ralph Loop (Event-Driven)
Enhanced Ralph pattern with **event-driven notifications** — Codex/Claude calls OpenClaw when it needs attention instead of polling.
## Key Concepts
### Clean Sessions
Each iteration spawns a **fresh agent session** with clean context. This is intentional:
- Avoids context window limits
- Each `codex exec` is a new process with no memory of previous runs
- Memory persists via files: `IMPLEMENTATION_PLAN.md`, `AGENTS.md`, git history
### File-Based Notification Fallback
If OpenClaw is rate-limited when Codex sends a wake notification:
1. The notification is written to `.ralph/pending-notification.txt`
2. Wake is attempted (may fail)
3. When OpenClaw recovers, it checks for pending notifications
4. Work is never lost — it's all in git/files
## File Structure
```
project/
├── PROMPT.md # Loaded each iteration (mode-specific)
├── AGENTS.md # Project context, test commands, learnings
├── IMPLEMENTATION_PLAN.md # Task list with status
├── specs/ # Requirements specs
│ ├── overview.md
│ └── <feature>.md
└── .ralph/
├── ralph.log # Execution log
├── pending-notification.txt # Current pending notification (if any)
└── last-notification.txt # Previous notification (for reference)
```
## Notification Format
`.ralph/pending-notification.txt`:
```json
{
"timestamp": "2026-02-07T02:30:00+01:00",
"project": "/home/user/my-project",
"message": "DONE: All tasks complete.",
"iteration": 15,
"max_iterations": 20,
"cli": "codex",
"status": "pending"
}
```
Status values:
- `pending` — Wake failed or not attempted
- `delivered` — Wake succeeded
---
## OpenClaw Recovery Procedure
When coming back online after rate limit or downtime, **check for pending notifications**:
```bash
# Find all pending notifications across projects
find ~/projects -name "pending-notification.txt" -path "*/.ralph/*" 2>/dev/null
# Or check a speci...
# 🐺 Ralph Loop (Event-Driven)
An enhanced [Ralph pattern](https://ghuntley.com/ralph/) implementation with **event-driven notifications** and **rate-limit resilience** for AI agent loops.
## Key Features
- 🔔 **Event-driven notifications** — Agent notifies OpenClaw on decisions, errors, completion
- 💾 **File-based fallback** — Notifications persist to `.ralph/pending-notification.txt` if wake fails
- 🔄 **Clean sessions** — Each iteration is a fresh agent context (avoids context limits)
- 📋 **PLANNING/BUILDING modes** — Separate phases for architecture and implementation
- 🧪 **Backpressure** — Run tests/lints after each implementation
## What's Different?
| Standard Ralph | This Version |
|----------------|--------------|
| Bash loop runs until done/fail | Agent notifies on events |
| Manual monitoring | Automatic escalation |
| Silent failures | Immediate error alerts |
| No rate-limit handling | File-based notification fallback |
| Lost notifications | Always recoverable |
## How It Works
1. **PLANNING phase**: Agent analyzes specs, creates `IMPLEMENTATION_PLAN.md`
2. **BUILDING phase**: Agent implements tasks one by one, tests, commits
3. **Notifications**: Agent writes to `.ralph/pending-notification.txt` + triggers OpenClaw via cron
4. **Triage**: OpenClaw receives notification, evaluates if it can help or needs to escalate to human
### Notification Flow
```
Codex/Claude ──► .ralph/pending-notification.txt
│ │
└──► openclaw cron add ──┴──► OpenClaw (triage)
│
┌─────────┴─────────┐
▼ ▼
Can help? Escalate
│ │
▼ ▼
Fix & restart Notify human
```
### Notification Prefixes
| Prefix | Meaning | Typical Action |
|--------|---------|----------------|...
0xnyk
X Intelligence CLI — search, monitor, analyze, and engage on X/Twitter. TypeScript + Bun. AI agent skill.
heyixuan2
Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pipeline: search → generate → analyze → colorize → preview → open BS → user slice → print → monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D).
jackculpan
Track flight prices from Google Flights with this OpenClaw skill. Search routes, monitor prices, and get alerts when prices drop.
openclaw-trade
openclaw trading assistant| openclaw trading skill | nof1.ai & openclaw [moltbot] collaboration | We get the best practices from alpha arena trading seasons and bring it to clawdbot All top AI agents, realtime monitoring and news research, gather info from private insiders and many other! Using Hyperliquid API.
xquik-dev
X (Twitter) automation skill for AI coding agents. Tweet search, user lookup, follower/following extraction, media download, reply/retweet/quote extraction, 40+ tools, account monitoring & trending topics. REST API, MCP server, HMAC webhooks. Works with Claude Code, Cursor, Codex, Copilot, Windsurf & 40+ agents.
mohsinkhadim59
Step-by-step guides for installing and running OpenClaw, an open-source AI agent, on Mac, Linux VPS, and AWS covering setup, security, messaging channels, Google integration, skills, and monitoring.