V2EX User Shares Claude Coding Tips and a Detailed CLAUDE.md Project Constitution
English summary
A developer on V2EX posted five practical tips for using Claude in software development, including establishing a CLAUDE.md file as a project constitution that sets thinking and action rules, maintaining a separate file for project pitfalls, cross-document auditing with Claude, using Codex for adversarial code reviews, and designing frontend systems via claude.ai/design for style consistency. The post includes the full content of the user's CLAUDE.md, which contains nine concrete principles organized into Thinking, Action, Audit, and Communication sections, emphasizing first-principles reasoning, extreme quality, reading before modifying, mandatory self-audits, and direct communication without flattery. The CLAUDE.md explicitly takes precedence over any conversational instructions.
Chinese summary
V2EX 上一位开发者分享了使用 Claude 编程的五条实用技巧:创建 CLAUDE.md 文件作为项目宪章来规定思考和行动规则;单独保存项目记忆文件记录踩过的坑;用 Claude 进行跨文档审计;让 Codex 做对抗性审查;在 claude.ai/design 先完成设计系统以保持前端风格统一。帖子附带了该用户完整的 CLAUDE.md 内容,包含九条具体原则,分为思维、行动、审计和沟通几个部分,强调第一性原理、极致而非能跑、不确定就停、先读再写、先计划再动手、完成即自审、不讨好不编造等,并明确其优先级高于对话中的临时指令。
Key points
A CLAUDE.md file acts as a project constitution, setting rules for how Claude should think and act, with priority over conversational instructions.
CLAUDE.md 文件作为项目宪章,设定 Claude 的思考和行动规则,优先级高于对话临时指令。
Maintain a separate project memory file to record pitfalls and lessons learned, helping the AI avoid repeated mistakes.
单独维护项目记忆文件记录踩过的坑,帮助 AI 避免重复错误。
Use cross-document auditing with Claude and adversarial reviews with Codex (telling Claude it will be audited by GPT) to improve code quality.
用 Claude 做跨文档审计,并让 Codex 进行对抗性审查(告知 Claude 将由 GPT 审计),从而提升代码质量。
Design frontend systems at claude.ai/design first to ensure whole-site style consistency.
先在 claude.ai/design 完成设计系统,确保整站风格统一。
The CLAUDE.md details 9 principles: first-principles thinking, extreme quality, stopping on uncertainty, reading before modifying, planning before acting, no fabrication, mandatory self-audits after each phase, and honest communication.
CLAUDE.md 列出九条原则:第一性原理、极致而非能跑、不确定就停、先读再写、先计划再动手、不编造、每阶段结束强制自审、以及诚实沟通。