Install
$ agentstack add skill-mattmagg-ralph-wiggum-codex-ralph-wiggum-codex ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Ralph Wiggum For Codex
Codex-native Ralph loop for long-running autonomous task completion.
This skill is designed to be invoked as $ralph-wiggum-codex. The shell runner is support infrastructure for the skill, not the product story.
When To Use
Use this skill when:
- The task is too large or uncertain for a single turn.
- You want the agent centered on the user request and acceptance criteria, not just test output.
- You want a mandatory work phase followed by a fresh-context review phase.
- You need resumable state, explicit blocked handling, and long-run drift control.
Do not use this skill when:
- The request is a quick one-shot edit or explanation.
- The user wants manual turn-by-turn control.
- The task is mostly a prompt rewrite, not execution. Use
$ralph-prompt-generatorfirst in that case.
Optional Prompt Generator
When the request is underspecified, invoke $ralph-prompt-generator first to turn it into a Ralph-ready prompt file.
Use the companion first when:
- The objective is fuzzy.
- Acceptance criteria are missing.
- Source-of-truth artifacts are unclear.
- You want review checkpoints before starting the long run.
Companion handoff pattern:
- Run
$ralph-prompt-generatorwith the raw request. - Review the saved planning artifacts after Steps 1-2.
- Review the saved critique after Step 4.
- Use the final prompt saved at
docs/prompt-improver-spec/final-prompts/.md. - Run the short Ralph-ready invocation snippet it returns at the end.
Skill-First Operating Contract
When this skill is invoked, execute this flow:
- Collect or infer:
cwd- objective text
- acceptance criteria
- optional source-of-truth artifacts
- optional verification commands
- progress scopes (
--progress-scope) for anti-no-op protection - runtime caps when the run needs them
- Materialize repo-backed state under
/.codex/ralph-loop/:
objective.mdacceptance-criteria.mdfeedback.mdwork-summary.mdreview-feedback.mdreview-result.txt
- Start the loop runner in objective-first mode.
- For each iteration:
- run a fresh-context work phase
- run optional verification
- run a fresh-context review phase
- continue until the reviewer can honestly ship the task or confirm a real blocker
- If blocked, capture the blocker in
RALPH-BLOCKED.md, stop withtask_blocked, and wait for updated task/feedback files before resuming.
Execution Command Template
~/.codex/skills/ralph-wiggum-codex/scripts/ralph-loop-codex.sh \
--cwd /path/to/repo \
--objective-file /path/to/repo/.codex/ralph-loop/objective.md \
--acceptance-file /path/to/repo/.codex/ralph-loop/acceptance-criteria.md \
--feedback-file /path/to/repo/.codex/ralph-loop/feedback.md \
--max-iterations 40 \
--max-stagnant-iterations 6 \
--progress-scope "src/" \
--idle-timeout-seconds 900 \
--hard-timeout-seconds 7200 \
--timeout-retries 1 \
--validate-cmd "npm run lint" \
--validate-cmd "npm run test"
Core Loop Behavior
The runner is a mandatory work/review loop:
- Work phase: executes against the objective, acceptance criteria, source of truth, and feedback.
- Optional verification: runs after the work phase when configured.
- Review phase: re-enters with fresh context and decides
SHIP,REVISE, orBLOCKED.
Completion is objective-first:
- The task is complete only when the work phase reports
COMPLETE, the review phase decidesSHIP, and any configured verification passes. - A real blocker stops the loop as
task_blocked. --progress-scopeplusno_change_justificationonly prevents fake no-op completion. It is not the product definition of success.
Work and Review Contracts
Work schema (work-schema.json):
status:IN_PROGRESS,BLOCKED,COMPLETEassessment: concise statement of progress against the objective and acceptance criteriaevidence: non-empty array of concrete evidencenext_step: one highest-impact next stepblocker_reason(optional but required whenstatus=BLOCKED)no_change_justification(optional)
Review schema (review-schema.json):
decision:SHIP,REVISE,BLOCKEDassessment: concise review judgmentfeedback: actionable review guidance or ship confirmationevidence: non-empty array of concrete evidence
Core Files
.codex/ralph-loop/state.env.codex/ralph-loop/objective.md.codex/ralph-loop/acceptance-criteria.md.codex/ralph-loop/feedback.md.codex/ralph-loop/work-summary.md.codex/ralph-loop/review-feedback.md.codex/ralph-loop/review-result.txt.codex/ralph-loop/RALPH-BLOCKED.md.codex/ralph-loop/.ralph-complete.codex/ralph-loop/work-schema.json.codex/ralph-loop/review-schema.json.codex/ralph-loop/iteration-history.md.codex/ralph-loop/auto-feedback.md.codex/ralph-loop/run-summary.md.codex/ralph-loop/validation/.codex/ralph-loop/codex/iteration---attempt-.jsonl
Stop Reasons
task_completetask_blockedmax_iterations_reachedmax_consecutive_failures_reachedmax_stagnant_iterations_reachedstop_file_detected
Resume And Stop
Resume:
~/.codex/skills/ralph-wiggum-codex/scripts/ralph-loop-codex.sh \
--cwd /path/to/repo \
--resume
Stop safely:
touch /path/to/repo/.codex/ralph-loop/STOP
References
- Harness principles:
references/harness-principles.md - Operational runbook:
references/runbook.md - Reliability vNext:
references/reliability-vnext.md
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: MattMagg
- Source: MattMagg/ralph-wiggum-codex
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.