Skip to content
BENIBIX Learn

Protected Paths

AI⌨️ Claude CodeClaude Code Concepts

Also known as Protected directories, Claude Code protected paths

Folders like .git and .claude that get an extra check.

Think of it like

It is like the room in a house where the fuse box is. Nobody goes in without asking.

Example

During a big refactor in accept edits mode, Claude wants to change a git hook in .husky. Claude Code stops and asks Emma, even though edits are on.

Why it matters

A slip in these folders can break git or change Claude's own rules. So they get a second look.

Definition

Protected paths are a few folders that hold your repository's state or Claude's own setup. They include .git, .vscode, .idea, .husky and most of .claude. Writing to them gets an extra check in every mode. Manual and accept edits mode ask you first, auto mode sends the write to its checker, and don't ask mode turns it down. An allow rule in your settings does not skip this check.
A lock on the folders that hold git and Claude's setup.

Common mistake

Adding an allow rule to skip the prompt. The check runs before allow rules, so the rule has no effect.

Key takeaways

  1. 1
    A short list. .git, .claude and more.
  2. 2
    Extra check. In every mode.
  3. 3
    Allow rules skip nothing. The check runs first.

Learn it properly