cw-gates

cw-gates is a skill for Claude Code, Codex from Hmbown/Codewhale. It costs 48 tokens per session (1,414 once invoked), scanned A, original, MIT.

A verification workflow for deciding whether a code change is really ready to call done or merge. It moves from formatting and focused tests to broader checks according to the change's risk.

In plain words
What is it for?
Use it before claiming a fix is complete, before a dogfood build, or when someone asks you to run the project's checks.
Why use it?
It prevents treating a successful command or incomplete test output as proof that the change works. It also provides evidence before a build is installed or merged.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for codewhale. Also seen: built for codewhale.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/check-dead-code-budget.py # #[allow(dead_code)] ceiling.

Good fit Use it before claiming a fix is complete, before a dogfood build, or when someone asks you to run the project's checks.

Compare 6 skills from other repositories ↓
About the project

Codewhale is an open-source coding agent that runs in the terminal and can read repositories, edit files, execute commands, and inspect results while pursuing a task. Developers use it with hosted providers or local models, with controls for how much access it receives.

Hmbown/Codewhale · 41,035 stars · on GitHub · codewhale.net

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Hmbown/Codewhale
agentmods
npx agentmods add skills/hmbown/codewhale/cw-gates

Made for: Claude Code, Codex.

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 cw-gates

README.md
[![agentmods](https://agentmods.dev/badge/skills/hmbown/codewhale/cw-gates/github.svg)](https://agentmods.dev/skills/hmbown/codewhale/cw-gates)
Your own site
<a href="https://agentmods.dev/skills/hmbown/codewhale/cw-gates"><img src="https://agentmods.dev/badge/skills/hmbown/codewhale/cw-gates/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 cw-gates

Your own site · 80×15
<a href="https://agentmods.dev/skills/hmbown/codewhale/cw-gates"><img src="https://agentmods.dev/badge/skills/hmbown/codewhale/cw-gates.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,414 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. ✓ AI security review Sonnet 5 · 6 Sept 2026 📄 Read the review Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 104
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00048 $0.01414
Opus 5.5 $0.00019 $0.00566
Sonnet 5.5 $0.00010 $0.00283
Haiku 4.5 $0.00005 $0.00141

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

Security

Grade A, and why

cw-gates 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 24d 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.

docs/skills/cw-gates/SKILL.md · 138 lines

How it starts

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

cw-gates

Pick the smallest evidence that answers the actual risk, then quote the real output. This repo has been burned twice by the alternative: an exit code mistaken for a pass, and a harness whose scoring line silently reported unevaluated rows as green. Assertions without command output are not evidence.

Stage 3 of the loop: cw-orient → cw-slice → gates → cw-dogfood → cw-land → cw-handoff.

When to use

  • Before saying "done", "green", "passing", "fixed", or "ready to land".
  • Before a dogfood build — never install an ungated binary.
  • When asked to "run the gates" or to prove a change is safe.

For release work specifically, use codew-release-qa-sweep instead — it adds the version-drift gate and the manual TUI QA targets on top of this ladder.

Workflow

Climb only as far as the risk requires. Say where you stopped and what you skipped.

Rung 1 — always, and cheap

cargo fmt --all -- --check
git diff --check

Rung 2 — the area that owns the change

scripts/dev-test.sh maps an area or a source path to the fastest correct invocation, and applies the isolated build-dir topology (docs/BUILD_PERFORMANCE.md):

scripts/dev-test.sh --list
scripts/dev-test.sh crates/runtime/src/elapsed.rs      # path → area + filter
scripts/dev-test.sh tui tools::                    # area + filter
scripts/dev-test.sh config

It uses cargo nextest run when nextest is on PATH (.config/nextest.toml); CODEWHALE_DEV_NEXTEST=0 forces libtest. For the TUI crate, --lib and --tests are disjoint — choose the target that owns the behavior rather than running both by reflex.

cargo test --no-run answers a compile question without executing unrelated cases. cargo test --doc covers doc examples, and is only worth running when those examples changed.

Rung 3 — the budgets and drift checks CI enforces

Read the full file on GitHub · 138 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. 24d ago Changed e0623bc8bec7
  2. 27d ago Changed f3bc9bdb80da
  3. 1mo ago Changed · -2 lines fe7e4f3af3e3
  4. 1mo ago First seen · 140 lines · 48 tokens per session scan A 436597048bbe

Subscribe to this mod's changes

cw-gates is a skill published in the GitHub repository Hmbown/Codewhale (41,035 stars, last pushed 18d ago), licensed MIT. It adds 48 tokens to every session and 1,414 once invoked, about $0.0002 per session on Opus 5.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-09-06.