ralph-claude-code CLAUDE.md

ralph-claude-code CLAUDE.md is an instructions file for coding agents from frankbria/ralph-claude-code. It costs 9,464 tokens per session, scanned B, original, MIT.

A system for running repeated Claude Code development cycles, with monitoring, rate limiting, exit detection, and tools for importing project requirements.

In plain words
What is it for?
Use it to start and monitor autonomous coding loops, set up projects, convert specifications into tasks, and import GitHub issues and their comments.
Why use it?
It helps automate ongoing development while showing whether the loop is still working and preventing unbounded or unnecessary runs.

Instructions file

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.

agentmods
npx agentmods add instructions/frankbria/ralph-claude-code/claude-md
Clone the repo
git clone --depth 1 https://github.com/frankbria/ralph-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-code CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/frankbria/ralph-claude-code/claude-md.svg)](https://agentmods.dev/instructions/frankbria/ralph-claude-code/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/frankbria/ralph-claude-code/claude-md"><img src="https://agentmods.dev/badge/instructions/frankbria/ralph-claude-code/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 9,464 This file is loaded in full into every session.
When invoked 9,464 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
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 $0.09464 $0.09464
Opus 5 $0.04732 $0.04732
Sonnet 5 $0.01893 $0.01893
Haiku 4.5 $0.00946 $0.00946

Measured 4d ago against content hash 488e404bfccd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

ralph-claude-code 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 4d 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.

export E2B_API_KEY="e2b_..." # or ~/.ralph/e2b_api_key (chmod 600)
CLAUDE.md · 363 lines

How it starts

The opening of the file, as written. The whole thing — 363 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.

Repository Overview

Ralph for Claude Code — an autonomous AI development loop system enabling continuous development cycles with intelligent exit detection and rate limiting. See README.md for version info, changelog, and user documentation.

Core Architecture

