# Protected Paths

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** Protected directories, Claude Code protected paths

## Think of it like

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

## 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.

## 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.

## Common mistake

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

## Three principles

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

## Related terms

- [Permission Mode](https://learn.benibix.com/term/ai/permission-mode)
- [Permission Rule](https://learn.benibix.com/term/ai/permission-rule)
- [Git](https://learn.benibix.com/term/development/git)

## Taught in

- [Permission Rules and Sandbox](https://learn.benibix.com/learn/ai-claude-code/permission-rules-and-sandbox): Claude Code, 6/16

![Folders such as .git, .vscode and .claude sit behind a lock, so writing to them needs an extra check.](https://learn.benibix.com/diagrams/cc-protected-paths.svg)

---

Source: https://learn.benibix.com/term/ai/protected-paths
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
