Skip to main content

Settings Components

Settings are configuration presets that customize Claude Code’s behavior, integrations, and workflow. They configure everything from model selection to status line displays.

Browse All Settings

Explore 60+ settings at aitmpl.com

Installation

# Install a single setting
npx claude-code-templates@latest --setting read-only-mode

# Install multiple settings
npx claude-code-templates@latest --setting read-only-mode --setting git/auto-commit

# Install from specific category
npx claude-code-templates@latest --setting mcp/enable-all-project-servers

Setting Categories

MCP Settings

Configure Model Context Protocol servers:

Enable All Project Servers

Enable all MCP servers defined in the project
npx claude-code-templates@latest --setting mcp/enable-all-project-servers

Enable Specific Servers

Enable only selected MCP servers
npx claude-code-templates@latest --setting mcp/enable-specific-servers

Disable Risky Servers

Disable MCP servers with dangerous capabilities
npx claude-code-templates@latest --setting mcp/disable-risky-servers

MCP Timeouts

Configure timeout settings for MCP servers
npx claude-code-templates@latest --setting mcp/mcp-timeouts

Settings Configuration

Settings are stored in .claude/settings/ and .claude/config/:
{
  "name": "read-only-mode",
  "description": "Restrict Claude to read-only operations",
  "config": {
    "permissions": {
      "allowWrite": false,
      "allowBash": false,
      "allowGit": false
    }
  }
}

Statusline with Python

Custom statuslines can use Python scripts:
# .claude/scripts/git-status.py
import subprocess

def get_git_status():
    branch = subprocess.check_output(['git', 'branch', '--show-current'])
    status = subprocess.check_output(['git', 'status', '--short'])
    return f"{branch.strip()} | {len(status.splitlines())} changes"

print(get_git_status())

Setting Priorities

Settings are applied in order:
  1. Global settings: System-wide defaults
  2. Project settings: Project-specific configs
  3. User settings: User overrides
  4. Runtime settings: Temporary overrides

Example Usage

# Enable read-only mode for safety
npx claude-code-templates@latest --setting read-only-mode

# Claude can now only read files, not modify them
# To disable, remove .claude/settings/read-only-mode.json

Combining Settings

Install multiple related settings:
# Security-focused configuration
npx claude-code-templates@latest \
  --setting permissions/read-only-mode \
  --setting mcp/disable-risky-servers \
  --setting git/branch-protection

Temporary Settings

Some settings can be overridden temporarily:
# In Claude Code, use environment variables
export CLAUDE_ALLOW_WRITE=true

Next Steps