Claude Code के लिए CLAUDE.md: जाँच योग्य rules

छोटे project rules लिखें जिनमें scope, निषेध, verification commands और secrets की सीमा स्पष्ट हो।

लंबी preference list Claude Code को predictable नहीं बनाती। उपयोगी rule बताता है कि क्या बदलना है, सीमा क्या है और प्रमाण क्या होगा: file, diff, command और exit code।

छोटा contract

# Project rules

Goal

  • Keep changes limited to the requested feature.

Checks

  • Run npm test and report command, exit code, and changed files.

Forbidden

  • Do not read .env or run deploy.

Scope

  • packages/payments/CLAUDE.md wins only inside that directory.
  • Root security rules always apply.
“अच्छा code लिखो” जाँच योग्य नहीं है। “`npm test` चलाकर command, exit code और changed paths बताओ” जाँच योग्य है।

Secrets और conflicts

CLAUDE.md में API Key, CI token या वास्तविक personal data न रखें। Placeholder उपयोग करें और जरूरी values environment या CI secret store से दें। सामान्य rules root में और package rules package के पास रखें। Local exception global security rule को रद्द नहीं कर सकती।

Reversible test

  1. एक test file में केवल local variable rename कराएँ।
  2. git diff --check और git diff --stat देखें।
  3. Contract में लिखा test command चलाएँ।
  4. दूसरी file बदले या command और exit code न मिलें तो result reject करें।

अलग Claude Code API workflow के लिए Base URL और model BetterToken documentation में जाँचें।

अपना LLM वर्कफ़्लो बेहतर बनाना चाहते हैं?

एक API से मॉडल जोड़ें, कुंजियाँ प्रबंधित करें और AI खर्च नियंत्रित करें।