ralph

ralph is a skill for Codex from samqin123/Claude_skill_pool. It costs 61 tokens per session (791 once invoked), scanned A, original, Apache-2.0.

An autonomous coding loop that turns a Markdown PRD—a document describing a product and its requirements—into structured user stories, then works through them one at a time with a new agent each round.

In plain words
What is it for?
Use it to convert PRDs into implementation tasks, create a feature branch, implement stories in dependency order, run required checks, and track progress.
Why use it?
It breaks a large feature request into smaller deliverable tasks and keeps progress in files and Git history between rounds. This reduces the need to restate the whole project after each attempt.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to convert PRDs into implementation tasks, create a feature branch, implement stories in dependency order, run required checks, and track progress.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/samqin123/claude_skill_pool/ralph
Install

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.

Any agent
npx skills add samqin123/Claude_skill_pool --skill ralph
Clone the repo
git clone --depth 1 https://github.com/samqin123/Claude_skill_pool

Made for: Codex.

Wrote 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.

agentmods badge for ralph

README.md
[![agentmods](https://agentmods.dev/badge/skills/samqin123/claude_skill_pool/ralph/github.svg)](https://agentmods.dev/skills/samqin123/claude_skill_pool/ralph)
Your own site
<a href="https://agentmods.dev/skills/samqin123/claude_skill_pool/ralph"><img src="https://agentmods.dev/badge/skills/samqin123/claude_skill_pool/ralph/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.

agentmods 80×15 button for ralph

Your own site · 80×15
<a href="https://agentmods.dev/skills/samqin123/claude_skill_pool/ralph"><img src="https://agentmods.dev/badge/skills/samqin123/claude_skill_pool/ralph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 791 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.00791
Opus 5.5 $0.00024 $0.00316
Sonnet 5.5 $0.00012 $0.00158
Haiku 4.5 $0.00006 $0.00079

Measured 3mo ago against content hash dd7a3ea8d891, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ralph 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 3mo 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.

package/full-dev-脚手架/.codex/skills/ralph/SKILL.md · 81 lines

What it actually says

Ralph - Autonomous Agent Loop

Overview

将 PRD 转为结构化 prd.json,然后循环生成全新 Agent 实例逐个完成 User Story,每轮实例只有 Git 历史 + prd-progress.txt + prd.json 作为上下文记忆。

Workflow

Phase 1: PRD Conversion (if markdown provided)

  1. 读取 PRD — 解析用户提供的 Markdown PRD 文件。
  2. 归档上一次运行 — 若 prd.json 已存在且 branchName 不同,归档到 .claude/archive/YYYY-MM-DD-[feature]/。
  3. 生成 prd.json — 按以下格式:
{
  "project": "[Project Name]",
  "branchName": "ralph/[feature-kebab-case]",
  "description": "[Description]",
  "userStories": [
    {
      "id": "US-001",
      "title": "[Story title]",
      "description": "As a [user], I want [feature] so that [benefit]",
      "acceptanceCriteria": ["Criterion 1", "Typecheck passes"],
      "priority": 1,
      "passes": false,
      "notes": ""
    }
  ]
}

Story 规则:

  • 每个 Story 必须单轮可完成(2-3 句话能描述的变更)。
  • 按依赖排序:schema → backend → UI → dashboard。
  • 每个 Story 必须包含 "Typecheck passes"。
  • UI Story 额外包含 "Verify in browser"。

Phase 2: Ralph Execution

  1. 预检 — 确认 amp CLI、jq 已安装,Git 工作目录干净,prd.json 有效。
  2. 创建/切换分支 — 从 prd.json 读取 branchName。
  3. 执行循环 — bash .claude/scripts/ralph.sh [max_iterations](默认 10 轮):
    • 生成全新 Agent 实例 + .claude/scripts/prompt.md
    • Agent 选取最高优先级未完成 Story
    • 实现 → 质量检查(typecheck/lint/test)→ 通过则提交
    • 更新 prd.json(passes: true)+ 追加 prd-progress.txt
    • 循环直到全部通过或达到最大轮数

Memory Between Iterations

唯一的跨轮记忆:

  • Git 历史(之前的提交)
  • prd-progress.txt(学习日志)
  • prd.json(完成状态)

每轮都是全新实例,无隐式状态泄漏。

Key Files

文件 用途
.claude/scripts/ralph.sh Bash 循环脚本
.claude/scripts/prompt.md 每轮 Agent 的指令
prd.json User Story 及完成状态
prd-progress.txt 追加式学习日志
.claude/archive/ 历史运行归档

Guardrails

  • Story 必须小到单轮可完成,否则强制拆分。
  • 不提交未通过质量检查的代码。
  • Git 工作目录必须干净才能启动。
  • 支持断点续传(重新运行即从未完成处继续)。
Files

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.

Changes

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.

  1. 3mo ago First seen · 81 lines · 61 tokens per session scan A dd7a3ea8d891

Subscribe to this mod's changes

ralph is a skill published in the GitHub repository samqin123/Claude_skill_pool (2 stars, last pushed 22d ago), licensed Apache-2.0. It adds 61 tokens to every session and 791 once invoked, about $0.0002 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-31.

Related

ralph compared with skills from other repositories

ralph next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ralphsamqin123/Claude_skill_poolSkill222d agoApache-2.0A61Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill333k7d agoMITA21Claude Code