ralph-loop
Skill6 starsChanged 4 months agoMITView on GitHub
Run repeatable multi-LLM hardening sweeps: review, fix, document, repeat.
26 other projects use a version of this.
Adopted by
Most recently taken up by
- shawnclybor/clybor-claude-toolingtheir own version, first seen Nov 8, 2026
- ZhouYinLong-lab/Dog-Skillstheir own version, first seen Nov 8, 2026
- belumume/claude-skillstheir own version, first seen Nov 3, 2026
- burakkaygusuz/ralph-wiggumtheir own version, first seen Nov 1, 2026
- harness-mini/harness-minitheir own version, first seen Nov 1, 2026
- cornch-k/batontheir own version, first seen Nov 1, 2026
Used with
Projects with it also use to-issues and review.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.Other versions26 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 26
- mikeyobrien/ralph-orchestrator★ 3.2ksame name
- zrosenfield/sharepoint-ai-skills★ 96same name
- dannys-code-corner/incan★ 73same name
- yylo-dev/yylo★ 66same name
- regression-io/coder-config★ 47same name
- belumume/claude-skills★ 46same name
- xfstudio/skills★ 9same name
- mnzralee/claude-multi-agent-architecture★ 8same name
- shyamsridhar123/kevin-copilot★ 7same name
- ZhouYinLong-lab/Dog-Skills★ 7same name
16 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- agent-skills-agentsAGENTS.md
- agent-skills-claudeCLAUDE.md
- agent-log-forensicsSkill
- changelog-writerSkill
- chezmoi-driftSkill
- contacts-unifySkill
- decision-logSkill
- dependency-pinningSkill
- django-smoke-alarmSkill
- empathy-auditSkill
- first-contactSkill
- handle-prSkill
- launch-sequenceSkill
- parallel-isolated-app-testingSkill
- post-mortemSkill
- pre-mortemSkill
- profile-meSkill
- release-operatorSkill
- remote-host-verifierSkill
- research-personSkill
- scope-hammerSkill
- second-opinionsSkill
- status-copy-trust-auditSkill
- support-stormSkill
- trust-auditSkill
- visual-qa-loopSkill
- wide-open-brainstormSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. 0 are common, 22 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 22 edited versions we read keep these.
22
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Read ${XDG_CONFIG_HOME:-$HOME/.config}/agent-skills/external-clis.json if it exists.
- Very specific: line 50
Prefer a CLI from a different company than the current session for outsider roles.
- Distinctive: line 58
Start from repo evidence, not vibes.
- Distinctive: line 61
Check git status and issue tracker.
- Distinctive: line 76
If the repo has prior review docs, append “already swept” and “next frontier” notes to avoid orbiting the same planet until the flamingo …
- Distinctive: line 80
Prefer the bundled prompt builder:
- Distinctive: line 95
Must-fix / Should-fix / Nice-to-have / Reject.
- Distinctive: line 100
Keep prompts under shell argument limits.
- Distinctive: line 104
Use at least three differentiated review prompts when the change warrants it: architecture and hard correctness (strongest tier), practical …
- Distinctive: line 106
Default to in-session subagents at those tiers.
- Distinctive: line 110
Run reviewers in parallel when tools allow.
- Distinctive: line 116
Create a synthesis table:
- Distinctive: line 127
Verify every alleged bug against actual source.
- Distinctive: line 130
If a reviewer says “syntax error,” run compile/tests before believing it.
- Distinctive: line 135
Use normal project workflow and issue tracking.
- Distinctive: line 140
Add scoped Sentry tags/context: feature, operation, safe ids, model/provider, status code.
- Distinctive: line 142
Add per-item exception isolation in batch loops where one bad item should not abort all users.
- Distinctive: line 146
Add targeted tests for each fixed edge.
- Distinctive: line 150
Create a review doc in the repo when appropriate:
- Distinctive: line 164
Update core project instructions only for durable learnings that future agents should obey.
- Distinctive: line 168
Run targeted tests plus the repo’s standard gates.
- Distinctive: line 179
Keep looping while each pass finds meaningful, distinct fixes.
- Distinctive: line 184
test debt or design debt is now more important than more review.
- Distinctive: line 186
When stopping, name the next higher-leverage move: test suite expansion, architecture split, threat model, performance profile, visual QA, …
- Very specific: line 190
Use second-opinions inside RALPH for reviewer fan-out and classification discipline.
- Very specific: line 191
Use wide-open-brainstorm only when reviewer output reveals product/UX direction rather than concrete code hardening.
- Very specific: line 192
Use trust-audit when findings cluster around privacy, permissions, auth, or destructive actions.
- Very specific: line 193
Use empathy-audit when findings cluster around confusing UX, support burden, machine load, or developer maintainability.
“Common” is measured: kept by at least 6 in 10 of the 22 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
RALPH Loop
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.
Operating stance
Be tough but fair. External models are collaborators, not judges. Prefer fixes that are:
- correctness, security, data loss, auth, or observability issues;
- small and locally testable;
- aligned with project conventions;
- safe for users and support teams.
Reject reviewer suggestions that are stale, hallucinated, over-engineered, already fixed, or require product decisions.
External model CLIs (ask first)
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:
- Read
${XDG_CONFIG_HOME:-$HOME/.config}/agent-skills/external-clis.jsonif it exists. A CLI listed underskills.ralph-loop.allowor top-levelallowmay run without asking; one listed underdeny(either level) must not run. Skill-level entries win. - Otherwise run
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? - For "always", create or update the file (merge; never drop other skills' entries), e.g.
{"allow": ["codex"], "deny": [], "skills": {"ralph-loop": {"allow": ["claude", "codex"]}}}. - Bound every call (
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.
Loop shape
1. Recon — choose the next frontier
Start from repo evidence, not vibes.
- Read project instructions.
- Check git status and issue tracker.
- Inspect recent commits/docs/review artifacts to avoid repeating the same modules.
- Build a frontier map of code not yet swept or newly changed.
Good frontier slices:
- user-facing views/forms/API/auth;
- background tasks/schedulers/importers;
- integrations/OAuth/webhooks/external APIs;
- billing/security/permissions;
- data sync/migrations/admin commands;
- LLM/tool-calling surfaces;
- observability and Sentry/error-handling seams;
- tests that imply important behavior but lack coverage.
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.
2. Assemble — create a bounded review packet
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:
- repo/product context in 5–10 lines;
- previous sweep summary or paths to review docs;
- selected file/function/error map;
- bounded excerpts, not whole giant files;
- explicit review criteria:
- Must-fix / Should-fix / Nice-to-have / Reject;
- correctness, refactoring, performance, security, Sentry/context;
- user-safe errors and no secrets/PII in logs or events;
- “small actionable fixes only.”
Keep prompts under shell argument limits. If using a CLI wrapper that passes prompt as argv, aim for <50k chars.
3. Launch — fan out reviewers
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.
4. Synthesize — classify with skepticism
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:
- Verify every alleged bug against actual source.
- Reproduce or reason through failures before patching.
- Watch for “reviewer line numbers” that are approximate or stale.
- If a reviewer says “syntax error,” run compile/tests before believing it.
- For Sentry fixes, capture enough context to debug but avoid raw emails, phone numbers, OAuth states, webhook URLs, passwords, tokens, service-account paths, or provider payloads.
5. Patch — apply only high-confidence work
Use normal project workflow and issue tracking. Patch in small commits if possible.
Common RALPH fix patterns:
- Replace raw user-facing
str(exc)with generic copy + Sentry capture. - Add scoped Sentry tags/context: feature, operation, safe ids, model/provider, status code.
- Hash/fingerprint sensitive correlators instead of logging raw values.
- Add per-item exception isolation in batch loops where one bad item should not abort all users.
- Validate query params and enum-like POST values before service calls.
- Debounce high-frequency writes from polling clients.
- Convert silent fallback into “fallback + observable event.”
- Add targeted tests for each fixed edge.
6. Harden docs — preserve the mental path
Create a review doc in the repo when appropriate:
docs/reviews/YYYY-MM-DD-ralph-<frontier>-review.md
Include:
- models used;
- scope/frontier;
- raw artifact paths;
- accepted fixes;
- deferred candidates;
- rejected findings and why;
- one “product learning” or operating rule.
Update core project instructions only for durable learnings that future agents should obey.
7. Validate, land, handoff
Run targeted tests plus the repo’s standard gates. Commit, push, close issue(s). Final answer should be concise:
- commit hash;
- frontier reviewed;
- models used;
- fixes applied;
- tests run;
- next sweep frontier if obvious.
RALPH stop rule
Keep looping while each pass finds meaningful, distinct fixes. Stop or switch strategy when:
- reviewers mostly repeat prior findings;
- suggestions are architectural/product decisions, not hardening;
- the next frontier needs domain input;
- test debt or design debt is now more important than more review.
When stopping, name the next higher-leverage move: test suite expansion, architecture split, threat model, performance profile, visual QA, launch-sequence, etc.
Relationship to other skills
- Use
second-opinionsinside RALPH for reviewer fan-out and classification discipline. - Use
wide-open-brainstormonly when reviewer output reveals product/UX direction rather than concrete code hardening. - Use
trust-auditwhen findings cluster around privacy, permissions, auth, or destructive actions. - Use
empathy-auditwhen findings cluster around confusing UX, support burden, machine load, or developer maintainability.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

