drain

A read-only checker for deferred work in specification bundles. It examines conditions that postpone a task, reports ones it cannot evaluate or that are malformed, and lists manual test entries.

In plain words
What is it for?
Use it to evaluate structured gate conditions, surface date-based and free-text gates, find malformed gates, inventory manual tests, and report unprocessed observations.
Why use it?
It shows which postponed tasks can now be assessed and which entries still need human review or cleanup.

Skill for Claude CodeCodex

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/inkatze/planwright/drain
Any agent
npx skills add inkatze/planwright --skill drain
Clone the repo
git clone --depth 1 https://github.com/inkatze/planwright

Made for: Claude Code, Codex.

Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,524 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.00075 $0.01524
Opus 5 $0.00037 $0.00762
Sonnet 5 $0.00015 $0.00305
Haiku 4.5 $0.00007 $0.00152

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

Security

Grade A, and why

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

skills/drain/SKILL.md · 120 lines

How it starts

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

/drain — on-demand gate drain pass

/drain is the on-demand entry point to the shared gate evaluator (REQ-H1.4, D-17, D-31). It sweeps every spec bundle's tasks.md for **Gate:** deferral entries, evaluates the structured GATE(when: …) ones against the closed grammar (free-text gates surface unevaluated), and presents the drain report. The scheduled entry point to the same evaluator is /orchestrate --bookkeeping; neither may parse gates on its own. Normative semantics (accumulator classes, grammar productions, lanes, data-only handling) live in the accumulator-taxonomy doctrine doc — read it via the rule-doc resolution path before interpreting the report.

Doctrine manifest (machine-parseable, per doctrine/instruction-hygiene.md; run-start loads before work begins):

Doctrine: run-start accumulator-taxonomy

Procedure

1. Resolve the evaluator and the specs root

Resolve the planwright root via the standard chain (PLANWRIGHT_ROOTCLAUDE_PLUGIN_ROOT<claude-dir>/planwright); the evaluator is <root>/scripts/drain-gates.sh. The specs root is the current repository's specs/ directory. If there is no specs/ directory, report that there is nothing to drain and stop (this is a read-only authoring-path move: degrade gracefully, REQ-K1.7).

2. Run the evaluator

<planwright-root>/scripts/drain-gates.sh specs/

The evaluator resolves task-completion atoms through the derivation engine (scripts/orchestrate-state.sh), which on a format-version 2 bundle is the only completion source — no ## Completed section exists (invariant-tasks D-8); v1 bundles keep the v1 read. Version keying reads the declared Format-version:; unparseable fails closed, never the v1 arm (D-7). Exit 0 means the sweep completed — malformed gates are report content, not failures. A non-zero exit means the evaluator could not run or could not complete the sweep; surface the error verbatim and stop. A complete report always ends with the == summary == section; treat a report missing it as a failed sweep, not a result.

Read the full file on GitHub · 120 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. 2d ago First seen · 120 lines · 75 tokens per session scan A c69ec374ca4f

Subscribe to this mod's changes

drain is a skill published in the GitHub repository inkatze/planwright (3 stars, last pushed 4d ago), licensed MIT. It adds 75 tokens to every session and 1,524 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

seeds-issue-audit

Audit and triage open Seeds (sd) issues — find which can be closed, auto-close high-confidence completed ones, and report borderline cases. Activate for prompts like "audit open issues", "which seeds issues can be closed", "clean up the issue tracker", "triage the seeds backlog".

jayminwest/warren · 67 tokens

good-first-issue-batch

File a batch of contributor-ready GitHub issues from the seeds backlog, re-verifying every candidate against HEAD first so no dead issue reaches a contributor. Activate for prompts like "file some good first issues", "open a batch of GFIs", "publish backlog issues to GitHub", "find contributor-ready work", or after an…

jayminwest/warren · 80 tokens

os-eco-dep-sync

Bump warren onto the latest published @os-eco/ versions across package.json + bun.lock and the Dockerfile CLI pins, then run the gates and open a PR. Use when checking if warren is on the newest burrow/plot/canopy/seeds/mulch/sapling.

jayminwest/warren · 69 tokens

release

Prepare, cut, and verify a warren release — tracker audits, version bump, CHANGELOG curation, ROADMAP update, push, then watch the pipeline through to published artifacts.

jayminwest/warren · 39 tokens

create-coordclaw-team

A Skill for creating a CoordClaw multi-agent collaborative team. Through an 8-step standardized process, from requirement gathering to team validation, rapidly build a complete AI team.

CoordClaw/CoordClaw · 42 tokens

write-file

Replaces OpenClaw built-in write tool for all plain text writing, providing.

CoordClaw/CoordClaw · 618 tokens