detach

detach is a skill for Claude Code from Jebel-Quant/rhiza-claude. It costs 45 tokens per session (855 once invoked), scanned A, original, MIT.

A cleanup command that removes files managed by rhiza, a repository template-management tool, from a project. It reads rhiza's lock file to identify those files and directories.

In plain words
What is it for?
Use it when you want to detach one repository from rhiza. It deletes the listed managed files, removes directories left empty, and deletes the management lock file.
Why use it?
It removes a project from rhiza management while leaving files created independently untouched. Because the operation deletes files, it requires confirmation unless forced.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the rhiza plugin — 10 skills, 1 hook shipped together

Good fit Use it when you want to detach one repository from rhiza. It deletes the listed managed files, removes directories left empty, and deletes the management lock file.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Jebel-Quant/rhiza-claude
Claude Code
/plugin install rhiza

Made for: Claude Code.

Or install rhiza, the plugin that ships this one along with the rest of its 10 skills, 1 hook.

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/skills/jebel-quant/rhiza-claude/detach/github.svg)](https://agentmods.dev/skills/jebel-quant/rhiza-claude/detach)
Your own site
<a href="https://agentmods.dev/skills/jebel-quant/rhiza-claude/detach"><img src="https://agentmods.dev/badge/skills/jebel-quant/rhiza-claude/detach/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for detach

Your own site · 80×15
<a href="https://agentmods.dev/skills/jebel-quant/rhiza-claude/detach"><img src="https://agentmods.dev/badge/skills/jebel-quant/rhiza-claude/detach.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 855 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00045 $0.00855
Opus 5 $0.00023 $0.00428
Sonnet 5 $0.00009 $0.00171
Haiku 4.5 $0.00005 $0.00085

Measured 9d ago against content hash 6c4ab5707f3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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.

plugin/skills/detach/SKILL.md · 62 lines

How it starts

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

You are running /detach in the current working directory's repo.

This command is a thin wrapper around the bundled plugin/scripts/detach.py. All the deletion logic lives in that script — a deterministic, stdlib-only Python program that reads .rhiza/template.lock directly (no rhiza CLI, no PyYAML required). Do not re-implement it or delete files yourself; run the script.

⚠️ This is destructive. It permanently deletes the files rhiza synced into the repo, removes the directories they leave empty, and deletes .rhiza/template.lock so the repo is no longer rhiza-managed. Files you added yourself are untouched.

This detaches a repo, not the plugin. It is the inverse of the sync, not of the installation — the rhiza plugin stays installed and every other repo stays managed. A user who wants the plugin itself gone from Claude Code wants /plugin, not this. If that is what they appear to be asking for, say so rather than deleting their files.

Argument (optional): $ARGUMENTS — a path to the repo root to clean; default is the current directory.

1. Confirm intent first

Because this deletes files, confirm with the user before running unless they have already clearly asked to proceed (e.g. said "yes, detach" or passed --force). Recommend they have a clean git tree / committed work first, so the deletion is easy to review and revert.

2. Run the script

Invoke it with the plugin-root path (it ships inside this plugin, so ${CLAUDE_PLUGIN_ROOT} resolves at runtime — keep the quotes):

uv run --python 3.12 --no-project python "${CLAUDE_PLUGIN_ROOT}/scripts/detach.py" $ARGUMENTS --force
  • Pass $ARGUMENTS through as the optional target path. If it's empty, just omit it.
  • The script normally prompts [y/N] for confirmation. When run non-interactively (as here, with no TTY to answer) an unanswered prompt is treated as "no" and it cancels — so pass --force (equivalently -y) only after the user has confirmed in step 1, to carry out the deletion they approved.

Read the full file on GitHub · 62 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. 9d ago First seen · 62 lines · 45 tokens per session scan A 6c4ab5707f3a

Subscribe to this mod's changes

detach is a skill published in the GitHub repository Jebel-Quant/rhiza-claude (4 stars, last pushed 2d ago), licensed MIT. It adds 45 tokens to every session and 855 once invoked, about $0.0002 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-31.