Agent skill
run-ralph
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.
Install this agent skill to your Project
npx add-skill https://github.com/b1rdmania/ghostclaw/tree/main/.claude/skills/run-ralph
SKILL.md
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 409
Rules 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
}
EOF
The 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.txt
Check run status:
cat data/ralph/ralph-{id}/config.json | python3 -m json.tool
Stopping 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"
}
EOF
The 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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-browser
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test web pages. Use whenever a browser would be useful, not just when the user explicitly asks.
add-voice-transcription
Add voice message transcription to GhostClaw using ElevenLabs Scribe API. Automatically transcribes voice notes so the agent can read and respond to them.
sales-enablement
When the user wants to create sales collateral, pitch decks, one-pagers, objection handling docs, or demo scripts. Also use when the user mentions 'sales deck,' 'pitch deck,' 'one-pager,' 'leave-behind,' 'objection handling,' 'deal-specific ROI analysis,' 'demo script,' 'talk track,' 'sales playbook,' 'proposal template,' 'buyer persona card,' 'help my sales team,' 'sales materials,' or 'what should I give my sales reps.' Use this for any document or asset that helps a sales team close deals. For competitor comparison pages and battle cards, see competitor-alternatives. For marketing website copy, see copywriting. For cold outreach emails, see cold-email.
seo-audit
When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," or "indexing issues." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema-markup. For AI search optimization, see ai-seo.
churn-prevention
When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' 'involuntary churn,' 'people keep canceling,' 'churn rate is too high,' 'how do I keep users,' or 'customers are leaving.' Use this whenever someone is losing subscribers or wants to build systems to prevent it. For post-cancel win-back email sequences, see email-sequence. For in-app upgrade paywalls, see paywall-upgrade-cro.
qodo-pr-resolver
Review and resolve PR issues with Qodo - get AI-powered code review issues and fix them interactively (GitHub, GitLab, Bitbucket, Azure DevOps)
Didn't find tool you were looking for?