bd-detox

bd-detox is a skill for Claude Code from keefar/ticket-flow. It costs 0 tokens per session (1,894 once invoked), scanned A, original, MIT.

A cleanup command for projects that already initialized Beads with guidance that conflicts with Claude Code’s memory files. It removes that guidance from the relevant project instructions and can install a replacement policy.

In plain words
What is it for?
Use it to clean up an existing Beads setup, preview the proposed changes, preserve or remove AGENTS.md, or skip the runtime Beads guidance override.
Why use it?
It resolves conflicting instructions between Beads and the project’s memory system without requiring the project to be initialized again.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Part of the ticket-flow plugin — 12 skills, 2 hooks shipped together

Good fit Use it to clean up an existing Beads setup, preview the proposed changes, preserve or remove AGENTS.md, or skip the runtime Beads guidance override.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/keefar/ticket-flow/bd-detox
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.

Any agent
npx skills add keefar/ticket-flow --skill bd-detox
Clone the repo
git clone --depth 1 https://github.com/keefar/ticket-flow

Made for: Claude Code.

Or install ticket-flow, the plugin that ships this one along with the rest of its 12 skills, 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 bd-detox

README.md
[![agentmods](https://agentmods.dev/badge/skills/keefar/ticket-flow/bd-detox/github.svg)](https://agentmods.dev/skills/keefar/ticket-flow/bd-detox)
Your own site
<a href="https://agentmods.dev/skills/keefar/ticket-flow/bd-detox"><img src="https://agentmods.dev/badge/skills/keefar/ticket-flow/bd-detox/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 bd-detox

Your own site · 80×15
<a href="https://agentmods.dev/skills/keefar/ticket-flow/bd-detox"><img src="https://agentmods.dev/badge/skills/keefar/ticket-flow/bd-detox.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,894 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.00000 $0.01894
Opus 5.5 $0.00000 $0.00758
Sonnet 5.5 $0.00000 $0.00379
Haiku 4.5 $0.00000 $0.00189

Measured 1mo ago against content hash d76a739210c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bd-detox 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 1mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (bd-detox.sh, install-prime.sh, tests/test_bd-detox.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/bd-detox/SKILL.md · 82 lines

How it starts

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

/ticket-flow:bd-detox — Memory-clause cleanup for existing beads projects

Args:

  • (none) — coexistence mode: remove the anti-MEMORY line from CLAUDE.md and AGENTS.md, append the Memory Coexistence Policy to CLAUDE.md (and to AGENTS.md when it exists), install the .beads/PRIME.md override. Equivalent end-state to a fresh /ticket-flow:init --mode=beads (default mode).
  • --skip-agents — purge mode: delete AGENTS.md entirely, strip the BEADS INTEGRATION block from CLAUDE.md. Equivalent end-state to a fresh /ticket-flow:init --mode=beads --skip-agents. Recommended for tf users on the Auto-Memory + CLAUDE.md stack.
  • --no-prime — leave bd prime alone; skip the .beads/PRIME.md override.
  • --dry-run — show the planned changes without writing.

What it does

/ticket-flow:init --mode=beads only handles fresh beads projects (it scaffolds with tf's custom agents-template). Projects that already ran vanilla bd init have the anti-MEMORY clause baked into AGENTS.md plus a BEADS INTEGRATION block in CLAUDE.md, and bd re-emits the same guidance at runtime through bd prime. This skill is the after-the-fact cleanup.

Which file actually reaches Claude Code

Claude Code does not read AGENTS.md. Its memory files are CLAUDE.md and .claude/rules/ (memory docs). That reorders the whole cleanup:

Surface Reaches Claude Code Handled by
CLAUDE.md → BEADS INTEGRATION block yes — this is the effective contamination clause stripped + Coexistence Policy appended (coexistence) / whole block removed (purge)
bd prime output (SessionStart and PreCompact hooks) yes — injected at runtime .beads/PRIME.md override
AGENTS.md no cleaned anyway, for other agents (Codex, Cursor, Amp, …)

The earlier version of this skill appended the Memory Coexistence Policy only to AGENTS.md — i.e. the countermeasure landed in the file this harness never reads, while the contaminating block stayed in the one it does. Coexistence mode now appends the policy to CLAUDE.md.

Read the full file on GitHub · 82 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 82 lines · 0 tokens per session scan A d76a739210c7

Subscribe to this mod's changes

bd-detox is a skill published in the GitHub repository keefar/ticket-flow (4 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,894 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.

Related

Other skills, from other repositories

flow-next-audit

Audit .flow/memory/ entries against current code and keep, update, consolidate, replace, delete, or harden each. Use when asked to audit memory or graduate a recurring lesson into a gate.

gmickel/flow-next · 46 tokens

flow-next-memory-migrate

Migrate legacy flat .flow/memory files to the categorized YAML schema. One-time ceremony. Use when asked to migrate flow memory.

gmickel/flow-next · 33 tokens

Self-Improving + Proactive Agent

Self-reflection + Self-criticism + Self-learning + Self-organizing memory. Agent evaluates its own work, catches mistakes, and improves permanently. Use when (1) a command, tool, API, or operation fails; (2) the user corrects you or rejects your work; (3) you realize your knowledge is outdated or incorrect; (4) you…

UnicomAI/wanwu · 105 tokens

knowledge-spider

A local knowledge-base skill for saving, searching, deleting, and counting records such as preferences, facts, tasks, and other important information.

UnicomAI/wanwu · 0 tokens

flow-next-visual

Restate a spec, a task, a diff, or the current topic visually as a compact markdown digest. Use when asked to 'show me', 'explain this visually', 'restate that', 'digest the plan', 'walk me through the spec', 'walk me through the tasks', 'walk me through the diff', or when the output is too much text and a shape would…

gmickel/flow-next · 112 tokens

flow-next-flow

Use first in a Flow-Next repo for a spec id, change, bug, issue, slow code or metric, cleanup, design fork, dump to explain, repeated mistake, prompt change, what could break, what next. No quick asks.

gmickel/flow-next · 53 tokens