Imported from SaiVatsal/Skill-I-Use (
system_prompts_leaks-main/Anthropic/claude-code/skills/update-config/SKILL.md). Install upstream withnpx skills add SaiVatsal/Skill-I-Use --skill update-config. Copyright stays with the author.
Update Config Skill
Modify Claude Code configuration by updating settings.json files.
When Hooks Are Required (Not Memory)
If the user wants something to happen automatically in response to an EVENT, they need a hook configured in settings.json. Memory/preferences cannot trigger automated actions.
These require hooks:
- "Before compacting, ask me what to preserve" → PreCompact hook
- "After writing files, run prettier" → PostToolUse hook with Write|Edit matcher
- "When I run bash commands, log them" → PreToolUse hook with Bash matcher
- "Always run tests after code changes" → PostToolUse hook
Hook events: PreToolUse, PostToolUse, PreCompact, PostCompact, Stop, Notification, SessionStart
CRITICAL: Read Before Write
Always read the existing settings file before making changes. Merge new settings with existing ones - never replace the entire file.
CRITICAL: Use AskUserQuestion for Ambiguity
When the user's request is ambiguous, use AskUserQuestion to clarify:
- Which settings file to modify (user/project/local)
- Whether to add to existing arrays or replace them
- Specific values when multiple options exist
Decision: /config command vs Direct Edit
Suggest the /config slash command for these simple settings:
theme,editorMode,verbose,modellanguage,alwaysThinkingEnabledpermissions.defaultMode
Edit settings.json directly for:
- Hooks (PreToolUse, PostToolUse, etc.)
- Complex permission rules (allow/deny arrays)
- Environment variables
- MCP server configuration
- Plugin configuration
Workflow
- Clarify intent - Ask if the request is ambiguous
- Read existing file - Use Read tool on the target settings file
- Merge carefully - Preserve existing settings, especially arrays
- Edit file - Use Edit tool (if file doesn't exist, ask user to create it first)
- Confirm - Tell user what was changed
Merging Arrays (Important!)
When adding to permission arrays or hook arrays, merge with existing, don't replace:
WRONG (replaces existing permissions):
{ "permissions": { "allow": ["Bash(npm *)"] } }
RIGHT (preserves existing + adds new):
{
"permissions": {
"allow": [
"Bash(git *)", // existing
"Edit(.claude)", // existing
"Bash(npm *)" // new
]
}
}
Settings File Locations
Choose the appropriate file based on scope:
| File | Scope | Git | Use For |
|---|---|---|---|
~/.claude/settings.json |
Global | N/A | Personal preferences for all projects |
.claude/settings.json |
Project | Commit | Team-wide hooks, permissions, plugins |
.claude/settings.local.json |
Project | Gitignore | Personal overrides for this project |
Settings load in order: user → project → local (later overrides earlier).
Settings Schema Reference
Permissions
{
"permissions": {
"allow": ["Bash(npm *)", "Edit(.claude)", "Read"],
"deny": ["Bash(rm -rf *)"],
"ask": ["Edit(//etc/*)"],
"defaultMode": "default" | "plan" | "acceptEdits" | "dontAsk",
"additionalDirectories": ["/extra/dir"]
}
}
Permission Rule Syntax:
- Exact match:
"Bash(npm run test)" - Prefix wildcard:
"Bash(git *)"- matchesgit,git status,git commit, etc. - Tool only:
"Read"- allows all Read operations
Environment Variables
{
"env": {
"DEBUG": "true",
"MY_API_KEY": "value"
}
}
Model & Agent
{
"model": "sonnet", // or "fable", "opus", "haiku", full model ID
"agent": "agent-name",
"alwaysThinkingEnabled": true
}
Attribution (Commits & PRs)
{
"attribution": {
"commit": "Custom commit trailer text",
"pr": "Custom PR description text"
}
}
Set commit or pr to empty string "" to hide that attribution.
MCP Server Management
{
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": ["server1", "server2"],
"disabledMcpjsonServers": ["blocked-server"]
}
Plugins
{
"enabledPlugins": {
"formatter@anthropic-tools": true
}
}
Plugin syntax: plugin-name@source where source is claude-code-marketplace, claude-plugins-official, or builtin.
Other Settings
language: Preferred response language (e.g., "japanese")cleanupPeriodDays: Days to keep transcripts before automatic cleanup (default: 30; minimum 1)respectGitignore: Whether to respect .gitignore (default: true)spinnerTipsEnabled: Show tips in spinnertimeFormat: Clock format for times shown in the UI: "auto" (default), "12-hour", "24-hour", "24-hour-utc", or a strftime pattern such as "%H:%M"timeZone: IANA time zone for times shown in the UI, e.g. "UTC" (default: system time zone)spinnerVerbs: Customize spinner verbs ({ "mode": "append" | "replace", "verbs": [...] })spinnerTipsOverride: Override spinner tips ({ "excludeDefault": true, "tips": ["Custom tip"] })syntaxHighlightingDisabled: Disable diff highlighting
Hooks Configuration
Hooks run commands at specific points in Claude Code's lifecycle.
Hook Structure
{
"hooks": {
"EVENT_NAME": [
{
"matcher": "ToolName|OtherTool",
"hooks": [
{
"type": "command",
"command": "your-command-here",
"timeout": 60,
"statusMessage": "Running..."
}
]
}
]
}
}
Hook Events
| Event | Matcher | Purpose |
|---|---|---|
| PermissionRequest | Tool name | Run before permission prompt |
| PreToolUse | Tool name | Run before tool, can block |
| PostToolUse | Tool name | Run after successful tool |
| PostToolUseFailure | Tool name | Run after tool fails |
| Notification | Notification type | Run on notifications |
| Stop | - | Run when Claude stops (including clear, resume, compact) |
| PreCompact | "manual"/"auto" | Before compaction |
| PostCompact | "manual"/"auto" | After compaction (receives summary) |
| UserPromptSubmit | - | When user submits |
| SessionStart | - | When session starts |
Common tool matchers: Bash, Write, Edit, Read, Glob, Grep
Hook Types
1. Command Hook - Runs a shell command:
{ "type": "command", "command": "prettier --write $FILE", "timeout": 30 }
2. Prompt Hook - Evaluates a condition with LLM:
{ "type": "prompt", "prompt": "Is this safe? $ARGUMENTS" }
Only available for tool events: PreToolUse, PostToolUse, PermissionRequest.
3. Agent Hook - Runs an agent with tools:
{ "type": "agent", "prompt": "Verify tests pass: $ARGUMENTS" }
Only available for tool events: PreToolUse, PostToolUse, PermissionRequest.
Hook Input (stdin JSON)
{
"session_id": "abc123",
"tool_name": "Write",
"tool_input": { "file_path": "/path/to/file.txt", "content": "..." },
"tool_response": { "success": true } // PostToolUse only
}
Hook JSON Output
Hooks can return JSON to control behavior:
{
"systemMessage": "Warning shown to user in UI",
"continue": false,
"stopReason": "Message shown when blocking",
"suppressOutput": false,
"decision": "block",
"reason": "Explanation for decision",
"hookSpecificOutput": {
"hookEventName": "PostToolUse",
"additionalContext": "Context injected back to model"
}
}
Fields:
systemMessage- Display a message to the user (all hooks)continue- Set tofalseto block/stop (default: true)stopReason- Message shown whencontinueis falsesuppressOutput- Hide stdout from transcript (default: false)decision- "block" for PostToolUse/Stop/UserPromptSubmit hooks (deprecated for PreToolUse, use hookSpecificOutput.permissionDecision instead)reason- Explanation for decisionhookSpecificOutput- Event-specific output (must includehookEventName):additionalContext- Text injected into model contextpermissionDecision- "allow", "deny", or "ask" (PreToolUse only)permissionDecisionReason- Reason for the permission decision (PreToolUse only)updatedInput- Modified tool input (PreToolUse only)
Common Patterns
Auto-format after writes:
{
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "jq -r '.tool_response.filePath // .tool_input.file_path' | { read -r f; prettier --write \"$f\"; } 2>/dev/null || true"
}]
}]
}
}
Log all bash commands:
{
"hooks": {
"PreToolUse": [{
"matcher": "Bash",
"hooks": [{
"type": "command",
"command": "jq -r '.tool_input.command' >> ~/.claude/bash-log.txt"
}]
}]
}
}
Stop hook that displays message to user:
Command must output JSON with systemMessage field:
# Example command that outputs: {"systemMessage": "Session complete!"}
echo '{"systemMessage": "Session complete!"}'
Run tests after code changes:
{
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "jq -r '.tool_input.file_path // .tool_response.filePath' | grep -E '\\.(ts|js)$' && npm test || true"
}]
}]
}
}
Constructing a Hook (with verification)
Given an event, matcher, target file, and desired behavior, follow this flow. Each step catches a different failure class — a hook that silently does nothing is worse than no hook.
-
Dedup check. Read the target file. If a hook already exists on the same event+matcher, show the existing command and ask: keep it, replace it, or add alongside.
-
Construct the command for THIS project — don't assume. The hook receives JSON on stdin. Build a command that:
- Extracts any needed payload safely — use
jq -rinto a quoted variable or{ read -r f; ... "$f"; }, NOT unquoted| xargs(splits on spaces) - Invokes the underlying tool the way this project runs it (npx/bunx/yarn/pnpm? Makefile target? globally-installed?)
- Skips inputs the tool doesn't handle (formatters often have
--ignore-unknown; if not, guard by extension) - Stays RAW for now — no
|| true, no stderr suppression. You'll wrap it after the pipe-test passes.
- Extracts any needed payload safely — use
-
Pipe-test the raw command. Synthesize the stdin payload the hook will receive and pipe it directly:
Pre|PostToolUseonWrite|Edit:echo '{"tool_name":"Edit","tool_input":{"file_path":"<a real file from this repo>"}}' | <cmd>Pre|PostToolUseonBash:echo '{"tool_name":"Bash","tool_input":{"command":"ls"}}' | <cmd>Stop/UserPromptSubmit/SessionStart: most commands don't read stdin, soecho '{}' | <cmd>suffices
Check exit code AND side effect (file actually formatted, test actually ran). If it fails you get a real error — fix (wrong package manager? tool not installed? jq path wrong?) and retest. Once it works, wrap with
2>/dev/null || true(unless the user wants a blocking check). -
Write the JSON. Merge into the target file (schema shape in the "Hook Structure" section above). If this creates
.claude/settings.local.jsonfor the first time, add it to .gitignore — the Write tool doesn't auto-gitignore it. -
Validate syntax + schema in one shot:
jq -e '.hooks.<event>[] | select(.matcher == "<matcher>") | .hooks[] | select(.type == "command") | .command' <target-file>Exit 0 + prints your command = correct. Exit 4 = matcher doesn't match. Exit 5 = malformed JSON or wrong nesting. A broken settings.json silently disables ALL settings from that file — fix any pre-existing malformation too.
-
Prove the hook fires — only for
Pre|PostToolUseon a matcher you can trigger in-turn (Write|Editvia Edit,Bashvia Bash).Stop/UserPromptSubmit/SessionStartfire outside this turn — skip to step 7.For a formatter on
PostToolUse/Write|Edit: introduce a detectable violation via Edit (two consecutive blank lines, bad indentation, missing semicolon — something this formatter corrects; NOT trailing whitespace, Edit strips that before writing), re-read, confirm the hook fixed it. For anything else: temporarily prefix the command in settings.json withecho "$(date) hook fired" >> /tmp/claude-hook-check.txt;, trigger the matching tool (Edit forWrite|Edit, a harmlesstrueforBash), read the sentinel file.Always clean up — revert the violation, strip the sentinel prefix — whether the proof passed or failed.
If proof fails but pipe-test passed and
jq -epassed: the settings watcher isn't watching.claude/— it only watches directories that had a settings file when this session started. The hook is written correctly. Tell the user to open/hooksonce (reloads config) or restart — you can't do this yourself;/hooksis a user UI menu and opening it ends this turn. -
Handoff. Tell the user the hook is live (or needs
/hooks/restart per the watcher caveat). Point them at/hooksto review, edit, or disable it later. The UI only shows "Ran N hooks" if a hook errors or is slow — silent success is invisible by design.
Example Workflows
Adding a Hook
User: "Format my code after Claude writes it"
- Clarify: Which formatter? (prettier, gofmt, etc.)
- Read:
.claude/settings.json(or create if missing) - Merge: Add to existing hooks, don't replace
- Result:
{
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "jq -r '.tool_response.filePath // .tool_input.file_path' | { read -r f; prettier --write \"$f\"; } 2>/dev/null || true"
}]
}]
}
}
Adding Permissions
User: "Allow npm commands without prompting"
- Read: Existing permissions
- Merge: Add
Bash(npm *)to allow array - Result: Combined with existing allows
Environment Variables
User: "Set DEBUG=true"
- Decide: User settings (global) or project settings?
- Read: Target file
- Merge: Add to env object
{ "env": { "DEBUG": "true" } }
Common Mistakes to Avoid
- Replacing instead of merging - Always preserve existing settings
- Wrong file - Ask user if scope is unclear
- Invalid JSON - Validate syntax after changes
- Forgetting to read first - Always read before write
Troubleshooting Hooks
If a hook isn't running:
- Check the settings file - Read ~/.claude/settings.json or .claude/settings.json
- Verify JSON syntax - Invalid JSON silently fails
- Check the matcher - Does it match the tool name? (e.g., "Bash", "Write", "Edit")
- Check hook type - Is it "command", "prompt", or "agent"?
- Test the command - Run the hook command manually to see if it works
- Use --debug - Run
claude --debugto see hook execution logs
Full Settings JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"$schema": {
"description": "JSON Schema reference for Claude Code settings",
"type": "string"
},
"apiKeyHelper": {
"description": "Path to a script that outputs authentication values",
"type": "string"
},
"proxyAuthHelper": {
"description": "Shell command that outputs a Proxy-Authorization header value (EAP)",
"type": "string"
},
"awsCredentialExport": {
"description": "Path to a script that exports AWS credentials",
"type": "string"
},
"awsAuthRefresh": {
"description": "Path to a script that refreshes AWS authentication",
"type": "string"
},
"gcpAuthRefresh": {
"description": "Command to refresh GCP authentication (e.g., gcloud auth application-default login)",
"type": "string"
},
"processWrapper": {
"description": "Corporate launcher argv prefix for the background-agent supervisor, the sessions and workers it hosts, and the other covered background processes listed in the Claude Code corporate-launcher documentation. Equivalent to the CLAUDE_CODE_PROCESS_WRAPPER environment variable, which takes precedence when set. Honored from managed settings, a --settings/SDK-supplied settings file, and user settings, in that precedence order; project and local settings are ignored.",
"type": "string"
},
"policyHelper": {
"description": "Executable that computes managed settings at startup. Honored only from admin-controlled policy sources.",
"type": "object",
"properties": {
"path": {
"description": "Absolute path to the helper executable",
"type": "string"
},
"timeoutMs": {
"type": "integer",
"minimum": 1000,
"maximum": 9007199254740991
},
"refreshIntervalMs": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "integer",
"minimum": 60000,
"maximum": 9007199254740991
}
]
}
},
"required": [
"path"
]
},
"fileSuggestion": {
"description": "Custom file suggestion configuration for @ mentions",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "command"
},
"command": {
"type": "string"
}
},
"required": [
"type",
"command"
]
},
"respectGitignore": {
"description": "Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected.",
"type": "boolean"
},
"cleanupPeriodDays": {
"description": "Number of days to retain chat transcripts before automatic cleanup (default: 30). Minimum 1. Use a large value for long retention; use --no-session-persistence to disable transcript writes entirely.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"desktopSessionCleanupPeriodDays": {
"description": "Retention ceiling in days for session transcripts created or last written by a desktop-host surface (Claude Desktop, Cowork), which are otherwise exempt from the cleanupPeriodDays sweep. 0 (the default) means no ceiling: such transcripts are kept until deleted another way. Unlike cleanupPeriodDays, 0 is allowed because this setting never disables writes — it only bounds an exemption from deletion. The ceiling is a hard cap: it also bounds an active archive grace, so the grace window of a release marker never keeps files past the ceiling. Ignored when cleanupPeriodDays is managed by org policy. A ceiling at or below cleanupPeriodDays effectively disables the exemption: those transcripts age out on the regular cleanupPeriodDays schedule, so the effective retention is whichever of the two periods is longer.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"syncClaudeAiSkills": {
"description": "Set to false to turn off syncing of the skills you have enabled on claude.ai. In your user settings (or managed settings): nothing more is downloaded, previously synced skills (~/.claude/skills/synced) can no longer be run, are hidden from every session started afterwards, and are moved to ~/.claude/skills/.trash at the next launch (deleted after cleanupPeriodDays; re-downloaded, not restored, if you re-enable). In .claude/settings.local.json or --settings: downloads stop and synced skills are blocked and hidden for sessions in that workspace or invocation only (nothing is moved). Not read from project settings (.claude/settings.json). Only false is honored — the feature is enabled server-side for your account, so setting true does not turn it on early. While it is on, synced skills are available in every session, re-synced every 10 minutes, and removed when you disable them on claude.ai. Only applies when signed in with your Claude account.",
"type": "boolean"
},
"syncClaudeAiPlugins": {
"description": "Set to false to turn off syncing of the plugins you have enabled on claude.ai. In your user settings (or managed settings): nothing more is downloaded, previously synced plugins (~/.claude/plugins/synced) are hidden from every session started afterwards and moved to ~/.claude/plugins/.trash at the next launch (deleted after cleanupPeriodDays; re-downloaded, not restored, if you re-enable). In .claude/settings.local.json or --settings: downloads stop and synced plugins are hidden for sessions in that workspace or invocation only (nothing is moved). Not read from project settings (.claude/settings.json). Only false is honored — the feature is enabled server-side for your account, so setting true does not turn it on early. While it is on, synced plugins load in every session like plugins you installed yourself (a plugin you installed with the same name takes precedence), are re-synced at each launch, and are removed when you disable them on claude.ai. Only applies when signed in with your Claude account.",
"type": "boolean"
},
"skillListingMaxDescChars": {
"description": "Per-skill description character cap in the skill listing sent to Claude (default: 1536). Descriptions longer than this are truncated. Raise to opt in to higher per-turn context cost.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"skillListingBudgetFraction": {
"description": "Fraction of the context window (in characters) reserved for the skill listing sent to Claude (default: 0.01 = 1%). When the listing exceeds this, descriptions are shortened to fit. Raise to opt in to higher per-turn context cost.",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1
},
"wslInheritsWindowsSettings": {
"description": "When set to true in either admin-only Windows source — the HKLM SOFTWARE/Policies/ClaudeCode registry key or C:/Program Files/ClaudeCode/managed-settings.json — WSL reads managed settings from the full Windows policy chain (HKLM, C:/Program Files/ClaudeCode via DrvFs, HKCU) in addition to /etc/claude-code. Windows sources take priority. The flag is also required in HKCU itself for HKCU policy to apply on WSL (double opt-in: admin enables the chain, user confirms HKCU). On native Windows the flag has no effect.",
"type": "boolean"
},
"env": {
"description": "Environment variables to set for Claude Code sessions",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
"attribution": {
"description": "Customize attribution text for commits and PRs. Each field defaults to the standard Claude Code attribution if not set.",
"type": "object",
"properties": {
"commit": {
"description": "Attribution text for git commits, including any trailers. Empty string hides attribution.",
"type": "string"
},
"pr": {
"description": "Attribution text for pull request descriptions. Empty string hides attribution.",
"type": "string"
},
"sessionUrl": {
"description": "Whether to append the claude.ai session link to commits and PRs created from web or Remote Control sessions (default: true). Set to false to omit the Claude-Session trailer and PR-body link.",
"type": "boolean"
}
},
"additionalProperties": {}
},
"includeCoAuthoredBy": {
"description": "Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)",
"type": "boolean"
},
"includeGitInstructions": {
"description": "Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)",
"type": "boolean"
},
"permissions": {
"description": "Tool usage permissions configuration",
"type": "object",
"properties": {
"allow": {
"description": "List of permission rules for allowed operations",
"type": "array",
"items": {
"type": "string"
}
},
"deny": {
"description": "List of permission rules for denied operations",
"type": "array",
"items": {
"type": "string"
}
},
"ask": {
"description": "List of permission rules that should always prompt for confirmation",
"type": "array",
"items": {
"type": "string"
}
},
"defaultMode": {
"description": "Default permission mode when Claude Code needs access ('manual' is accepted as an alias for 'default')",
"type": "string",
"enum": [
"acceptEdits",
"auto",
"bypassPermissions",
"default",
"dontAsk",
"plan"
]
},
"disableBypassPermissionsMode": {
"description": "Disable the ability to bypass permission prompts",
"type": "string",
"enum": [
"disable"
]
},
"blockReadsOutsideWorkingDirectories": {
"description": "Refuse file-tool reads (Read, Grep, Glob, LSP) outside the working directories in every permission mode; true in any settings source wins. Also set when the user picks \"block\" on the one-time auto-mode prompt for a read outside the working directories.",
"type": "boolean"
},
"disableAutoMode": {
"description": "Disable auto mode",
"type": "string",
"enum": [
"disable"
]
},
"additionalDirectories": {
"description": "Additional directories to include in the permission scope",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": {}
},
"model": {
"description": "Override the default model used by Claude Code",
"type": "string"
},
"fallbackModel": {
"description": "Fallback model(s) tried in order when the primary model is overloaded or unavailable. Each element accepts a model name or alias; \"default\" expands to the default model. CLI --fallback-model takes precedence.",
"type": "array",
"items": {
"type": "string"
}
},
"availableModels": {
"description": "Allowlist of models that users can select. Accepts family aliases (\"opus\" allows any opus version), version prefixes (\"opus-4-5\" allows only that version), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.",
"type": "array",
"items": {
"type": "string"
}
},
"enforceAvailableModels": {
"description": "When true and availableModels is a non-empty array, the Default model selection is also constrained: if the default model for the user tier is not in availableModels, Default resolves to the first allowed availableModels entry instead. Has no effect when availableModels is unset or an empty array. Typically set in managed settings by enterprise administrators.",
"type": "boolean"
},
"modelOverrides": {
"description": "Override mapping from Anthropic model ID (e.g. \"claude-opus-4-6\") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
"modelPicker": {
"description": "Curate the /model picker: an ordered list of models with your own labels, independent of the built-in lineup and of Claude Code releases. availableModels still applies to these rows. Honored from managed, --settings/SDK, and user settings only (not from a project checkout); the highest-precedence of those that defines modelPicker wins outright (no merging across sources). Typically set in managed settings by enterprise administrators.",
"type": "object",
"properties": {
"options": {
"description": "Rows to show in the /model picker, in order.",
"type": "array",
"items": {
"type": "object",
"properties": {
"model": {
"description": "Model to select, taken verbatim: an alias (\"opus\"), an Anthropic model ID, or a provider-format ID (Vertex, Bedrock, gateway). Same values --model accepts.",
"type": "string"
},
"label": {
"description": "Row title. Defaults to the model name.",
"type": "string"
},
"description": {
"description": "Row subtitle. Defaults to a generic description.",
"type": "string"
},
"behavesAs": {
"description": "For a model this version of Claude Code does not know: the ID of a model it does know (e.g. \"claude-opus-4-8\") whose client-side handling — prompt profile, capability and effort defaults — applies to it. Changes neither the row's label nor the model ID sent. Without it, a model-catalog row for a model this version does not know is not offered until Claude Code is updated.",
"type": "string"
}
},
"required": [
"model"
]
}
},
"replaceBuiltInOptions": {
"description": "When true, the picker shows only the Default row and these options — the built-in lineup, gateway-discovered models and ANTHROPIC_CUSTOM_MODEL_OPTION are hidden. When false or unset, these options are added after the built-in lineup.",
"type": "boolean"
}
},
"required": [
"options"
]
},
"modelPricing": {
"description": "Price usage at your organization's contracted rates instead of list price. Affects every spend figure Claude Code reports — /cost, the status line, the SDK total_cost_usd, --max-budget-usd, and the OpenTelemetry cost metric and events — which remain USD estimates, not an invoice (the per-Mtok price labels in /model stay at list). \"overrides\" maps a model ID to its USD-per-million-token rates (input, output, cacheRead, cacheWrite — all four required, each 0 to 10000; cacheWrite prices both 5-minute and 1-hour cache writes). A matching row is charged exactly as written; fast-mode and US-data-residency surcharges are not added on top. A key Claude Code itself uses for a built-in model — its ID such as \"claude-sonnet-4-6\", or its first-party, Bedrock (any or no region prefix), Vertex or Foundry ID — covers every dated and provider form of that model; any other key — a gateway model alias, or a spelling Claude Code does not itself use — matches that model ID only (case-insensitive), and such an exact match wins over a built-in row. On Bedrock an application inference profile is matched by its backing model. An invalid row or multiplier is reported and skipped; the rest still apply. \"multiplier\" in (0, 1] scales every computed cost, overridden or not (0.85 = 85% of the price). Only honored from managed settings (server-managed, MDM / OS policy, or managed-settings.json), or — when none of those sets it — when supplied by a host application that manages the model provider; ignored in user, project, local and --settings sources.",
"type": "object",
"properties": {
"multiplier": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1
},
"overrides": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "object",
"properties": {
"input": {
"type": "number",
"minimum": 0,
"maximum": 10000
},
"output": {
"type": "number",
"minimum": 0,
"maximum": 10000
},
"cacheRead": {
"type": "number",
"minimum": 0,
"maximum": 10000
},
"cacheWrite": {
"type": "number",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"input",
"output",
"cacheRead",
"cacheWrite"
]
}
}
}
},
"enableAllProjectMcpServers": {
"description": "Whether to automatically approve all MCP servers in the project",
"type": "boolean"
},
"enabledMcpjsonServers": {
"description": "List of approved MCP servers from .mcp.json",
"type": "array",
"items": {
"type": "string"
}
},
"disabledMcpjsonServers": {
"description": "List of rejected MCP servers from .mcp.json",
"type": "array",
"items": {
"type": "string"
}
},
"disableClaudeAiConnectors": {
"description": "When true in any settings source, claude.ai MCP cloud connectors are not auto-fetched or connected. Only gates auto-fetched connectors — a claudeai-proxy server passed explicitly (e.g. via --mcp-config or the SDK mcpServers option) still follows the normal MCP config trust flow. Any-source-true wins: a project can opt out, but a project-level false cannot override a user-level true.",
"type": "boolean"
},
"skillOverrides": {
"description": "Per-skill listing overrides keyed by skill name. \"name-only\" lists the skill without its description; \"user-invocable-only\" hides it from the model but keeps /name; \"off\" hides it from both. Absent = on.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string",
"enum": [
"on",
"name-only",
"user-invocable-only",
"off"
]
}
},
"disableBundledSkills": {
"description": "Disable the skills and workflows that ship with Claude Code: bundled skills and workflows are removed entirely; built-in slash commands stay typable but are hidden from the model. Plugins, .claude/skills/, and .claude/commands/ are unaffected. Equivalent to CLAUDE_CODE_DISABLE_BUNDLED_SKILLS=1.",
"type": "boolean"
},
"managedMcpServers": {
"description": "MCP servers the organization provides to every user, keyed by server name, each with the .mcp.json entry shape; only \"http\" and \"sse\" servers are accepted (nothing that names a program to run, no ${VAR} references). Honored from managed settings only; users cannot remove them, deniedMcpServers still applies, and they need no allowedMcpServers entry. Not read in Claude Desktop's Code tab on a third-party deployment or in Cowork sessions, where Claude Desktop supplies and locks the session's MCP servers itself.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"allowedMcpServers": {
"description": "Enterprise allowlist of the MCP servers users may use. Governs servers users add (user, project and local config, --mcp-config, agent frontmatter, plugins, claude.ai connectors); servers the organization itself delivers (managedMcpServers, and managed-mcp.json entries that use no ${VAR} expansion) are allowed without being listed; a managed-mcp.json entry that uses ${VAR} expansion is still checked against this list. If undefined, all servers are allowed. If empty array, users can use no servers of their own. Denylist takes precedence - if a server is on both lists, it is denied.",
"type": "array",
"items": {
"type": "object",
"properties": {
"serverName": {
"description": "Name of the MCP server that users are allowed to configure",
"type": "string",
"pattern": "^[a-zA-Z0-9_-]+$"
},
"serverCommand": {
"description": "Command array [command, ...args] to match exactly for allowed stdio servers",
"minItems": 1,
"type": "array",
"items": {
"type": "string"
}
},
"serverUrl": {
"description": "URL pattern with wildcard support (e.g., \"https://*.example.com/*\") for allowed remote MCP servers",
"type": "string"
}
}
}
},
"deniedMcpServers": {
"description": "Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied.",
"type": "array",
"items": {
"type": "object",
"properties": {
"serverName": {
"description": "Name of the MCP server that is explicitly blocked",
"type": "string",
"minLength": 1
},
"serverCommand": {
"description": "Command array [command, ...args] to match exactly for blocked stdio servers",
"minItems": 1,
"type": "array",
"items": {
"type": "string"
}
},
"serverUrl": {
"description": "URL pattern with wildcard support (e.g., \"https://*.example.com/*\") for blocked remote MCP servers",
"type": "string"
}
}
}
},
"hooks": {
"description": "Custom commands to run before/after tool executions",
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"PreToolUse",
"PostToolUse",
"PostToolUseFailure",
"PostToolBatch",
"Notification",
"UserPromptSubmit",
"UserPromptExpansion",
"SessionStart",
"SessionEnd",
"Stop",
"StopFailure",
"SubagentStart",
"SubagentStop",
"PreCompact",
"PostCompact",
"PreModelSwitch",
"PostModelSwitch",
"PermissionRequest",
"PermissionDenied",
"Setup",
"TeammateIdle",
"TaskCreated",
"TaskCompleted",
"Elicitation",
"ElicitationResult",
"ConfigChange",
"WorktreeCreate",
"WorktreeRemove",
"InstructionsLoaded",
"CwdChanged",
"FileChanged",
"DirectoryAdded",
"MessageDisplay"
]
},
"additionalProperties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"matcher": {
"description": "String pattern to match (e.g. tool names like \"Write\")",
"type": "string"
},
"hooks": {
"description": "List of hooks to execute when the matcher matches",
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"description": "Shell command hook type",
"type": "string",
"const": "command"
},
"command": {
"description": "Shell command to execute",
"type": "string"
},
"args": {
"description": "Argument list for exec form. When present, `command` is resolved as an executable and spawned directly with these arguments — no shell. Path placeholders like ${CLAUDE_PLUGIN_ROOT} are substituted per-element as plain strings, so paths with quotes, $, or backticks never reach a shell parser. When absent, `command` runs through a shell (bash on POSIX, PowerShell on Windows without Git Bash).",
"type": "array",
"items": {
"type": "string"
}
},
"if": {
"description": "Permission rule syntax to filter when this hook runs (e.g., \"Bash(git *)\"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.",
"type": "string"
},
"shell": {
"description": "Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash (powershell on Windows without Git Bash).",
"type": "string",
"enum": [
"bash",
"powershell"
]
},
"timeout": {
"description": "Timeout in seconds for this specific command",
"type": "number",
"exclusiveMinimum": 0
},
"statusMessage": {
"description": "Custom status message to display in spinner while hook runs",
"type": "string"
},
"once": {
"description": "If true, hook runs once and is removed after execution",
"type": "boolean"
},
"async": {
"description": "If true, hook runs in background without blocking",
"type": "boolean"
},
"asyncRewake": {
"description": "If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.",
"type": "boolean"
}
},
"required": [
"type",
"command"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "LLM prompt hook type",
"type": "string",
"const": "prompt"
},
"prompt": {
"description": "Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON.",
"type": "string"
},
"if": {
"description": "Permission rule syntax to filter when this hook runs (e.g., \"Bash(git *)\"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.",
"type": "string"
},
"timeout": {
"description": "Timeout in seconds for this specific prompt evaluation",
"type": "number",
"exclusiveMinimum": 0
},
"model": {
"description": "Model to use for this prompt hook (e.g., \"claude-sonnet-5\"). If not specified, uses the default small fast model.",
"type": "string"
},
"continueOnBlock": {
"description": "Sets the continue value for the decision:\"block\" produced when ok is false. Default false (turn ends). Whether continue:true lets the turn proceed depends on the event's decision:\"block\" semantics. On PostToolUse, the reason is fed back to Claude and the turn continues.",
"type": "boolean"
},
"statusMessage": {
"description": "Custom status message to display in spinner while hook runs",
"type": "string"
},
"once": {
"description": "If true, hook runs once and is removed after execution",
"type": "boolean"
}
},
"required": [
"type",
"prompt"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Agentic verifier hook type",
"type": "string",
"const": "agent"
},
"prompt": {
"description": "Prompt describing what to verify (e.g. \"Verify that unit tests ran and passed.\"). Use $ARGUMENTS placeholder for hook input JSON.",
"type": "string"
},
"if": {
"description": "Permission rule syntax to filter when this hook runs (e.g., \"Bash(git *)\"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.",
"type": "string"
},
"timeout": {
"description": "Timeout in seconds for agent execution (default 60)",
"type": "number",
"exclusiveMinimum": 0
},
"model": {
"description": "Model to use for this agent hook (e.g., \"claude-sonnet-5\"). If not specified, uses Haiku.",
"type": "string"
},
"statusMessage": {
"description": "Custom status message to display in spinner while hook runs",
"type": "string"
},
"once": {
"description": "If true, hook runs once and is removed after execution",
"type": "boolean"
}
},
"required": [
"type",
"prompt"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "HTTP hook type",
"type": "string",
"const": "http"
},
"url": {
"description": "URL to POST the hook input JSON to",
"type": "string",
"format": "uri"
},
"if": {
"description": "Permission rule syntax to filter when this hook runs (e.g., \"Bash(git *)\"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.",
"type": "string"
},
"timeout": {
"description": "Timeout in seconds for this specific request",
"type": "number",
"exclusiveMinimum": 0
},
"headers": {
"description": "Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., \"Authorization\": \"Bearer $MY_TOKEN\"). Only variables listed in allowedEnvVars will be interpolated.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
"allowedEnvVars": {
"description": "Explicit list of environment variable names that may be interpolated in header values. Only variables listed here will be resolved; all other $VAR references are left as empty strings. Required for env var interpolation to work.",
"type": "array",
"items": {
"type": "string"
}
},
"statusMessage": {
"description": "Custom status message to display in spinner while hook runs",
"type": "string"
},
"once": {
"description": "If true, hook runs once and is removed after execution",
"type": "boolean"
}
},
"required": [
"type",
"url"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "MCP tool hook type",
"type": "string",
"const": "mcp_tool"
},
"server": {
"description": "Name of an already-configured MCP server to invoke",
"type": "string"
},
"tool": {
"description": "Name of the tool on that server to call",
"type": "string"
},
"input": {
"description": "Arguments passed to the MCP tool. String values support ${path} interpolation from the hook input JSON (e.g. \"${tool_input.file_path}\").",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"if": {
"description": "Permission rule syntax to filter when this hook runs (e.g., \"Bash(git *)\"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.",
"type": "string"
},
"timeout": {
"description": "Timeout in seconds for this specific tool call",
"type": "number",
"exclusiveMinimum": 0
},
"statusMessage": {
"description": "Custom status message to display in spinner while hook runs",
"type": "string"
},
"once": {
"description": "If true, hook runs once and is removed after execution",
"type": "boolean"
}
},
"required": [
"type",
"server",
"tool"
]
}
]
}
}
},
"required": [
"hooks"
]
}
}
},
"worktree": {
"description": "Git worktree configuration: the CLI --worktree flag, EnterWorktree and agent isolation, plus the location Claude Code Desktop uses for SSH-session worktrees on this machine.",
"type": "object",
"properties": {
"symlinkDirectories": {
"description": "Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: \"node_modules\", \".cache\", \".bin\"",
"type": "array",
"items": {
"type": "string"
}
},
"sparsePaths": {
"description": "Directories to include when creating worktrees, via git sparse-checkout (cone mode). Dramatically faster in large monorepos — only the listed paths are written to disk.",
"type": "array",
"items": {
"type": "string"
}
},
"baseRef": {
"description": "Which ref new worktrees branch from. 'fresh' (default) branches from origin/<default-branch> for a clean tree. 'head' branches from your current local HEAD so unpushed commits and feature-branch state are present. Applies to --worktree, EnterWorktree, and agent isolation.",
"type": "string",
"enum": [
"fresh",
"head"
]
},
"bgIsolation": {
"description": "Isolation mode for background sessions in this repo. 'worktree' (default) blocks Edit/Write in the main checkout until EnterWorktree is called. 'none' lets background jobs edit the working copy directly.",
"type": "string",
"enum": [
"worktree",
"none"
]
},
"location": {
"description": "Directory under which Claude Code Desktop creates the worktrees of SSH sessions that run on this machine (an absolute path or one starting with ~/), instead of <project>/.claude/worktrees. Read by the desktop app from the SSH host user settings; a location chosen in the desktop app's SSH connection settings takes precedence. The CLI (--worktree, EnterWorktree, agent isolation) does not read it yet.",
"type": "string"
}
}
},
"disableAllHooks": {
"description": "Disable all hooks and statusLine execution",
"type": "boolean"
},
"disableAgentView": {
"description": "Disable agent view (`claude agents`, `--bg`, /background, the on-demand daemon). Typically set in managed settings. Equivalent to CLAUDE_CODE_DISABLE_AGENT_VIEW=1.",
"type": "boolean"
},
"disableRemoteControl": {
"description": "Disable Remote Control (claude.ai/code, `claude remote-control`, `--remote-control`/`--rc`, auto-start, and the in-session toggle). Typically set in managed settings.",
"type": "boolean"
},
"disableWorkflows": {
"description": "Disable the Workflows feature (also via CLAUDE_CODE_DISABLE_WORKFLOWS).",
"type": "boolean"
},
"disableArtifact": {
"description": "Deprecated: use enableArtifact: false. Still honored — true disables the Artifact tool; false is ignored.",
"type": "boolean"
},
"enableArtifact": {
"description": "Turn the Artifact tool on or off. Off in any of managed, --settings, or user settings wins; project and local settings can only turn it off. Unset defaults to on once the feature is available.",
"type": "boolean"
},
"enableWorkflows": {
"description": "Enable or disable the Workflows feature for this user. Unset = default by plan once the feature is available.",
"type": "boolean"
},
"workflowSizeGuideline": {
"description": "Advisory size guideline for the dynamic workflows Claude writes: \"small\" aims for fewer than 5 agents, \"medium\" (the default) fewer than 15, \"large\" fewer than 50, and \"unrestricted\" sends no guideline. A value here — including from managed settings — takes precedence over the \"Dynamic workflow size\" choice in /config, and that /config row is hidden while a settings file provides the key. This is a guideline, not an enforced limit.",
"type": "string",
"enum": [
"unrestricted",
"small",
"medium",
"large"
]
},
"workflowKeywordTriggerEnabled": {
"description": "Enable the \"ultracode\" keyword trigger: including the keyword in a prompt opts that turn into the Workflow tool. Set to false to disable the trigger. Default: true.",
"type": "boolean"
},
"disableSkillShellExecution": {
"description": "Disable inline shell execution in skills and custom slash commands from user, project, or plugin sources. Commands are replaced with a placeholder instead of being run.",
"type": "boolean"
},
"defaultShell": {
"description": "Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip).",
"type": "string",
"enum": [
"bash",
"powershell"
]
},
"bashEditDiffEnabled": {
"description": "Whether the Bash tool shows a diff of the files a Bash command changed (PostToolUse Bash hooks get the changed-file list in tool_response). Set to false to turn that off. Default: on when the Bash tool handles file edits. Only user, flag or policy settings can turn it on outside auto and bypassPermissions modes.",
"type": "boolean"
},
"bashOutputMaxChars": {
"description": "How many characters of a successful Bash or PowerShell command's output Claude receives inline (default 30000; values clamp to 4000-128000). Output past this is saved to a file and Claude receives a short preview plus the path. When set, this also replaces BASH_MAX_OUTPUT_LENGTH, which on its own only sizes the read-back window.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"taskOutputMaxChars": {
"description": "How many characters of a background task's output the TaskOutput tool hands Claude inline (default 32000; values clamp to 4000-128000). Longer output is cut to its most recent characters with the path of the full output file, except that a shell command still running returns its first characters up to this size. When set, this also replaces TASK_MAX_OUTPUT_LENGTH, which on its own only sizes that window.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"respondToBashCommands": {
"description": "Whether Claude responds after an input-box ! bash command runs. Set to false to add the command output to context without a response. Default: true.",
"type": "boolean"
},
"allowManagedHooksOnly": {
"description": "When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored.",
"type": "boolean"
},
"allowedHttpHookUrls": {
"description": "Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. \"https://hooks.example.com/*\"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).",
*Truncated - read the full file at https://github.com/SaiVatsal/Skill-I-Use/blob/8a3b3de73262a4c4db64523949360f3c599c2fb1/system_prompts_leaks-main/Anthropic/claude-code/skills/update-config/SKILL.md.*