cc-ralph

cc-ralph is a command for coding agents from xiaobei930/cc-best. It costs 12 tokens per session (2,624 once invoked), scanned A, original, MIT.

A command that starts a repeated autonomous development cycle using the Ralph Loop mechanism and a predefined workflow. The cycle can keep working through a task until a completion condition is detected.

In plain words
What is it for?
Use it for extended development tasks that need repeated roles such as planning, design, implementation, and testing; the official Ralph Loop add-on is also required.
Why use it?
It removes the need to write the full working process and completion rules manually for every long-running task.

Command

Part of the cc-best plugin — 19 skills, 44 commands, 8 agents, 20 hooks shipped together

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 commands/xiaobei930/cc-best/cc-ralph
Clone the repo
git clone --depth 1 https://github.com/xiaobei930/cc-best

Or install cc-best, the plugin that ships this one along with the rest of its 19 skills, 44 commands, 8 agents, 20 hooks.

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 cc-ralph

README.md
[![agentmods](https://agentmods.dev/badge/commands/xiaobei930/cc-best/cc-ralph.svg)](https://agentmods.dev/commands/xiaobei930/cc-best/cc-ralph)
Your own site
<a href="https://agentmods.dev/commands/xiaobei930/cc-best/cc-ralph"><img src="https://agentmods.dev/badge/commands/xiaobei930/cc-best/cc-ralph.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,624 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00012 $0.02624
Opus 5 $0.00006 $0.01312
Sonnet 5 $0.00002 $0.00525
Haiku 4.5 $0.00001 $0.00262

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

Security

Grade A, and why

cc-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 5d 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.

commands/cc-ralph.md · 295 lines

How it starts

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

/cc-ralph - CC-Best Ralph Loop 集成

使用 cc-best 工作流启动 Ralph Loop 自主开发循环。

同时支持插件用户和 Clone 用户。


与官方 ralph-loop 的关系

┌─────────────────────────────────────────────────────────────┐
│  /cc-best:cc-ralph (cc-best 插件)                                    │
│  ├── 读取项目状态 (progress.md, CLAUDE.md)                   │
│  ├── 生成 cc-best 工作流 Prompt                              │
│  │   (角色切换、迭代步骤、完成标准)                           │
│  └── 调用 ↓                                                  │
├─────────────────────────────────────────────────────────────┤
│  /ralph-loop:ralph-loop (官方插件)                           │
│  ├── 提供循环机制 (Stop hook)                                │
│  ├── 管理迭代次数                                            │
│  └── 检测完成信号 (<promise>)                                │
└─────────────────────────────────────────────────────────────┘

简单理解

  • ralph-loop:官方插件,提供"循环"能力(让 Claude 持续工作直到完成)
  • cc-ralph:cc-best 的包装命令,提供"工作流"(告诉 Claude 按什么流程工作)

为什么需要 cc-ralph? 直接用 /ralph-loop:ralph-loop "任务描述" 时,需要手动编写完整的 prompt。 而 /cc-best:cc-ralph 自动:

  1. 读取项目当前状态
  2. 注入 cc-best 的角色工作流(PM→Lead→Designer→Dev→QA)
  3. 添加完成标准和卡住处理逻辑

前置条件

需要安装 ralph-loop 官方插件:

/plugin install ralph-loop@claude-plugins-official

⚠️ Windows 用户注意

ralph-loop 插件的 setup 脚本是 bash 脚本,在 Windows 原生环境可能报错:

Error: Bash command failed for pattern "...setup-ralph-loop.sh"

解决方案

  1. 推荐:使用 WSL (Windows Subsystem for Linux)
  2. 替代:使用 Git Bash 运行 Claude Code
  3. 替代:直接使用 /cc-best:iterate(单会话版本,无需 ralph-loop)

ralph-loop 插件还依赖 jq 工具,需提前安装。


使用方式

基本用法

# 自动读取 progress.md,继续当前任务
/cc-best:cc-ralph

# 指定任务描述
/cc-best:cc-ralph "实现用户登录功能"

# 指定最大迭代次数
/cc-best:cc-ralph "完成 Phase 2" --max-iterations 20

选择模式

# 完整功能开发(默认)
/cc-best:cc-ralph --mode full-feature "实现用户认证"

# Phase 迭代(按 progress.md 推进)
/cc-best:cc-ralph --mode iterate

# Bug 修复
/cc-best:cc-ralph --mode bug-fix "修复登录超时问题"

# 代码重构
/cc-best:cc-ralph --mode refactor "重构认证模块"

# 修复测试
/cc-best:cc-ralph --mode fix-tests

# 文档生成
/cc-best:cc-ralph --mode doc-gen "生成 API 文档"

Read the full file on GitHub · 295 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. 5d ago First seen · 295 lines · 12 tokens per session scan A bd80ead3f5ee

Subscribe to this mod's changes

cc-ralph is a command published in the GitHub repository xiaobei930/cc-best (50 stars, last pushed 2mo ago), licensed MIT. It adds 12 tokens to every session and 2,624 once invoked, about $0.0001 per session on Opus 5. 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.