From sundial-org-awesome-openclaw-skills-4
Generates copy-paste bash scripts for Ralph Wiggum/AI agent loops to iteratively plan and build code via PROMPT.md, AGENTS.md, specs/*.md, and IMPLEMENTATION_PLAN.md with PLANNING/BUILDING modes, backpressure, and sandboxing.
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-2 --plugin sundial-org-awesome-openclaw-skills-4This skill uses the workspace's default tool permissions.
Generate a ready-to-run bash script that runs an AI coding CLI in a loop. Align with the Ralph playbook flow:
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Generate a ready-to-run bash script that runs an AI coding CLI in a loop. Align with the Ralph playbook flow:
specs/*.mdIMPLEMENTATION_PLAN.md (no implementation)The loop persists context via PROMPT.md + AGENTS.md (loaded every iteration) plus the on-disk plan/specs.
codex, claude-code, opencode, goose, other)PLANNING, BUILDING, or BOTHSTATUS: COMPLETE in IMPLEMENTATION_PLAN.md)none | docker | other) + security postureAGENTS.md--full-auto--dangerously-skip-permissionsIf the user wants “full Ralph” (or unclear requirements), do this before the loop:
specs/<topic>.md.PROMPT.md + AGENTS.md.AGENTS.md should include:
PROMPT.md should reference:
specs/*.mdIMPLEMENTATION_PLAN.mdCreate two prompts and swap PROMPT.md based on mode.
PLANNING prompt (no implementation):
You are running a Ralph PLANNING loop for: <JTBD/GOAL>.
Read specs/* and the current codebase. Do a gap analysis and update IMPLEMENTATION_PLAN.md only.
Rules:
- Do NOT implement.
- Do NOT commit.
- Prioritize tasks and keep plan concise.
- If requirements are unclear, write clarifying questions into the plan.
Completion:
If the plan is complete, add line: STATUS: COMPLETE
BUILDING prompt:
You are running a Ralph BUILDING loop for: <JTBD/GOAL>.
Context:
- specs/*
- IMPLEMENTATION_PLAN.md
- AGENTS.md (tests/backpressure)
Tasks:
1) Pick the most important task from IMPLEMENTATION_PLAN.md.
2) Investigate relevant code (don’t assume missing).
3) Implement.
4) Run the backpressure commands from AGENTS.md.
5) Update IMPLEMENTATION_PLAN.md (mark done + notes).
6) Update AGENTS.md if you learned new operational details.
7) Commit with a clear message.
Completion:
If all tasks are done, add line: STATUS: COMPLETE
codex exec <FLAGS> "$(cat PROMPT.md)"
claude <FLAGS> "$(cat PROMPT.md)"opencode run "$(cat PROMPT.md)"goose run "$(cat PROMPT.md)" (ask if they want the Goose recipe)If the CLI is unknown, ask for the exact command to run each iteration.
Provide either a minimal loop or a controlled loop with max iters + stop conditions.
Minimal loop (Geoff style):
while :; do cat PROMPT.md | claude ; done
Controlled loop (recommended):
#!/usr/bin/env bash
set -euo pipefail
PROMISE='...'
MAX_ITERS=...
CLI_FLAGS="..." # optional
PLAN_SENTINEL='STATUS: COMPLETE'
TEST_CMD='...' # optional
if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
echo "❌ Run this inside a git repo."
exit 1
fi
touch PROMPT.md AGENTS.md IMPLEMENTATION_PLAN.md
LOG_FILE=".ralph/ralph.log"
mkdir -p .ralph
CLI_CMD="..." # e.g. "codex exec" or "claude"
for i in $(seq 1 "$MAX_ITERS"); do
echo -e "\n=== Ralph iteration $i/$MAX_ITERS ===" | tee -a "$LOG_FILE"
$CLI_CMD $CLI_FLAGS "$(cat PROMPT.md)" | tee -a "$LOG_FILE"
if [[ -n "${TEST_CMD}" ]]; then
echo "Running tests: $TEST_CMD" | tee -a "$LOG_FILE"
bash -lc "$TEST_CMD" | tee -a "$LOG_FILE"
fi
if grep -Fq "$PROMISE" "$LOG_FILE" || grep -Fq "$PLAN_SENTINEL" IMPLEMENTATION_PLAN.md; then
echo "✅ Completion detected. Stopping." | tee -a "$LOG_FILE"
exit 0
fi
done
echo "❌ Max iterations reached without completion." | tee -a "$LOG_FILE"
exit 1
--dangerously-skip-permissions or --full-auto implies trust + risk.Ctrl+C to stop; git reset --hard to revert.AGENTS.md.