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.
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.
git clone --depth 1 https://github.com/Hmbown/Codewhalenpx agentmods add skills/hmbown/codewhale/cw-gatesWrote 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.
[](https://agentmods.dev/skills/hmbown/codewhale/cw-gates)<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.
<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>- NVIDIA SkillSpector warn
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]
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.
| Model | Per session | Once 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 |
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.
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
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.
- 24d ago Changed e0623bc8bec7
- 27d ago Changed f3bc9bdb80da
- 1mo ago Changed · -2 lines fe7e4f3af3e3
- 1mo ago First seen · 140 lines · 48 tokens per session scan A 436597048bbe
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.
Other skills, from other repositories
codew-release-qa-sweep
Use before claiming Codewhale release work is done: run the full gate sweep and list the manual QA targets.
gh-find-prs
Survey open Codewhale PRs and triage each for mergeability and disposition against the real landing branch.
contributor-onboarding
Help a new contributor get productive on this checkout - inspect sync state against main, build, run the repository's exact verification gate, and produce a local what's-new digest. Never fetches, pulls, or modifies a dirty tree on its own. Explicit-only.
gh-close-issues
Close resolved Codewhale issues only after verifying the landed commit/behavior, with a positive crediting comment; never from title alone.
gh-credit-harvest
Harvest one community PR into a release branch with authorship and credit preserved, verified green, and a warm thank-you.
gh-assign-issues
Use to assign GitHub issues to a milestone and/or owners in bulk, verifying each.