Main Scripts

  • ralph_loop.sh — main autonomous loop that executes Claude Code repeatedly
  • ralph_monitor.sh — live monitoring dashboard for tracking loop status
  • setup.sh — project initialization for new Ralph projects
  • create_files.sh — bootstrap script that creates the entire Ralph system
  • ralph_import.sh — converts PRD/spec documents to Ralph format; uses --output-format json with automatic text fallback for older CLI versions
    • GitHub issue import (Issue #69): --github-issue <N> for an exact issue, plus --repo <owner/repo>, --include-comments
    • Fetches via gh into a markdown PRD, then the normal conversion pipeline. Comments off by default (prompt-injection surface); source content is treated as data, not instructions
    • Metadata filtering + selection (Issue #71), implemented in resolve_github_issue_candidates() / select_issue_from_candidates() / preview_issue_matches() (replaced resolve_github_issue_number(); "first match" is now oldest, not gh's newest-first):
      • Combinable primary filters: --github-search <query>, --github-label <labels> (comma = AND), --github-title <pattern> (* wildcard only, rest literal, case-insensitive), --github-assignee <user|@me|none>, --github-milestone <name>, --github-state <open|closed|all>; modifiers (--exclude-label <labels>, --select, --dry-run) require ≥1 primary filter; --github-issue is mutually exclusive with all of them
      • One gh issue list --limit 500 query (server-side where gh supports it; exclude-label and title matching client-side via jq); candidates sorted oldest-first. Cap-hit handling (gh returns newest-first, so a capped set may be missing the true oldest matches): WARN for server-side-only queries; hard ERROR when client-side filters are active (they could pick the wrong issue or report zero matches over a truncated set)
      • --select first|interactive|priority picks among multiple matches: priority understands bare P0P9 and priority: PN labels (ties → oldest, none → first); interactive falls back to first on non-TTY/EOF. --dry-run previews the match table + would-be selection without importing
    • Completeness assessment + plan generation (Issue #70): issues are scored 0–100 via lib/issue_analyzer.sh; below --completeness-threshold (default 60) an implementation plan is generated via Claude CLI (--plan-model passthrough) and appended to the PRD before conversion, plus saved to .ralph/specs/implementation-plan.md. Flags: --generate-plan (force), --no-generate-plan (fail if below threshold), --plan-model <model>, --completeness-threshold <0-100>, --auto-approve (skip the approval prompt; non-TTY sessions auto-accept)
  • ralph_queue.shralph-queue command: batch processing and issue queue management (Issue #72). Builds a persistent queue at .ralph/queue.json of GitHub issues (reuses ralph_import.sh's gh machinery: resolve_github_issue_candidates, fetch_github_issue, format_issue_as_prd) or local PRD specs. Subcommands: add (--github-issues N,N | filter flags | --prd <file>), status [--json], next, remove, clear, reorder, validate, process [--halt-on-failure], resume. The sequential processor stages .ralph/ from each ready item (priority + dependency order), runs the loop via RALPH_LOOP_CMD (default ralph_loop.sh; overridable for tests), commits Fix #N: <title> per issue, skips failures (or halts), and writes .ralph/logs/queue_processing.log. Single branch, no concurrency. See docs/QUEUE_MANAGEMENT.md
  • GitHub issue lifecycle (Issue #73): when ralph is run with --github-issue <ref>, it tracks the issue across the loop via lib/github_lifecycle.sh. During development it can post progress comments every N loops (--comment-progress, --comment-interval); on graceful completion it runs a completion workflow — summary comment (--close-summary), PR creation linked with Closes #N (--create-pr --link-issue, optional --draft-pr), grouped follow-up issue from TODO/FIXME markers added during dev (--create-followups --followup-label), and issue close with optional labels (--auto-close --add-label). All steps are opt-in and degrade gracefully (a gh permission failure is logged and the loop continues). State lives in .ralph/.github_lifecycle_state. Uses the gh CLI exclusively (not raw REST/GITHUB_TOKEN)
  • ralph_enable.sh — interactive wizard enabling Ralph in existing projects (environment detection, task source selection, generates .ralphrc)
  • ralph_enable_ci.sh — non-interactive version for CI/automation; --json output mode; exit codes: 0 (success), 1 (error), 2 (already enabled)

Read the full file on GitHub · 363 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. 4d ago First seen · 363 lines · 9,464 tokens per session scan B 488e404bfccd

Subscribe to this mod's changes

ralph-claude-code CLAUDE.md is an instructions file published in the GitHub repository frankbria/ralph-claude-code (9,618 stars, last pushed 1mo ago), licensed MIT. It adds 9,464 tokens to every session, about $0.0473 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

apex-spec-system CLAUDE.md

Claude Code instructions for moshehbenavraham/apex-spec-system, covering apex spec system - claude code plugin skill, when updating version, update it in all the following files, apex infinite cli and details - see @skills/spec-workflow/skill.md.

moshehbenavraham/apex-spec-system · 190 tokens

apex-spec-system AGENTS.md

AGENTS.md instructions for moshehbenavraham/apex-spec-system, a project described as: Specification-driven workflow system for AI-assisted development - break large projects into manageable 2-4 hour sessions with 15-30 tasks each.

moshehbenavraham/apex-spec-system · 4 tokens

apex-spec-system GEMINI.md

Gemini CLI instructions for moshehbenavraham/apex-spec-system, a project described as: Specification-driven workflow system for AI-assisted development - break large projects into manageable 2-4 hour sessions with 15-30 tasks each.

moshehbenavraham/apex-spec-system · 4 tokens

aider-desk AGENTS.md

AGENTS.md instructions for hotovo/aider-desk, covering agents.md, common commands, development, type checking and linting and formatting.

hotovo/aider-desk · 1,725 tokens

FrameCode-VibeWork AGENTS.md

AGENTS.md instructions for Sistema2D/FrameCode-VibeWork, covering agents.md, instruction order, reading-trigger rule, regression rule and when a plan is required.

Sistema2D/FrameCode-VibeWork · 1,586 tokens

EndiorBot CLAUDE.md

Instructions for Minh-Tam-Solution/EndiorBot, a project described as: Local-first AI agent orchestrator for SDLC workflows — 14 role-based agents, 5 channels, 39 unified commands. Tool-agnostic. MIT.

Minh-Tam-Solution/EndiorBot · 19 tokens