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
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 cw-slicegit 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/cw-slice)<a href="https://agentmods.dev/skills/hmbown/codewhale/cw-slice"><img src="https://agentmods.dev/badge/skills/hmbown/codewhale/cw-slice/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-slice"><img src="https://agentmods.dev/badge/skills/hmbown/codewhale/cw-slice.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- 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.00047 | $0.01591 |
| Opus 5.5 | $0.00019 | $0.00636 |
| Sonnet 5.5 | $0.00009 | $0.00318 |
| Haiku 4.5 | $0.00005 | $0.00159 |
Grade A, and why
cw-slice 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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
cw-slice
The expensive mistake in this repo is not a bad implementation — it is a second
implementation. A new model_*, *_config, provider_*, or "bridge" module
beside the one that already does the job ships two systems and a comment that is
no longer true. This skill is the ponytail ladder's rung 2 with commands
attached: find the thing that already exists, then edit it.
Stage 2 of the loop: cw-orient → slice → cw-gates → cw-dogfood → cw-land → cw-handoff.
When to use
- Any feature, upgrade, refactor, or "make X work like Y" request.
- Before creating a new module, trait, config struct, or command.
- When a plan or issue tells you to build something and you have not yet confirmed it does not already exist.
Workflow
-
Walk the ladder before opening an editor (
AGENTS.md, "The ponytail method" — not restated here, since a second copy is what rung 2 forbids). Stop at the first rung that answers. The ladder runs after reading the code, never instead of it: a short diff written without reading the call sites is a guess, not a small change. State the rung only when the choice isn't obvious from the diff itself. -
Grep for the predecessor. This is the step that gets skipped and the one that costs the most:
grep -rn "<the concept, in the words the code would use>" crates --include='*.rs' | head -40 ls crates grep -rln 'model_\|_config\|provider_' crates/*/src --include='*.rs' | head -30Search behavior and symbols, not just filenames. If you find an owner, edit it. If you are still adding a new layer, its module doc must name the predecessor it replaces — otherwise you are editing the wrong file.
-
Check the contracts you are about to walk into. One of these is guard-tested, the rest are convention — either way, move them with their code, not around it:
- One turn loop:
crates/tui/src/core/engine/turn_loop.rs, guarded bycrates/core/tests/single_turn_loop.rs. A second loop fails the guard; changing the shape means changing the guard with it. - One base prompt:
BASE_PROMPTincrates/tui/src/prompts/text.rs. - The subagent tool is
agent;agent_open/agent_eval/agent_close/delegate_to_agentare removed surfaces. If the shape must move, move the code and add the guard test that judges the new shape — the convention is not a fence around the area. - The system prompt + tool catalog are a session-pinned KV-cache prefix
(
docs/CACHE.md). Any new session-context contributor must state its cache effect — frozen prefix vs. append-only history. Never splice a volatile fact into the prefix. crates/tui/src/core/is a module inside the TUI crate.crates/coreis a different crate that runs no turns. Do not confuse them.- Repeatedly misidentified as dead, verify consumers before removing:
runtime/src/context_budget.rs,tui/src/model_registry.rs,runtime/src/prompt_zones.rs,tui/src/tools/remember.rs,config/src/route/.
- One turn loop:
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 e1cb83a3f11f
- 27d ago Changed · -13 lines 1f16b6bdeeea
- 1mo ago Changed · +8 lines ecc2e7a1e09f
- 1mo ago Changed 36539725c9a6
- 1mo ago First seen · 123 lines · 47 tokens per session scan A e4c6d479d5d1
cw-slice is a skill published in the GitHub repository Hmbown/Codewhale (41,035 stars, last pushed 18d ago), licensed MIT. It adds 47 tokens to every session and 1,591 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
gh-find-prs
Survey open Codewhale PRs and triage each for mergeability and disposition against the real landing branch.
gh-compile-issues
Triage N GitHub issues into a coverage matrix: fetch each, check current code, classify already-done/quick-fix/design/defer with cited evidence.
review
Diff-scoped correctness review that reads the codebase around the change — callers, contracts, and invariants — and returns line-anchored findings ranked by severity with confidence, then a merge-risk verdict. Use for reviewing a PR, diff, or named change set. Not for style review, approvals-as-rubber-stamp, or…
simplify
Improve clarity and reduce needless complexity after behavior is understood; preserve behavior and keep cleanup separate from correctness fixes.
codew-release-qa-sweep
Use before claiming Codewhale release work is done: run the full gate sweep and list the manual QA targets.
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.