跳到正文
Skillpedia
智能体41k · #6559

v4-best-practices

它能做什么

这个技能为智能体提供在使用 DeepSeek V4 模型进行长时间、多步骤工作时的一套规则。适合在计划任务中运行这些模型、希望减少错误的人。

适用场景

  • ✓当你要求智能体执行一项会改动多个文件的计划的时候。
  • ✓当你希望智能体在编写代码前再次核对文件名和函数的时候。
  • ✓当你希望计划输出指向代码中确切位置的时候。

技能链接

https://github.com/codewhale-hq/Codewhale/blob/main/crates/skills/assets/skills/v4-best-practices/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/codewhale-hq/Codewhale/blob/main/crates/skills/assets/skills/v4-best-practices/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“在我改动多个文件之前,请先检查每个文件路径和函数是否存在,然后给我计划?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会搜索项目,在使用每个文件和函数前确认其存在。对于较大的计划,它可以请另一个助手智能体先验证这些假设。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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/engine/src/client.rs:187"

Failure avoided: agent-mode execution cannot locate the intended edit target when plan directions are imprecise.

常见问题

它适用于任何 AI 模型吗?

不适用。技能是为 DeepSeek V4 Pro 和 Flash 模型在思考模式下编写的。

为什么要先检查文件名?

技能说明,如果路径或函数是凭记忆猜测的,编辑就会失败,因此要求智能体先确认。

计划的步骤是什么样子的?

技能要求用确切的文件和行号引用,代替含糊的描述。

详情

作者的原始描述

Use when working with deepseek-v4-pro or deepseek-v4-flash in thinking mode on multi-step or plan-driven tasks. Provides rules to prevent stale references, unverified plan assumptions, and vague plan output.

repo: codewhale-hq/Codewhale

热度

GitHub 星标
41k
排名
#6559
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能