detach

detach is a command for Claude Code from juan294/cc-rpi. It costs 0 tokens per session (1,788 once invoked), scanned A, original, MIT.

A command for removing the cc-rpi project blueprint, which supplies a research, planning, implementation, and validation workflow, from a project.

In plain words
What is it for?
Use it to check whether cc-rpi is installed, review its version and artifacts, and remove its managed files and settings.
Why use it?
It separates blueprint files from the project’s own files and preserves project-specific work.

Command for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the cc-rpi plugin — 14 skills, 19 commands, 2 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/juan294/cc-rpi/detach
Clone the repo
git clone --depth 1 https://github.com/juan294/cc-rpi

Made for: Claude Code.

Or install cc-rpi, the plugin that ships this one along with the rest of its 14 skills, 19 commands, 2 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 detach

README.md
[![agentmods](https://agentmods.dev/badge/commands/juan294/cc-rpi/detach.svg)](https://agentmods.dev/commands/juan294/cc-rpi/detach)
Your own site
<a href="https://agentmods.dev/commands/juan294/cc-rpi/detach"><img src="https://agentmods.dev/badge/commands/juan294/cc-rpi/detach.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,788 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.1 $0.00000 $0.01788
Opus 5 $0.00000 $0.00894
Sonnet 5 $0.00000 $0.00358
Haiku 4.5 $0.00000 $0.00179

Measured 6d ago against content hash f6cf00c2e426, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

detach 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 6d 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.

templates/commands/detach.md · 171 lines

How it starts

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

Detach Project from cc-rpi Blueprint

Model tier: sonnet — Sonnet 5 (1M context) session.

You are cleanly removing cc-rpi artifacts from this project. The blueprint lives at <path-to-your-cc-rpi-clone>/.

This command removes all blueprint-managed files and configuration while preserving project-specific content and user work products.

Phase 1: Verify Adoption

  1. Check for .claude/cc-rpi-sync.json or RPI commands in .claude/commands/ (research.md, plan.md, implement.md, validate.md).
  2. If neither exists: report "This project doesn't appear to use cc-rpi. Nothing to detach." and stop.
  3. If sync metadata exists, read it and report the current blueprint version and last sync date.

Phase 2: Inventory Artifacts

Scan this project for all cc-rpi artifacts. Categorize each into one of four tiers.

Tier 1: Blueprint scaffolding (always remove)

Check for these files and note which exist:

  • AGENTS.md
  • .claude/commands/research.md
  • .claude/commands/plan.md
  • .claude/commands/implement.md
  • .claude/commands/validate.md
  • .claude/commands/describe-pr.md
  • .claude/commands/pre-launch.md
  • .claude/commands/status.md
  • .claude/commands/fix-ci.md
  • .claude/commands/explore-release.md
  • .claude/hooks/guard-bash.sh
  • .claude/cc-rpi-sync.json
  • scripts/agents/cc-rpi-update.sh (nightly sync agent, if exists)

For each command file that exists, diff it against <cc-rpi-path>/templates/commands/<name> to detect customization. Mark as "unmodified" or "customized."

For AGENTS.md, diff it against <cc-rpi-path>/templates/AGENTS.md.template to detect customization. Mark as "unmodified" or "customized."

For guard-bash.sh, check if content exists below the # Project-specific guards below this line marker. If so, mark as "customized."

Tier 2: Blueprint-managed CLAUDE.md sections

Read the project's CLAUDE.md (or AGENTS.md for copilot-rpi projects) and identify these blueprint-managed sections by their ## or ### headers:

Read the full file on GitHub · 171 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. 6d ago First seen · 171 lines · 0 tokens per session scan A f6cf00c2e426

Subscribe to this mod's changes

detach is a command published in the GitHub repository juan294/cc-rpi (5 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,788 tokens. 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-31.