drain

drain is a skill for Claude Code, Codex from RockyHong/super-bootstrap. It costs 200 tokens per session (3,178 once invoked), scanned B, original, MIT.

A workflow that selects suitable work items, groups non-conflicting items into a wave, and starts each in its own Git worktree, which is a separate working copy.

In plain words
What is it for?
Use it to drain eligible bug, debt, or gap cards from a project board into parallel worktrees, stopping each task when it is ready to merge.
Why use it?
It helps run several eligible tasks in parallel while keeping their code changes isolated and requiring user confirmation before merging.

Skill for Claude CodeCodex

Part of the super-bootstrap plugin — 13 skills, 7 agents 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 skills/rockyhong/super-bootstrap/drain
Any agent
npx skills add RockyHong/super-bootstrap --skill drain
Clone the repo
git clone --depth 1 https://github.com/RockyHong/super-bootstrap

Made for: Claude Code, Codex.

Or install super-bootstrap, the plugin that ships this one along with the rest of its 13 skills, 7 agents.

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 drain

README.md
[![agentmods](https://agentmods.dev/badge/skills/rockyhong/super-bootstrap/drain.svg)](https://agentmods.dev/skills/rockyhong/super-bootstrap/drain)
Your own site
<a href="https://agentmods.dev/skills/rockyhong/super-bootstrap/drain"><img src="https://agentmods.dev/badge/skills/rockyhong/super-bootstrap/drain.svg" alt="Measured on agentmods" height="20"></a>
Per session 200 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,178 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00200 $0.03178
Opus 5 $0.00100 $0.01589
Sonnet 5 $0.00040 $0.00636
Haiku 4.5 $0.00020 $0.00318

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

Security

Grade B, and why

drain 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 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Never `Read` a path under `.claude/worktrees/{id}/` — a worktree-internal Read re-injects that worktree's nested CLAUDE.md + rules per file and blows the context budget. Use the read-around paths (`git show {branch}:<pat
plugins/super-bootstrap/skills/drain/SKILL.md · 113 lines

How it starts

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

drain — Parallel-Worktree Auto-Drain

One wave per invocation over the board. Scan → Cloud-gate → wave-select → confirm → spawn one isolated subprocess per item → each halts at a user wall. The orchestrator (gateway) holds no in-head state; every tick re-reads from files. Capacity ceiling = how many halts the user can resolve, not machine throughput.

Consumer contract: assumes the super-bootstrap harness shape — docs/work/{BUG,DEBT,GAP}-###.md card files, /super-bootstrap:merge, /super-bootstrap:commit. Not portable below that line. First run self-installs the worktree infra (§Pre-flight step 0).

Trigger: user types /super-bootstrap:drain. Never auto-fires.

Invariants

  • One wave, one shot per invocation. No internal loop across waves, no --all. Turn ends after the wave is dispatched. Next invocation cold-reads files and re-picks.
  • No auto-merge — ever. Each subprocess stops at a ready-to-merge state. The user confirms; the merge runs via /super-bootstrap:merge (the destructive-git lane). Subprocesses are denied push/merge/rebase/branch-delete/worktree at the permission layer.
  • Admission-gate, not type-gate. Eligible = the item's next phase is drainable, across BUG/DEBT/GAP card types. When the scale module is wired the gate is next-phase venue ∈ {T, S} (.claude/rules/venue-map.md); without it the gate falls back to intent == Cloud (cloud-safe). Either way Device/Discuss and venue U/P defer — drain never spawns for them. A mislabel is fixed upstream (clarify the card, the shared criterion, or the venue map), never overridden here.
  • Stage-resume. Each item's brief enters the chain at its current stage (thread-state): raw→ground, triaged→plan, aimed→plan, executing→execute, review→review. Each phase is named by the artifact it lands (assets/phase-loop.md §Phase → artifact). Committed upstream phases are inherited, not re-run.
  • Drain-till-wall; halts are outcomes. Drainable is a phase attribute, not a ticket attribute: admission scores only the next phase, and the session runs phase-to-phase to its first wall (typed user | shapeassets/phase-loop.md §Walls), then halts. The wall's finding plus any committed earlier phases are progress, not waste; a resolved wall re-enters on the next invocation.
  • Wave member = no blocker. Orphans + chain-heads enter; chain-tails and conflicts defer to a later invocation. No forward projection — render the current wave only.

Read the full file on GitHub · 113 lines

Files

What ships with it

9 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. 5d ago First seen · 113 lines · 200 tokens per session scan B 5b1be9f8dc6c

Subscribe to this mod's changes

drain is a skill published in the GitHub repository RockyHong/super-bootstrap (3 stars, last pushed today), licensed MIT. It adds 200 tokens to every session and 3,178 once invoked, about $0.0010 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-31.

Related

Other skills, from other repositories

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

add-cloud-flow

Integrates Power Automate cloud flows into a Power Pages site. Lists available flows, suggests relevant ones based on intent, identifies scenarios and web roles, creates metadata files, and generates client-side code to call flows. Handles both new flow registration and adding already-registered flows to additional…

microsoft/power-platform-skills · 91 tokens

configure-env-variables

Configures environment variables for Power Pages site settings to support ALM across environments. Creates environment variable definitions in Dataverse, guides the user through linking site settings to those variables via the Power Pages Management app, adds the variables to the solution, and generates a…

microsoft/power-platform-skills · 119 tokens

deploy-site

Deploys an existing Power Pages code site to a Power Pages environment using PAC CLI. Handles tooling verification, authentication, environment confirmation, building, and uploading. Use when the user wants to deploy, upload, or publish their code site.

microsoft/power-platform-skills · 50 tokens

add-teams

Adds Microsoft Teams connector to a Power Apps code app. Use when sending Teams messages, posting to channels, or integrating with Teams chat.

microsoft/power-platform-skills · 31 tokens

tidewave-integration

Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs. Use when evaluating code in a running Phoenix app.

oliver-kriska/claude-elixir-phoenix · 38 tokens