claude-ralph-mode: Command for Claude Code

.claude/commands/ralph.md

ralph is a command for Claude Code from argile-ai/claude-ralph-mode. It costs 0 tokens per session (764 once invoked), scanned A, original, MIT.

A command for turning a feature description into a structured implementation plan. It reads project settings, asks clarifying questions, and saves the plan in plan.md.

In plain words
What is it for?
Use it to plan features across one or more repositories after defining the project's repositories and quality checks in ralph.config.json.
Why use it?
It helps turn a broad request into agreed scope and concrete work before coding begins.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

This is argile-ai/claude-ralph-mode's own configuration. It tells Claude Code how to work on claude-ralph-mode itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-ralph-mode configures →

Reuse

Borrowing it

Nothing to install: this file belongs to argile-ai/claude-ralph-mode. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/argile-ai/claude-ralph-mode/main/.claude/commands/ralph.md
Clone the repo
git clone --depth 1 https://github.com/argile-ai/claude-ralph-mode

Made for: Claude Code.

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/commands/argile-ai/claude-ralph-mode/ralph.svg)](https://agentmods.dev/commands/argile-ai/claude-ralph-mode/ralph)
Your own site
<a href="https://agentmods.dev/commands/argile-ai/claude-ralph-mode/ralph"><img src="https://agentmods.dev/badge/commands/argile-ai/claude-ralph-mode/ralph.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 764 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.00000 $0.00764
Opus 5 $0.00000 $0.00382
Sonnet 5 $0.00000 $0.00153
Haiku 4.5 $0.00000 $0.00076

Measured 8d ago against content hash 5077f983bbcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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.

.claude/commands/ralph.md · 152 lines

How it starts

The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ralph - Plan Generator

Generate a structured implementation plan from a feature description.


The Job

  1. Read the project configuration from ralph.config.json
  2. Analyze the user's feature request
  3. Ask 3-5 clarifying questions to understand scope
  4. Generate a detailed plan in plan.md
  5. Offer to validate or modify the plan

Step 1: Read Configuration

First, read ralph.config.json to understand:

  • Project name and description
  • Available repositories and their paths
  • Quality checks for each repository

If ralph.config.json doesn't exist, ask the user to create one or offer to generate a default configuration.


Step 2: Clarifying Questions

Ask 3-5 essential questions to understand the feature. Format questions with lettered options:

1. What is the primary goal of this feature?
   A) Add new functionality
   B) Improve existing functionality
   C) Fix a bug
   D) Refactor/cleanup

2. Which parts of the codebase will be affected?
   A) Backend only
   B) Frontend only
   C) Both backend and frontend
   D) Other (specify)

3. Are there any external dependencies required?
   A) No new dependencies
   B) Yes (specify which)

Wait for the user to respond with format like "1A, 2C, 3A" before proceeding.


Step 3: Generate Plan

Based on the answers, generate plan.md with this structure:

# [Project Name] - [Feature Name]

[Brief description of the feature]

---

## Summary

[2-3 sentences explaining what this plan accomplishes]

---

## User Stories

### [Repository 1] Stories

#### US-001: [Title]
**Repository:** `repo-name`
**Description:** As a [role], I want [feature] so that [benefit].

**Acceptance Criteria:**
- [ ] Specific, verifiable criterion
- [ ] Another criterion
- [ ] Tests pass (pytest/npm test/etc.)

[Repeat for each story...]

---

## Technical Considerations

- [Architecture decisions]
- [Dependencies]
- [Breaking changes]

---

## Open Questions

- [Any unresolved questions]

Read the full file on GitHub · 152 lines

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. 8d ago First seen · 152 lines · 0 tokens per session scan A 5077f983bbcd

Subscribe to this mod's changes

ralph is a command published in the GitHub repository argile-ai/claude-ralph-mode (11 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 764 tokens. 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.