A community Agent skill that defines three executable rules for multi-step tasks in V4 thinking mode—verify before citing, dispatch a flash sub-agent for verification before executing across multiple files, and require path:line in plan output—each mapped to an observable failure class.
Good fit: Multi-file, multi-step coding planning and execution with V4-Pro; preventing edits to nonexistent paths, hallucinated symbols, and execution failures caused by vague plans; Agent environments with grep/read tools.
Poor fit: Small single-file changes and simple Q&A that do not require a plan; environments without file search/read tools (rules 1 and 3 depend on grep_files/read_file); pure-generation scenarios with thinking disabled.
Applicable model version: deepseek-v4-pro (primary model), deepseek-v4-flash (verification sub-agent, with thinking disabled).
Applicable client, Agent, or API: Agent frameworks that support sub-agents and tool calls; the original example uses agent syntax similar to Claude Code/CodeWhale.
Recommended reasoning tier and parameters: Enable thinking for the primary model; use flash with thinking disabled for the sub-agent to perform low-cost verification.
Full rule text (original, verified word for word at collection):
## 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.Trigger condition: Enable this skill when the model is in thinking mode and the task is multi-step or plan-driven.
Before writing code or a plan, verify every referenced path, function, or type with grep_files or read_file (rule 1).
When a plan involves 3 or more files, first dispatch a deepseek-v4-flash verifier sub-agent with thinking disabled to confirm each assumption and report mismatches (rule 2).
Always use verified path:line references in plan output; prohibit vague location descriptions (rule 3).
Verify again after execution: check whether edits landed in the target files/lines and whether any symbols were hallucinated; if there is a failure, identify the failure class using the rules and correct it.
The complete SKILL.md is approximately 1.7 KB and contains only the three rules above; each rule includes its own Bad/Good example and a “Failure avoided” explanation.
The file frontmatter states the applicability condition: “Use when working with deepseek-v4-pro or deepseek-v4-flash in thinking mode on multi-step or plan-driven tasks”.
The project is an open-source repository, and this file is a built-in skill asset; it includes no benchmark or empirical results, so the effects of the rules require independent validation.
This is a skill embedded in a community project, not an official DeepSeek resource; the grep_files/edit_file/agent type= syntax follows the project's conventions and must be adapted when migrated to other Agent environments.
The rules are designed for failures in multi-step, plan-driven tasks and do not cover conversation quality, creativity, or single-file tasks.
No success-rate data from real projects has been published for these rules; the three rules are empirical constraints, not statistically validated evaluation findings.
The file states: “Rules for multi-step V4 thinking-mode workflows. Each rule prevents a specific, observable failure class.”
DeepSeek V4 Pro