Skip to content

update-config — Configuration Management

  • Trigger: /update-config or keywords "configure", "settings", "permissions", "allow", "env vars"
  • Best for: Modifying settings.json, configuring permissions, setting env vars, managing hooks
  • Not for: Code logic changes, editing Skill content

Overview

update-config manages Claude Code's configuration system. It handles:

  • Permissions — Allow/deny specific tools and commands
  • Hooks — Automated behavior triggers
  • Environment variables — Runtime variable settings
  • Preferences — Theme, model, and other settings

Trigger Conditions

update-config auto-triggers when you:

  • Mention "configure", "settings", "permissions"
  • Need to modify settings.json
  • Use the /update-config command

Examples

Example 1: Add Command Permission

/update-config Allow automatically running npm install and npm test commands

Example 2: Set Environment Variables

/update-config Set DEBUG=true and API_BASE_URL=https://api.example.com

Example 3: Configure a Hook

/update-config Run git status automatically at the start of each conversation

Example 4: Move Permission Scope

/update-config Move Bash tool permissions from project-level to global settings

Example 5: Troubleshoot Permissions

/update-config Why does npm publish always require confirmation? Help me check hook configs

Configuration Levels

LevelLocationScope
User~/.claude/settings.jsonAll projects
Project.claude/settings.jsonCurrent project
Local.claude/settings.local.jsonLocal override (not committed)

Notes

  • Project-level config takes priority over user-level
  • settings.local.json should be in .gitignore — never commit
  • Hook scripts run outside Claude Code's process — mind security
  • Use least-privilege principle for permissions
  • Don't store secrets and tokens in env vars — use system key management