From andrelandgraf-fullstackrecipes
Runs a coding agent in an autonomous loop via /ralph, gated by a preflight check for CLI readiness. Use for long-running autonomous development from a wide, outcome-focused prompt.
How this skill is triggered — by the user, by Claude, or both
Slash command
/andrelandgraf-fullstackrecipes:ralph-loop-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run a coding agent in an autonomous loop that breaks a wide prompt into tasks and builds, tests, and ships each one.
Run a coding agent in an autonomous loop that breaks a wide prompt into tasks and builds, tests, and ships each one.
Complete these setup recipes first:
Ralph maximizes how long the agent runs without human intervention. The goal is not a file format — it is keeping the agent able to plan, build, and verify on its own. The durable record of intent lives in the artifacts the agent produces: tests (executable acceptance criteria), user-facing docs, and a changelog for published libraries.
input prompt
-> preflight check (CLIs installed, linked, authenticated)
-> agent harness managed todo list (first-principles task breakdown)
-> code + user-facing docs + changelog + tests
-> verification (typecheck, fmt, fallow, browser, tests, deploy, prod check)
-> iterate
Give the agent a wide, outcome-focused prompt and let its own harness manage the todo list — there is no separate user-story file to author or check off.
If no prompt is given, STOP and ask the user: "What outcome do you want the Ralph loop to drive toward? Give me a wide, outcome-focused prompt and I'll break it into tasks." Wait for their answer before continuing.
Run the preflight check once. If anything is missing or unauthenticated, report the exact fix commands and STOP — the loop does not start until everything is green. Then each iteration:
http://localhost:3000.Keep the dev server running (bun run dev). The agent works against a test database, so it can migrate freely. The loop ends when no tasks remain and all verification passes.
Nothing Ralph-specific to install — the loop depends on three things being in place:
AGENTS.md, configured MCP servers, and installed skills.bun run typecheck, bun run fmt, bun run fallowbun run test against an isolated database branch (Playwright, integration, unit)agent-browser to interact with the running app like a userWhen verification is trustworthy and self-serve, the agent catches and fixes its own regressions without a human in the loop.
Confirm the agent has everything before the first iteration, rather than discovering a missing credential halfway through. Don't assume a fixed list — infer the active infrastructure from the codebase, then check each tool:
.cursor/mcp.json), the better-env configSchema declarations, and package.json scripts. Each configured service implies a CLI or token: Neon (DATABASE_URL), Vercel, Resend, Sentry, GitHub, Better Auth, etc.Example checks (run only the ones the codebase uses):
agent-browser -v # browser automation
vercel --version && vercel whoami && vercel project ls # installed + linked + auth
neonctl me # Neon CLI authenticated
sentry-cli info # token present and valid
gh auth status # GitHub CLI for PRs, logs
bun run env:validate # env vars match the schema
Stop if anything is red:
Preflight check
[ok] agent-browser v1.4.2
[ok] vercel linked to acme/app, logged in as andre
[fail] neon not authenticated
[fail] DATABASE_URL not set in .env.local
[ok] gh authenticated
2 issues block the loop. Run these, then re-run /ralph:
neonctl auth # opens browser for OAuth
bun run env:pull # pull DATABASE_URL from Vercel
For interactive OAuth (Vercel, Neon, GitHub), give the user the exact command to run themselves — don't attempt a browser login on their behalf. For anything fixable non-interactively (pulling env vars, setting a token), offer to run it. Start the loop only once every item is green.
Keep the prompt wide and outcome-focused, then let the agent decompose it. Add direction by sharpening inputs, not micromanaging steps:
npx claudepluginhub joshuarweaver/cascade-code-general-misc-3 --plugin andrelandgraf-fullstackrecipesSet up and configure Geoffrey Huntley's original Ralph Wiggum autonomous coding loop in any directory with proper structure, prompts, and backpressure.
Transforms approved implementation plans into ralph loop autonomous execution infrastructure. Creates .ralph/ directory with prd.json, loop.py, CLAUDE.md, and supporting files for multi-step implementation.
Executes autonomous development loops picking one task per iteration, implementing, verifying, and committing in fresh context windows with task tracking.