Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add magic3007/dotfiles --skill ralph-loopgit clone --depth 1 https://github.com/magic3007/dotfilesWrote 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/magic3007/dotfiles/ralph-loop)<a href="https://agentmods.dev/skills/magic3007/dotfiles/ralph-loop"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/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/magic3007/dotfiles/ralph-loop"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/ralph-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00063 | $0.03203 |
| Opus 5.5 | $0.00025 | $0.01281 |
| Sonnet 5.5 | $0.00013 | $0.00641 |
| Haiku 4.5 | $0.00006 | $0.00320 |
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 15d 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 — 331 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ralph Loop v2 (Claude Code Edition)
基于 Geoffrey Huntley 的 Ralph Wiggum 技术的自主迭代开发。
核心: 每个阶段有强制 code review + 测试 gate,不通过不进下一阶段。
触发短语
| 短语 | 动作 |
|---|---|
| "Ralph loop over X" | 问走哪个阶段 |
| "Interview me about X" | Phase 1: 需求收集 |
| "Plan system X" | Phase 2: 规划循环 |
| "Build system X" | Phase 3: 构建循环 |
核心原则
- Context 是稀缺的 — 每次迭代做合理的一块工作,不贪多也不过少
- 你只是任务中的一环 — loop.sh 驱动迭代,每次 CLI 调用是独立的 context,做完合理粒度就退出
- 计划是一次性的 — 跑偏了重新规划,不硬撑
- 背压 > 方向 — 测试 + review 自动拒绝错误输出
- 每阶段有 gate — code review + 测试通过才能推进
三阶段工作流
Phase 1: REQUIREMENTS ──── 人机对话 → specs/*.md
Gate: 用户确认所有 spec
Phase 2: PLANNING ──────── 差距分析 → IMPLEMENTATION_PLAN.md
Gate: Plan review + 验证(命令存在、路径有效)
Phase 3: BUILDING ──────── 迭代实现 → test → Codex review → commit
Gate: 测试通过 + Codex cross-review(完成时)
阶段检测
| 当前状态 | 阶段 | 动作 |
|---|---|---|
没有 specs/ 或为空 |
Phase 1 | 跑需求访谈 |
有 specs/*.md,没有 IMPLEMENTATION_PLAN.md |
Phase 2 | 跑规划循环 |
| 有 spec + plan | Phase 3 | 跑构建循环 |
| Plan 显示全部完成 | Done | 汇报 |
Phase 1: 需求收集(人机对话)
目标: JTBD → Topics → specs/*.md
- 识别 Jobs to Be Done(结果,不是功能)
- 拆分成 Topics — 每个通过「一句话不带 AND」测试
- 写
specs/<topic>.md,包含验收标准 + 边界情况 - Gate: 用户明确确认所有 spec
Phase 1→2 过渡:初始化 .ralph/
Phase 1 specs 确认后,立即初始化 .ralph/ 目录:
-
收集配置信息(用 AskUserQuestion):
- CLI 工具:
claude/codex/opencode/goose(默认claude) - 背压命令:如
npm test && npm run typecheck && npm run lint - 最大迭代次数:默认
0(无限)
- CLI 工具:
-
用
cp复制模板文件到项目的.ralph/,然后在副本上编辑(不要读模板再重写!):mkdir -p .ralph/state cp /path/to/skill/templates/loop.sh .ralph/loop.sh cp /path/to/skill/templates/PROMPT_plan.md .ralph/PROMPT_plan.md cp /path/to/skill/templates/PROMPT_build.md .ralph/PROMPT_build.md chmod +x .ralph/loop.sh模板源路径: 此 skill 基础目录下的
templates/ -
在复制后的文件上替换占位符:
.ralph/loop.sh中替换{{CLI}}、{{MODE}}、{{MAX_ITERS}}、{{BACKPRESSURE_CMD}}.ralph/PROMPT_plan.md中替换[PROJECT_GOAL]和源码路径.ralph/PROMPT_build.md中替换源码路径
What ships with it
6 files 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.
- 15d ago Changed · -17 lines 0cb1f7116d54
- 1mo ago First seen · 348 lines · 63 tokens per session scan A e8672b69403f
ralph-loop is a skill published in the GitHub repository magic3007/dotfiles (11 stars, last pushed today), licensed MIT. It adds 63 tokens to every session and 3,203 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
test-code
Testing philosophy, test types (unit, integration, golden, fuzz, property, benchmark, smoke, E2E), per-language conventions (Rust, Go, Python, TypeScript), file organization, fixtures/mocks, CI strategy, and what NOT to test. Use when writing tests, reviewing test coverage, setting up test infrastructure, or deciding…
run-eval-harness
Run a project's own eval suite end to end without babysitting: locate the harness, launch it in the background, monitor to completion, parse the report into a normalized summary (pass rate, latency percentiles, tokens, cost), and diff against the previous run with per-case regressions explained. Use when asked to "run…
design
Design the type progression, assertion plan, telemetry plan and test plan for approved work. Invoke after agreeing on the high-level approach and before writing any implementation.
review-completion
Confirm a task was fully executed and the change works — static completeness audit followed by empirical runtime evidence. TRIGGER when asked to confirm a task is complete, prove it works, or verify a change is ready to ship.
validate
Confirm we have actually completed and validated what we planned to accomplish. TRIGGER whenever the user asks you to confirm a task is complete, if any implementation or validation was missed, etc.
prove-it-works
Survey observable paths, run the real system, capture evidence, and surface gaps. TRIGGER when asked to prove a change works or write a QA plan.