Hmbown/CodeWhale is an open-source coding agent that runs in the terminal and is written in Rust. Developers use it to inspect repositories, edit files, run commands, and coordinate work with configurable model providers, skills, MCP servers, and approval controls; the catalogue entries extend its available workflows.
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.
npx skills add Hmbown/CodeWhale --skill v4-best-practicesgit clone --depth 1 https://github.com/Hmbown/CodeWhaleWrote 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/v4-best-practices)<a href="https://agentmods.dev/skills/hmbown/codewhale/v4-best-practices"><img src="https://agentmods.dev/badge/skills/hmbown/codewhale/v4-best-practices.svg" alt="Measured on agentmods" height="20"></a>- Snyk pass
- NVIDIA SkillSpector pass
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.00051 | $0.00416 |
| Opus 5 | $0.00026 | $0.00208 |
| Sonnet 5 | $0.00010 | $0.00083 |
| Haiku 4.5 | $0.00005 | $0.00042 |
Grade A, and why
v4-best-practices 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 8d 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.
What it actually says
V4 Best Practices
Rules for multi-step V4 thinking-mode workflows. Each rule prevents a specific, observable failure class.
1. Verify references before writing
Before referencing a file path, function, or type in code or plan output,
call grep_files or read_file to confirm it exists in the workspace.
# Bad: edit_file path="src/config/loader.rs" (assumed from memory)
# Good: grep_files pattern="pub fn load_config" → confirms src/config/mod.rs:42
# then reference src/config/mod.rs:42
Failure avoided: edit_file errors on non-existent paths; LSP diagnostics
on hallucinated symbols.
2. Spawn a verifier sub-agent before multi-file execution
Before executing a plan that touches 3+ files, spawn a deepseek-v4-flash
sub-agent (thinking off) to read the target files and confirm path/symbol
assumptions still hold.
agent type="verifier" model="deepseek-v4-flash"
prompt: "Read these files and confirm: [list assumptions]. Report mismatches."
Failure avoided: multi-step edits fail partway because file structure changed since the plan was drafted.
3. Plan output must use confirmed path:line references
In plan-mode output, replace vague location pointers with path:line
references drawn from a prior grep_files result.
# Bad: "Update the retry logic in the client module"
# Good: "Update retry loop at crates/tui/src/client.rs:187"
Failure avoided: agent-mode execution cannot locate the intended edit target when plan directions are imprecise.
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.
- 8d ago First seen · 51 lines · 51 tokens per session scan A cca76c3e9882
v4-best-practices is a skill published in the GitHub repository Hmbown/CodeWhale (40,914 stars, last pushed 2d ago), licensed MIT. It adds 51 tokens to every session and 416 once invoked, about $0.0003 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-30.
Other skills, from other repositories
cw-land
Use when turning verified Codewhale work into commits, branches, or a merge: choosing direct-main vs. worktree vs. integration branch, preserving contributor credit, and honoring the gate artifact before merging.
cw-slice
Use before writing code for any Codewhale feature, upgrade, or refactor: find the existing owner of the behavior, bound the change to one reviewable slice, and fix the evidence bar before you start.
cw-dogfood
Use when a Codewhale change needs proving in the real product, or when asked to build/install/dogfood the local binaries: stamped release build, atomic install, fresh-shell verification, and the manual QA that gates cannot cover.
cw-gates
Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.
cw-handoff
Use when writing a Codewhale takeover prompt, continuation note, or end-of-session summary for another agent or a later session: a paste-ready handoff grounded in live state, with done/suspected/blocked kept separate.
cw-orient
Use at the start of any Codewhale work session, or when unsure which checkout, branch, or worktree is authoritative: establish live repo truth before reading a plan or editing a file.