Learn · Permissions, hooks & security · CCAR-F

Permission rules and modes

Deny, then ask, then allow: how Claude Code decides whether a tool call runs, the rule syntax, and which permission mode fits which job.

Key ideas

Worked example: Allow everything in a folder except secrets

Allow Read broadly and deny the sensitive paths. Because deny is checked first, the .env and secrets rules hold even though Read is allowed.

Exam traps

Official docs

Practise CCAR-F questions · Next lesson: Hooks: events, matchers and exit codes