Borrowing it
Nothing to install: this file belongs to changoo89/claude-pilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/changoo89/claude-pilot/main/.claude/skills/ralph-loop/SKILL.mdgit clone --depth 1 https://github.com/changoo89/claude-pilotWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/changoo89/claude-pilot/ralph-loop)<a href="https://agentmods.dev/skills/changoo89/claude-pilot/ralph-loop"><img src="https://agentmods.dev/badge/skills/changoo89/claude-pilot/ralph-loop/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/changoo89/claude-pilot/ralph-loop"><img src="https://agentmods.dev/badge/skills/changoo89/claude-pilot/ralph-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00023 | $0.01736 |
| Opus 5.5 | $0.00009 | $0.00694 |
| Sonnet 5.5 | $0.00005 | $0.00347 |
| Haiku 4.5 | $0.00002 | $0.00174 |
Grade A, and why
ralph-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SKILL: Ralph Loop
Purpose: Autonomous completion loop - iterate until all tests pass, coverage met, type-check clean Target: Coder, Tester, Validator teammates ⚠️ Teammates Only: This skill is for coder/tester teammates in Agent Teams. Team Lead spawns teammates who execute this loop autonomously.
Quick Start
When to Use This Skill
- After first code change (Entry point)
- Tests failing or coverage low
- Type-check errors present
- Lint violations found
Quick Reference
# Ralph Loop: Autonomous iteration
iteration=0
max_iterations=7
early_escalation=false
# Check for --early flag or architecture-related failure
if [[ "$*" == *"--early"* ]] || is_architecture_failure; then
max_iterations=2
early_escalation=true
fi
while [ $iteration -lt $max_iterations ]; do
echo "Iteration $((iteration + 1))/$max_iterations"
# Run verification
if run_all_checks; then
echo "✓ All quality gates passed"
break
fi
# Fix failures
fix_failures
# Update state
update_state "$SC" "in_progress" $((iteration + 1))
((iteration++))
done
# Complete or escalate
if [ $iteration -eq $max_iterations ]; then
# Message Team Lead for GPT Architect escalation
echo "Max iterations reached. Messaging Team Lead for GPT Architect escalation..."
else
echo "<CODER_COMPLETE>" # All checks pass
fi
Core Concepts
Entry Point
Trigger: Immediately after first code change
Detection:
- Coder teammate makes first edit/write
- Tests run and fail
- Ralph Loop begins automatically
- TeammateIdle hook prevents premature idle on quality check failure
Quality Gates
All must pass before completion:
- Tests:
npm test- All tests pass - Coverage: ≥80% overall, ≥90% core modules
- Type-check:
npm run type-checkortsc --noEmit - Lint:
npm run lint- Zero violations - TODOs: All SC TODOs must be
[x]before<CODER_COMPLETE>- PLAN_PATH from execute-plan prompt OR auto-detect in
.pilot/plan/in_progress/ grep -q "^- \[ \]" "$PLAN_PATH"must return false (no unchecked items)
- PLAN_PATH from execute-plan prompt OR auto-detect in
- TaskCompleted Hook: Automatically verifies gates 1-5 when teammate marks task done
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 206 lines · 23 tokens per session scan A 9ce10a8dc891
ralph-loop is a skill published in the GitHub repository changoo89/claude-pilot (20 stars, last pushed 8mo ago), licensed MIT. It adds 23 tokens to every session and 1,736 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
ai-ml-development
AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.
case-interview-practice
Interactive consulting case interview practice with structured frameworks, feedback mechanisms, and progressive difficulty. Use when preparing for management consulting interviews, case competitions, or business problem-solving exercises.
performance-engineering
Web Vitals, bundle optimization, CDN, caching, and load analysis. Use when diagnosing slow pages or APIs, reducing bundle size, or designing caching and performance budgets.
finance
Financial analysis expertise for financial modeling (DCF, LBO, M&A), valuation, financial statement analysis, capital allocation, treasury management, and corporate finance decisions. Use when building financial models, analyzing statements, or making investment decisions.
i18n-localization
Internationalization and localization for global applications. Use when adding multi-language support, handling regional formats, or preparing apps for global markets.
leadership
Executive leadership expertise for decision-making, change management, crisis management, stakeholder management, team building, and organizational leadership. Use when leading teams, managing change, navigating crises, or developing leadership skills.