Skip to content
DEV Community · AI· kargathara Aakash·· 6d agoAI Score67

How to Move Claude Code Rules from CLAUDE.md to settings.json

Move the NEVER lines out of your CLAUDE.md and into settings.json (and make your hooks exit 2)

AI Takeaway

The guide moves enforceable Claude Code rules into settings.json and uses hook exit code 2 to block certain actions. It covers permission rules, sandbox limits and user-level autoMode settings; /doctor prompt-audit requires Claude Code v2.1.283 or later.

Source: DEV Community · AI · dev.to