Module 2: Getting Started with Claude CodeLesson 4 of 6
0%
Lesson 4ยท4 min

Understanding Permissions

Learn how Claude Code keeps you in control

Understanding Permissions

Claude Code can do a lot - read files, write code, run commands. But YOU are always in control.

The Permission System

Every action Claude takes requires your approval:

Terminal
Claude: I need to create these files:
๐Ÿ“„ Create: src/App.js
๐Ÿ“„ Create: src/styles.css
Allow? [Y/n/e]
โ–Œ
OptionMeaning
Y or yYes, proceed
nNo, cancel
eEdit - modify before running

Tip

Pressing Enter without typing anything usually means "Yes" (the capital Y indicates the default).

Types of Permissions

File Operations

Terminal
Claude: I'll make these changes:
๐Ÿ“„ Edit: package.json (add dependencies)
๐Ÿ“„ Create: src/utils/api.js
๐Ÿ—‘๏ธ Delete: src/old-file.js
Allow? [Y/n]
โ–Œ

Running Commands

Terminal
Claude: I need to run:
$ npm install axios lodash
This will install packages. Allow? [Y/n]
โ–Œ

Sensitive Operations

Claude is extra careful with:

Warning

- Deleting files - Running shell commands - Installing packages - Accessing system files
Terminal
Claude: โš ๏ธ This command will delete files:
$ rm -rf node_modules
Are you sure? [y/N]
โ–Œ

Notice the N is capitalised - Claude defaults to "No" for risky actions.

Auto-Accept Mode

For experienced users, you can reduce prompts:

Terminal
$ claude --auto-accept files
# Automatically accepts file changes, still asks for commands
โ–Œ

Warning

Only use auto-accept when you trust the task and understand what Claude is doing. Not recommended for beginners!

Reviewing Changes

Before accepting, you can ask Claude:

Terminal
> What changes will this make to my existing code?
> Show me a diff of the changes
> Explain why you're deleting that file
โ–Œ

The Safety Net

Claude Code has guardrails:

  1. Can't access files outside your project without explicit paths
  2. Won't run dangerous commands without clear warnings
  3. Asks twice for destructive operations
  4. Logs everything so you can review

Aussie Note

Think of it like a contractor asking before renovating your house. "Righto mate, gonna knock down this wall - that alright?" ๐Ÿ—๏ธ

Best Practices

  1. โœ… Read what Claude is about to do
  2. โœ… Ask questions if unsure
  3. โœ… Start with small changes
  4. โœ… Use git to track changes
  5. โœ… Don't auto-accept until comfortable

Key Takeaways

  • You approve every file change and command
  • Risky operations default to "No"
  • Review changes before accepting
  • Auto-accept is optional and for experienced users
  • Claude explains what it's doing if you ask