ralph: Instructions file for Claude Code

CLAUDE.md

ralph CLAUDE.md is an instructions file for Claude Code from marc0der/ralph. It costs 4,303 tokens per session, scanned B, a copy of ralph AGENTS.md, MIT.

A set of Claude Code instructions for the ralph repository. It explains the project, available commands, and how to run all tests or one test file.

In plain words
What is it for?
Use it to understand ralph, follow its project conventions, and check changes with the full test suite or an individual test file.
Why use it?
It gives Claude the repository’s working rules and test commands, so it can work with less guesswork.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is marc0der/ralph's own configuration. It tells Claude Code how to work on ralph 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 ralph configures →

Reuse

Borrowing it

Nothing to install: this file belongs to marc0der/ralph. 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/marc0der/ralph/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/marc0der/ralph

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 CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/marc0der/ralph/claude-md"><img src="https://agentmods.dev/badge/instructions/marc0der/ralph/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,303 This file is loaded in full into every session.
When invoked 4,303 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 97% copy Near-identical to another mod 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.04303 $0.04303
Opus 5.5 $0.01721 $0.01721
Sonnet 5.5 $0.00861 $0.00861
Haiku 4.5 $0.00430 $0.00430

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

Security

Grade B, and why

ralph CLAUDE.md scanned grade B with 1 finding 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 24d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Runs as `node` user with passwordless sudo ### Installation layout
Origin

This is a copy

97% identical to ralph AGENTS.md — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 125 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What is Ralph?

Ralph is an autonomous AI coding agent loop runner. It runs iterative plan/build cycles using a configurable backend (Claude Code, OpenAI Codex, GitHub Copilot CLI, or pi) in headless mode, with shared artifacts (IMPLEMENTATION_PLAN.md, PROGRESS.md) as handoffs between iterations. All execution happens inside isolated devcontainers.

Commands

# Run all tests
bats test/

# Run a single test file
bats test/sandbox.bats

# Run a specific test by name
bats test/sandbox.bats -f "sandbox fails when config is missing"

# Lint
shellcheck ralph install.sh
shellcheck test/*.bats test/test_helper.bash

CI runs both ShellCheck and BATS on every push/PR to main. Run both locally after every build iteration, before committing — green BATS with a dirty ShellCheck is not done.

Architecture

Ralph is a single Bash script (ralph) with these commands:

Command Purpose
plan Run planning loop (max 6 iterations, exits on convergence) — requires a goal (-g), reads specs/source, produces IMPLEMENTATION_PLAN.md
build Run build loop (default: open items plus 20% headroom) — picks next task, implements, tests, commits, pushes
fix Run the build loop with the fix section of the config file — auto runs it as phase 6
review Run one review pass — reviews the cycle's work against its cited specs, the written rules and the review catalogue, files findings as new - [ ] items
sandbox Enter/manage devcontainer (sandbox, sandbox clean, sandbox --rebuild)
init Initialize workspace artifacts and directories; --config copies the central config.yaml to ./ralph.yaml
archive Move artifacts to .ralph/<timestamp>/
clean Delete artifacts
auto Run archive, init, plan, build, review, fix as child processes — requires -g, rejects -n, skips a phase whose guard fails, refuses phase 3 over a stale cycle base or an uncommitted specs/ or a spec repository on a detached HEAD, refuses to run outside a container without --force, records a failure or interrupt in .ralph/auto-state for --resume
metrics Summarise a run's metrics.jsonl, the latest run by default
version Print the version

Read the full file on GitHub · 125 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. 24d ago Changed · +10 lines · +402 tokens per session bce90e485bc4
  2. 29d ago Changed · +190 tokens per session a7bb3aab9328
  3. 1mo ago Changed · +3 tokens per session f9f3a39a4f66
  4. 1mo ago Changed · +2 lines · +418 tokens per session e19f755e9b4c
  5. 1mo ago Changed · +6 lines · +305 tokens per session ceb72a0c985c
  6. 1mo ago Changed · +2 lines · +466 tokens per session bc1bc075c64f
  7. 1mo ago Changed · +195 tokens per session 4bf8ffd27ee0
  8. 1mo ago Changed · -1 lines · -53 tokens per session 54d13c70a6b3
  9. 1mo ago Changed · +31 tokens per session 50534cb2bb8b
  10. 1mo ago First seen · 106 lines · 2,346 tokens per session scan B 71edfd802799

Subscribe to this mod's changes

ralph CLAUDE.md is an instructions file published in the GitHub repository marc0der/ralph (11 stars, last pushed 2d ago), licensed MIT. It adds 4,303 tokens to every session, about $0.0172 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). It is 97% identical to ralph AGENTS.md, differing in 5 lines, and is treated as a copy.

Related

ralph CLAUDE.md compared with instructions from other repositories

ralph CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ralph CLAUDE.mdmarc0der/ralphInstructions file112d agoMITB4,303Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot