double-check-code
双重验证技能(代码版) / Double-Check Skill (Code Edition)
本技能适用于修改代码后需要确保质量的场景。核心要求:每次修改后,必须连续执行两次验证(如测试、编译、代码检查),且两次均无错误,才能结束任务;否则继续修正并重新验证。
📌 适用场景 / Applicable Scenarios
- 修复 Bug 后运行测试用例。
- 添加新功能后确保原有测试通过。
- 重构代码后检查编译/类型错误。
- 调整代码风格后验证 lint 规则。
- 任何代码修改后需要保证正确性的任务。
🧠 核心原则 / Core Principles
- 修改 → 验证 → 修正 → 再验证:任何代码修改都必须经过验证环节。
- 两次连续成功:必须连续两次验证均无错误,才能视为最终成功。
- 独立验证:两次验证应是独立执行的(例如间隔几秒,或使用不同验证方式),避免偶然因素(如缓存、随机失败)。
- 验证方式应与项目匹配:根据项目类型选择合适的验证命令(测试、构建、lint 等)。
- 清晰报告:每次验证后向用户报告结果(成功/失败,错误详情)。
More from belugarex/my-skills
answer-framework
Build clear, evidence-based, natural-sounding answers for explanation, comparison, opinion, and decision-support requests. Use when the user asks a question that requires reasoning, structured analysis, or bilingual Chinese-English communication rather than direct file edits or command execution.
8double-check
Enforce two consecutive validations after file changes such as code edits, refactors, deletions, documentation updates, or configuration changes. Use when the task modifies files and the agent should verify correctness before finishing.
3always-ask-next
Ask the user what to do next before ending a completed task, and offer 3 context-aware follow-up suggestions plus a freeform option. Use when the workflow could naturally continue and you want the agent to avoid stopping too early.
2