/carl-tools:ralph-loopfrom carl-tools
Runs repeatable multi-LLM hardening sweeps over a codebase: recon, multi-model review, patch proven findings, and document results. Extends second-opinions for ongoing surface coverage.
Ships in carl-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
RALPH packages the recurring multi-LLM hardening sweep:
Recon the codebase → Assemble a review packet → Launch diverse reviewers → Patch proven findings → Handoff learnings.
Use it when the user asks for another sweep, a tough multi-LLM review, recurring codebase hardening, or “keep looking for untouched areas.” It extends second-opinions: that skill validates one change or decision; RALPH repeatedly searches the repo for the next highest-leverage surface and turns reviewer output into fixes, docs, and follow-up work.
Be tough but fair. External models are collaborators, not judges. Prefer fixes that are:
Reject reviewer suggestions that are stale, hallucinated, over-engineered, already fixed, or require product decisions.
In-session subagents need no extra permission and are the default for every role below.
Launching a separate agent CLI (claude -p, codex exec, omp -p, pi -p) is different:
it spends the user's quota and sends project content to that provider. Before the first launch:
${XDG_CONFIG_HOME:-$HOME/.config}/agent-skills/external-clis.json if it exists.
A CLI listed under skills.ralph-loop.allow or top-level allow may run without asking;
one listed under deny (either level) must not run. Skill-level entries win.command -v claude codex omp pi, then ask once: which installed CLIs may this
skill launch, and should the answer apply to this run, always for this skill, or always?{"allow": ["codex"], "deny": [], "skills": {"ralph-loop": {"allow": ["claude", "codex"]}}}.timeout 600 ...). Report which CLI and model actually answered. If none
ran, say the outside cross-check did not happen rather than presenting subagent output as one.Equivalent one-shot forms: claude -p --model <m> "<prompt>",
codex exec -m <m> --sandbox read-only "<prompt>", omp -p --model <m> "<prompt>", pi -p "<prompt>".
Prefer a CLI from a different company than the current session for outsider roles.
Pick a capability tier, not a pinned model name: fast, balanced, or strongest. Use each CLI's
current model list or default to map the tier; omit --model if unsure.
Start from repo evidence, not vibes.
Good frontier slices:
If the repo has prior review docs, append “already swept” and “next frontier” notes to avoid orbiting the same planet until the flamingo gets dizzy.
Prefer the bundled prompt builder:
uv run <skill-dir>/scripts/build_ralph_prompt.py --focus "views, API, auth" --out-dir "${TMPDIR:-/tmp}/ralph-$(basename "$PWD")"
<skill-dir> is this skill's directory; if the script cannot be found, build the packet manually.
The packet should include:
Keep prompts under shell argument limits. If using a CLI wrapper that passes prompt as argv, aim for <50k chars.
Use at least three differentiated review prompts when the change warrants it: architecture and hard correctness (strongest tier), practical bug hunting (balanced), and a fast blunt edge-case pass (fast). Default to in-session subagents at those tiers. Add outside model CLIs only per the policy above, preferring a different company than the current session for at least one reviewer. Prompt diversity matters more than pretending three wrappers are three independent judges.
Run reviewers in parallel when tools allow. Store raw outputs outside the repo (the user's notes dir if named, otherwise a temp dir) with model and date in the filename.
Prompt reviewers to include file/function, reason, suggested fix, severity, and a Reject/Do-not-do section.
Create a synthesis table:
| Reviewer item | Classification | Decision |
|---|---|---|
| Bug/security/auth/data loss | Must-fix | Patch now |
| Clear simplification/error context | Should-fix | Patch if small |
| Product/refactor idea | Follow-up | File issue |
| Hallucinated/stale/overbroad | Reject | Note why |
Important checks:
Use normal project workflow and issue tracking. Patch in small commits if possible.
Common RALPH fix patterns:
str(exc) with generic copy + Sentry capture.Create a review doc in the repo when appropriate:
docs/reviews/YYYY-MM-DD-ralph-<frontier>-review.md
Include:
Update core project instructions only for durable learnings that future agents should obey.
Run targeted tests plus the repo’s standard gates. Commit, push, close issue(s). Final answer should be concise:
Keep looping while each pass finds meaningful, distinct fixes. Stop or switch strategy when:
When stopping, name the next higher-leverage move: test suite expansion, architecture split, threat model, performance profile, visual QA, launch-sequence, etc.
second-opinions inside RALPH for reviewer fan-out and classification discipline.wide-open-brainstorm only when reviewer output reveals product/UX direction rather than concrete code hardening.trust-audit when findings cluster around privacy, permissions, auth, or destructive actions.empathy-audit when findings cluster around confusing UX, support burden, machine load, or developer maintainability.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
26 skills in this plugin
/agent-log-forensicsAnalyze Claude/Codex logs for behavior patterns, repeated friction, and Toolsmith gaps./changelog-writerDraft plain-language changelog entries from Git history, optionally updating CHANGELOG.md./chezmoi-driftCheck chezmoi dotfiles for drift, unmanaged files, and broken skill links./contacts-unifyMerge and dedupe macOS, iCloud, Google, Zoho, or VCF contacts with reviewable provenance./dependency-pinningAudit Docker, CI, and language dependencies for SHA/digest pinning and cooldowns.Generated from the plugin's indexed repository (carlkibler/agent-skills) — no native marketplace selected
npx claudepluginhub p/carlkibler-carl-skills