run-ralph
Skill91 starsChanged 7 months agoMITView on GitHub
Start, stop, or check status of a Ralph autonomous task loop. Runs a checklist of tasks overnight — one per fresh context window, commits after each, messages progress.
- Reads credentials
In this repository55 other files it gives its agents.
- ab-test-setupSkill
- ad-creativeSkill
- add-discordSkill
- add-gmail-agentSkill
- add-heartbeatSkill
- add-morning-briefingSkill
- add-slackSkill
- add-telegramSkill
- add-telegram-swarmSkill
- add-update-checkSkill
- add-voice-replySkill
- add-voice-transcriptionSkill
- ai-seoSkill
- analytics-trackingSkill
- churn-preventionSkill
- cold-emailSkill
- competitor-alternativesSkill
- content-strategySkill
- copy-editingSkill
- copywritingSkill
- customizeSkill
- debugSkill
- designSkill
- domain-checkSkill
- email-sequenceSkill
- form-croSkill
- free-tool-strategySkill
- get-qodo-rulesSkill
- launch-strategySkill
- marketing-ideasSkill
- marketing-psychologySkill
- migrate-memorySkill
- onboarding-croSkill
- page-croSkill
- paid-adsSkill
- paywall-upgrade-croSkill
- popup-croSkill
- pr-babysitterSkill
- pricing-strategySkill
- product-marketing-contextSkill
- programmatic-seoSkill
- qodo-pr-resolverSkill
- referral-programSkill
- revopsSkill
- sales-enablementSkill
- schema-markupSkill
- seo-auditSkill
- setup-ghostclawSkill
- setup-shared-folderSkill
- setupSkill
- signup-flow-croSkill
- site-architectureSkill
- social-contentSkill
- update-ghostclawSkill
- update-nanoclawSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 44
Read the task file and assess each unchecked task:
- Distinctive: line 61
Add up the estimates and add 2 for retry buffer.
- Distinctive: line 71
If the user just says "go" or "run it", use your estimate.
- Distinctive: line 75
Write an IPC file:
- Distinctive: line 131
When all tasks are checked off:
- Distinctive: line 140
Max iterations hit: Run stops, bot tells you how many tasks completed
- Very specific: line 141
Service restart: Run state is on disk (data/ralph/{id}/config.json), but the current iteration's scheduled task may need re-queuing
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Run Ralph — Autonomous Task Loop
Runs a markdown task file (checkboxes) as an autonomous loop. Each task gets a fresh agent with a fresh context window. After completing a task, the agent commits, the orchestrator marks it done, and schedules the next. Messages you with progress between iterations.
Starting a Run
1. Create or identify the task file
The task file is standard markdown with checkboxes:
# Feature: User Authentication
- [ ] Create user model with email and password fields
POST /api/users table with bcrypt hashing
Unit tests for model validation
- [ ] Add login endpoint with JWT
POST /api/login returns token
Returns 401 on invalid credentials
- [ ] Add registration endpoint
POST /api/register with email verification
Duplicate email returns 409Rules for good task files:
- Each task must be completable in one agent session (one context window)
- Include acceptance criteria as indented lines below each checkbox
- Tasks run in order — put dependencies first
- Already-checked items
[x]are skipped
2. Get the chat JID
sqlite3 store/messages.db "SELECT jid FROM registered_groups WHERE folder = 'main' LIMIT 1;"3. Estimate iterations
Read the task file and assess each unchecked task:
Simple tasks (1 iteration each):
- Config changes, env vars, small edits
- Adding a single file or endpoint
- Running a command and reporting results
Medium tasks (2 iterations each):
- New feature with tests
- Integration with an external service
- Refactoring across multiple files
Complex tasks (3 iterations each):
- Multi-file architectural changes
- New system with several moving parts
- Anything with "and also" or multiple acceptance criteria
Add up the estimates and add 2 for retry buffer. Tell the user:
"You have N tasks. I'd estimate M iterations based on complexity:
- 3 simple (3 iterations)
- 2 medium (4 iterations)
- 1 complex (3 iterations)
- Total: 12 iterations (10 + 2 buffer)
Want me to run with that, or set a different limit?"
If the user just says "go" or "run it", use your estimate. Don't block on confirmation for small runs (under 10 iterations).
4. Start the run
Write an IPC file:
CHAT_JID="<main chat JID>"
TASK_FILE="/absolute/path/to/tasks.md"
WORK_DIR="/absolute/path/to/project"
MAX_ITER=<task count + 2>
cat > data/ipc/main/tasks/ralph_start_$(date +%s).json << EOF
{
"type": "start_ralph",
"taskFile": "$TASK_FILE",
"workDir": "$WORK_DIR",
"targetJid": "$CHAT_JID",
"maxIterations": $MAX_ITER,
"notifyProgress": true
}
EOFThe bot will message you: "Ralph run started: ralph-{id}"
4. Monitor progress
Between each iteration, the bot messages you:
Ralph [3/7]: Completed "Add login endpoint with JWT"
Check detailed progress:
cat data/ralph/ralph-{id}/progress.txtCheck run status:
cat data/ralph/ralph-{id}/config.json | python3 -m json.toolStopping a Run
CHAT_JID="<main chat JID>"
RUN_ID="ralph-{id}"
cat > data/ipc/main/tasks/ralph_stop_$(date +%s).json << EOF
{
"type": "stop_ralph",
"runId": "$RUN_ID",
"targetJid": "$CHAT_JID"
}
EOFThe bot will message: "Ralph run stopped: ralph-{id}"
What happens on completion
When all tasks are checked off:
Ralph run ralph-{id} completed. 5/5 tasks done in 5 iterations.
The task file will have all checkboxes marked [x].
What happens on failure
- Task fails once: Retried on the next iteration (same task, fresh context)
- Task fails 3 times: Skipped, bot messages you, moves to next task
- Max iterations hit: Run stops, bot tells you how many tasks completed
- Service restart: Run state is on disk (
data/ralph/{id}/config.json), but the current iteration's scheduled task may need re-queuing
Safety
- Each iteration runs in isolated context (fresh agent, no carried-over confusion)
- Max 10 iterations by default (configurable via
maxIterationsorRALPH_MAX_ITERATIONSin.env) - Tasks that fail 3 times are skipped (configurable via
maxFailuresPerTaskin config.json) - Agent is instructed to commit after each task — easy to roll back
- You can stop the loop at any time via the stop IPC command
- The task file is re-read each iteration — you can manually edit it between iterations
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

