Global development rules for Claude Code. These rules enforce disciplined, traceable, and reliable AI-assisted development across all projects.
Linux / macOS:
git clone https://github.com/YOUR_USERNAME/claude-rules.git ~/repos/claude-rules
cd ~/repos/claude-rules
chmod +x install.sh
./install.shWindows (PowerShell):
git clone https://github.com/YOUR_USERNAME/claude-rules.git $env:USERPROFILE\repos\claude-rules
cd $env:USERPROFILE\repos\claude-rules
.\install.ps1Installs a global CLAUDE.md to ~/.claude/CLAUDE.md that applies to every Claude Code session on this machine. It enforces 10 hard rules:
- Query, Never Assume - Verify external system behavior with tools before writing code
- Persist Every Solution - Document every solved problem in
docs/known-issues.md - Trace Every Operation - Structured logging with pipeline tracing
- Verify After State Changes - Read back after write, confirm after deploy
- Degrade Gracefully - Graduated responses, no binary kill switches
- Source of Truth Hierarchy - Define and respect authoritative data sources
- Plan Before Code - Write a plan for tasks >30 minutes
- Test the Boundary - Integration tests over mocks, behavior over implementation
- One Change, One Commit - Clean git history with clear messages
- Respect the User's Time - Be direct, don't pad, don't repeat
Copy these to new projects:
templates/known-issues.md→docs/known-issues.mdin your projecttemplates/project-claude.md→CLAUDE.mdin your project root (customize per project)
Claude Code reads ~/.claude/CLAUDE.md at the start of every session. These instructions are treated as hard rules that override default behavior. Project-level CLAUDE.md files supplement (don't replace) the global rules.
cd ~/repos/claude-rules
git pullThe symlink means changes take effect immediately on Linux/macOS. On Windows, re-run install.ps1 after pulling.