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.svg" alt="Measured on agentmods" height="20"></a>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.01465 |
| Opus 5 | $0.00024 | $0.00732 |
| Sonnet 5 | $0.00010 | $0.00293 |
| Haiku 4.5 | $0.00005 | $0.00146 |
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 today.
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 — 140 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/tui/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.
- today First seen · 140 lines · 48 tokens per session scan A 436597048bbe
cw-gates is a skill published in the GitHub repository Hmbown/Codewhale (40,916 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 1,465 once invoked, about $0.0002 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-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.
verify
Exercise the real app/API/CLI and collect observable evidence; tests alone do not count as end-to-end verification.
webapp-testing
Start/reuse a local app, wait for readiness, inspect rendered state/console/network, act from observed selectors, and verify with evidence.
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-find-prs
Survey open Codewhale PRs and triage each for mergeability and disposition against the real landing branch.
best-of-n
Generate a small set of independent candidate solutions in worktrees, judge them against one explicit rubric, and apply the winner only after PASS verification.