Why This Matters#

In the previous lesson, we learned to give Claude instructions through CLAUDE.md. But Claude Code has another powerful way of control — settings files. They control not what Claude does, but how it works: which tools it can use, which commands to run, which restrictions to follow.

If CLAUDE.md is the “code of conduct,” then settings are the “security policy and technical parameters.”

What is settings.json#

settings.json is a file in JSON format that stores Claude Code’s technical settings.

💡 JSON (pronounced “jay-son”) is a data format similar to a list. Data is written in curly braces {}, and each setting is a “name: value” pair.

Example:

{
  "permissions": {
    "allow": ["Read files", "Write files"],
    "deny": ["Delete files"]
  }
}

This is like saying: “I allow reading and creating files, but deleting — not allowed.”

Settings Levels#

Like CLAUDE.md, settings exist at several levels. Here they are from broadest to narrowest:

Level File Location For Whom Can Be Overridden?
Managed System folder All computer users No, highest priority
User ~/.claude/settings.json You, across all projects Yes, by narrower ones
Project .claude/settings.json The entire project team Yes, by local ones
Local .claude/settings.local.json Only you, in this project Yes, only by managed

💡 Simple rule: the narrower the scope, the higher the priority. Local settings “win” over project settings, project over user settings.

How to Open Settings#

The simplest way — use the command inside Claude Code:

/config

The settings interface opens, where you can view and change everything.

Step-by-Step: Configuring Permissions#

Step 1. Create the Settings Folder#

In your project root, create a .claude folder (with a dot at the beginning):

mkdir .claude

Step 2. Create the Settings File#

Create the file .claude/settings.json:

{
  "permissions": {
    "allow": [
      "Read",
      "Edit",
      "Bash(npm test)",
      "Bash(npm run build)"
    ],
    "deny": [
      "Bash(rm *)"
    ]
  }
}

What we did here:

  • Allowed Claude to read and edit files
  • Allowed running tests and builds
  • Blocked deleting files with the rm command

Step 3. Personal Settings#

Create the file ~/.claude/settings.json for your personal preferences:

{
  "preferences": {
    "theme": "dark",
    "language": "en"
  }
}

Settings Examples#

Safe Mode for Beginners#

{
  "permissions": {
    "allow": [
      "Read"
    ],
    "deny": [
      "Bash",
      "Edit"
    ]
  }
}

Claude can only read files — it won’t change or run anything. Handy when you’re just exploring a project.

Working Mode for Development#

{
  "permissions": {
    "allow": [
      "Read",
      "Edit",
      "Bash(npm *)",
      "Bash(git status)",
      "Bash(git diff)"
    ]
  }
}

Claude can read, edit, run npm commands, and check Git status.

What Can Be Configured#

Setting What It Does Example
permissions.allow List of allowed actions ["Read", "Edit"]
permissions.deny List of denied actions ["Bash(rm *)"]
env Environment variables {"NODE_ENV": "development"}

Difference Between CLAUDE.md and settings.json#

CLAUDE.md settings.json
Format Free-form text Strict JSON
Stores Instructions, rules, context Permissions, technical parameters
Read by Claude (as recommendations) Claude Code system (as strict rules)
Can be violated? Claude may deviate from recommendations No, the system strictly follows them

Tips#

  • ✅ Start with user settings — they work everywhere
  • ✅ For team work, use project settings (.claude/settings.json)
  • ✅ Local settings (.local.json) don’t go into Git — use them for personal experiments
  • ⚠️ Be careful with permissions: it’s better to start with the minimum and add as needed

Lesson Summary#

  • settings.json controls Claude Code’s technical parameters: permissions, environment, behavior
  • There are 4 levels of settings: managed → user → project → local
  • Narrower settings have higher priority
  • The /config command opens a convenient settings interface
  • settings.json contains strict rules (the system won’t break them), CLAUDE.md contains recommendations (Claude can adapt)