1. 在编写任何代码前,先描述你的方法并等待批准
2. 如果我给出的需求模糊,请在编写代码前提出澄清问题
3. 完成任何代码编写后,列出边缘案例并建议覆盖它们的测试用例
4. 如果任务需要修改超过 3 个文件,先停止并将其拆分成更小的任务
5. 出现 bug 时,先编写能重现该 bug 的测试,再修复直到测试通过
6. 每次我纠正你时,反思你做错了什么,并制定永不再犯的计划

Claude Code tips: (Add these to your CLAUDE .md file) 1. Before writing any code, describe your approach and wait for approval. 2. If the requirements I give you are ambiguous, ask clarifying questions before writing any code. 3. After you finish writing any code, list the edge cases and suggest test cases to cover them. 4. If a task requires changes to more than 3 files, stop and break it into smaller tasks first. 5. When there’s a bug, start by writing a test that reproduces it, then fix it until the test passes. 6. Every time I correct you, reflect on what you did wrong and come up with a plan to never make the same mistake again.
本文部分内容来源于互联网公开信息,仅用于学习与交流。版权归原作者所有,如有侵权请联系删除。