v4-best-practices

v4-best-practices is a skill for Claude Code, Codex from Hmbown/CodeWhale. It costs 51 tokens per session (416 once invoked), scanned A, original, MIT.

A set of working rules for multi-step tasks using DeepSeek V4 models in thinking mode. It requires checking that files, functions, and plan assumptions are real before using them.

In plain words
What is it for?
Use it when planning or executing work across several files with DeepSeek V4 Pro or V4 Flash, including a separate check of the target files before editing.
Why use it?
It reduces errors caused by outdated file references, guessed code locations, and plans that were never checked against the workspace.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it when planning or executing work across several files with DeepSeek V4 Pro or V4 Flash, including a separate check of the target files before editing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hmbown/codewhale/v4-best-practices
About the project

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.

Hmbown/CodeWhale · 40,914 stars · on GitHub · codewhale.net

Install

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.

Any agent
npx skills add Hmbown/CodeWhale --skill v4-best-practices
Clone the repo
git clone --depth 1 https://github.com/Hmbown/CodeWhale

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 v4-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/hmbown/codewhale/v4-best-practices.svg)](https://agentmods.dev/skills/hmbown/codewhale/v4-best-practices)
Your own site
<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>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 416 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. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00051 $0.00416
Opus 5 $0.00026 $0.00208
Sonnet 5 $0.00010 $0.00083
Haiku 4.5 $0.00005 $0.00042

Measured 8d ago against content hash cca76c3e9882, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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.

crates/tui/assets/skills/v4-best-practices/SKILL.md · 51 lines

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.

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. 8d ago First seen · 51 lines · 51 tokens per session scan A cca76c3e9882

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories