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 agentmods add instructions/frankbria/ralph-claude-code/claude-mdgit clone --depth 1 https://github.com/frankbria/ralph-claude-codeWrote 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/instructions/frankbria/ralph-claude-code/claude-md)<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>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 | $0.09464 | $0.09464 |
| Opus 5 | $0.04732 | $0.04732 |
| Sonnet 5 | $0.01893 | $0.01893 |
| Haiku 4.5 | $0.00946 | $0.00946 |
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) 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 jsonwith 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
ghinto 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()(replacedresolve_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-issueis mutually exclusive with all of them - One
gh issue list --limit 500query (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|prioritypicks among multiple matches: priority understands bareP0–P9andpriority: PNlabels (ties → oldest, none → first); interactive falls back to first on non-TTY/EOF.--dry-runpreviews the match table + would-be selection without importing
- Combinable primary filters:
- 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-modelpassthrough) 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)
- GitHub issue import (Issue #69):
- ralph_queue.sh —
ralph-queuecommand: batch processing and issue queue management (Issue #72). Builds a persistent queue at.ralph/queue.jsonof GitHub issues (reusesralph_import.sh'sghmachinery: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 viaRALPH_LOOP_CMD(defaultralph_loop.sh; overridable for tests), commitsFix #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
ralphis run with--github-issue <ref>, it tracks the issue across the loop vialib/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 withCloses #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 theghCLI 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;
--jsonoutput mode; exit codes: 0 (success), 1 (error), 2 (already enabled)
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.
- 4d ago First seen · 363 lines · 9,464 tokens per session scan B 488e404bfccd
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.
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.
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.
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.
aider-desk AGENTS.md
AGENTS.md instructions for hotovo/aider-desk, covering agents.md, common commands, development, type checking and linting and formatting.
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.
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.