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 commands/peaky8linders/claude-cortex/ralph-startgit clone --depth 1 https://github.com/Peaky8linders/claude-cortexWrote 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/commands/peaky8linders/claude-cortex/ralph-start)<a href="https://agentmods.dev/commands/peaky8linders/claude-cortex/ralph-start"><img src="https://agentmods.dev/badge/commands/peaky8linders/claude-cortex/ralph-start.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.00031 | $0.01009 |
| Opus 5 | $0.00015 | $0.00504 |
| Sonnet 5 | $0.00006 | $0.00202 |
| Haiku 4.5 | $0.00003 | $0.00101 |
Grade B, and why
ralph-start 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
cat > ~/.claude/knowledge/.ralph-active << 'RALPH' How it starts
The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/ralph-start — Activate Autonomous Loop
You are activating a Ralph Wiggum autonomous loop. When Claude tries to exit, the Stop hook will re-feed the task prompt, creating a continuous work loop that persists across iterations.
Input
The user provides:
- Task prompt (required): What to work on autonomously
- --max-iterations N (optional): Maximum loop iterations (default: 50)
- --scope DIR (optional): Directory to freeze edits to
- --reset-strategy compact|reset (optional): Context management strategy (default: compact)
compact: Standard — carry forward context with compaction recoveryreset: Full context reset each iteration — clean slate with structured handoff artifact. Better for long-running tasks (10+ iterations) where context anxiety degrades quality.
Activation Protocol
Step 1: Parse Arguments
Extract:
prompt: The task description (everything that isn't a flag)max_iterations: From--max-iterations Nor default 50scope: From--scope DIRor emptyreset_strategy: From--reset-strategyor default "compact"
Step 2: Create Loop File
Write the loop configuration to ~/.claude/knowledge/.ralph-active:
cat > ~/.claude/knowledge/.ralph-active << 'RALPH'
{
"prompt": "THE_TASK_PROMPT",
"max_iterations": 50,
"iteration": 0,
"scope": "DIRECTORY_OR_EMPTY",
"started_at": "ISO_TIMESTAMP",
"started_by": "session"
}
RALPH
Use python3 with json.dumps for safe serialization (handles quotes, backslashes, newlines):
python3 << 'PYEOF'
import json, datetime, os
data = {
"prompt": "THE_PROMPT",
"max_iterations": MAX_ITER,
"iteration": 0,
"scope": "SCOPE_OR_EMPTY",
"reset_strategy": "RESET_STRATEGY",
"started_at": datetime.datetime.now().isoformat()
}
ralph_path = os.path.join(os.environ.get("HOME", os.path.expanduser("~")), ".claude", "knowledge", ".ralph-active")
with open(ralph_path, "w") as f:
json.dump(data, f, indent=2)
PYEOF
Replace THE_PROMPT, MAX_ITER, SCOPE_OR_EMPTY, and RESET_STRATEGY with the actual values. Use a heredoc (<< 'PYEOF') so that the prompt text is never interpolated by the shell — only parsed by Python's JSON serializer.
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 · 106 lines · 31 tokens per session scan B 698cba3fb8fd
ralph-start is a command published in the GitHub repository Peaky8linders/claude-cortex (11 stars, last pushed 2mo ago), licensed MIT. It adds 31 tokens to every session and 1,009 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.