Chuyển đến nội dung
Skillpedia
Agent41k · #6559

v4-best-practices

Skill này làm gì

Skill này đưa cho agent AI một bộ quy tắc cho công việc dài nhiều bước khi dùng mô hình DeepSeek V4. Skill dành cho người chạy các mô hình này trên tác vụ có kế hoạch và muốn ít lỗi hơn.

Khi nào nên dùng

  • ✓Khi bạn yêu cầu agent thực hiện một kế hoạch thay đổi nhiều tệp.
  • ✓Khi bạn muốn agent kiểm tra lại tên tệp và hàm trước khi viết mã.
  • ✓Khi bạn muốn đầu ra kế hoạch trỏ đến vị trí chính xác trong mã.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/codewhale-hq/Codewhale/blob/main/crates/skills/assets/skills/v4-best-practices/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Trước khi tôi thay đổi nhiều tệp, hãy kiểm tra xem mỗi đường dẫn tệp và hàm có tồn tại không, rồi đưa tôi kế hoạch.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent tìm trong dự án để xác nhận mỗi tệp và hàm có tồn tại trước khi dùng. Với các kế hoạch lớn hơn, nó có thể nhờ một agent trợ lý thứ hai kiểm tra các giả định trước.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.

Câu hỏi thường gặp

Điều này có dùng được với mọi mô hình AI không?

Không. Skill được viết cho các mô hình DeepSeek V4 Pro và Flash ở chế độ suy nghĩ.

Vì sao phải kiểm tra tên tệp trước?

Skill nói các chỉnh sửa thất bại khi đường dẫn hoặc hàm được đoán từ trí nhớ, nên nó yêu cầu xác nhận trước.

Các bước kế hoạch trông như thế nào?

Skill yêu cầu tham chiếu chính xác đến tệp và dòng thay vì mô tả mơ hồ.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#6559
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự