Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 92 additions & 7 deletions src/schemas/json/claude-code-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"permissionRule": {
"type": "string",
"description": "Tool permission rule.\nSee https://code.claude.com/docs/en/settings#permission-rule-syntax\nSee https://code.claude.com/docs/en/settings#tools-available-to-claude for full list of tools available to Claude.",
"pattern": "^((Agent|Bash|Edit|ExitPlanMode|Glob|Grep|KillShell|LS|LSP|MultiEdit|NotebookEdit|NotebookRead|Read|Skill|Task|TaskCreate|TaskGet|TaskList|TaskOutput|TaskStop|TaskUpdate|TodoWrite|ToolSearch|WebFetch|WebSearch|Write)(\\((?=.*[^)*?])[^)]+\\))?|mcp__.*)$",
"pattern": "^((Agent|Bash|Edit|ExitPlanMode|Glob|Grep|KillShell|LSP|NotebookEdit|Read|Skill|TaskCreate|TaskGet|TaskList|TaskOutput|TaskStop|TaskUpdate|TodoWrite|ToolSearch|WebFetch|WebSearch|Write)(\\((?=.*[^)*?])[^)]+\\))?|mcp__.*)$",
"examples": [
"Bash",
"Bash(npm run build)",
Expand All @@ -14,14 +14,12 @@
"Bash(ls*)",
"Bash(git * main)",
"Edit",
"MultiEdit",
"Edit(/src/**/*.ts)",
"Read(./.env)",
"Read(./secrets/**)",
"Read(//Users/alice/secrets/**)",
"Read(~/Documents/*.pdf)",
"Agent(Explore)",
"Task(Explore)",
"WebFetch",
"WebFetch(domain:example.com)",
"mcp__puppeteer",
Expand Down Expand Up @@ -225,6 +223,20 @@
"examples": ["aws sso login --profile myprofile"],
"minLength": 1
},
"claudeMdExcludes": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "Glob patterns for CLAUDE.md files to exclude from loading. Useful in monorepos to skip irrelevant instructions from other teams. Patterns match against absolute file paths. Arrays merge across settings layers. Managed policy CLAUDE.md files cannot be excluded. See https://code.claude.com/docs/en/memory#exclude-specific-claudemd-files",
"examples": [
[
"**/monorepo/CLAUDE.md",
"/home/user/monorepo/other-team/.claude/rules/**"
]
]
},
"cleanupPeriodDays": {
"type": "integer",
"minimum": 0,
Expand Down Expand Up @@ -369,11 +381,22 @@
"description": "Restrict which models users can select. When defined at multiple settings levels (user, project, etc.), arrays are merged and deduplicated. See https://code.claude.com/docs/en/model-config#restrict-model-selection",
"examples": [["sonnet", "haiku"]]
},
"modelOverrides": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Map Anthropic model IDs to provider-specific model IDs such as Bedrock inference profile ARNs, Vertex AI version names, or Foundry deployment names. Each model picker entry uses its mapped value when calling the provider API. Unknown keys are ignored. See https://code.claude.com/docs/en/model-config#override-model-ids-per-version",
"examples": [
{
"claude-opus-4-6": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-prod"
}
]
},
"effortLevel": {
"type": "string",
"enum": ["low", "medium", "high"],
"description": "Control Opus 4.6 adaptive reasoning effort. Lower effort is faster and cheaper for straightforward tasks, higher effort provides deeper reasoning. Opus 4.6 defaults to medium effort for Max and Team subscribers. Also configurable via CLAUDE_CODE_EFFORT_LEVEL environment variable. See https://code.claude.com/docs/en/model-config#adjust-effort-level",
"default": "high"
"description": "Control Opus 4.6 adaptive reasoning effort. Lower effort is faster and cheaper for straightforward tasks, higher effort provides deeper reasoning. Defaults vary by model and plan (Opus 4.6 defaults to medium for Max and Team subscribers). Use /effort auto to reset to model default. Also configurable via CLAUDE_CODE_EFFORT_LEVEL environment variable. See https://code.claude.com/docs/en/model-config#adjust-effort-level"
},
"fastMode": {
"type": "boolean",
Expand All @@ -385,6 +408,13 @@
"description": "Require per-session opt-in for fast mode. When true, fast mode does not persist across sessions and users must enable it with /fast each session. Useful for controlling costs. See https://code.claude.com/docs/en/fast-mode",
"default": false
},
"feedbackSurveyRate": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Probability (0–1) that the session quality survey appears when eligible. A value of 0.05 means 5% of eligible sessions. See https://code.claude.com/docs/en/settings",
"examples": [0.05]
},
"enableAllProjectMcpServers": {
"type": "boolean",
"description": "Whether to automatically approve all MCP servers in the project. See https://code.claude.com/docs/en/mcp",
Expand Down Expand Up @@ -498,6 +528,15 @@
},
"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. See https://code.claude.com/docs/en/mcp#restriction-options"
},
"httpHookAllowedEnvVars": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. Undefined = no restriction. Arrays merge across settings sources. See https://code.claude.com/docs/en/settings#hook-configuration",
"examples": [["MY_TOKEN", "HOOK_SECRET"]]
},
"hooks": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -589,6 +628,27 @@
"$ref": "#/$defs/hookMatcher"
}
},
"PostCompact": {
"type": "array",
"description": "Hooks that run after the context is compacted. See https://code.claude.com/docs/en/hooks",
"items": {
"$ref": "#/$defs/hookMatcher"
}
},
"Elicitation": {
"type": "array",
"description": "Hooks that run when an MCP server requests user input during a tool call. See https://code.claude.com/docs/en/hooks",
"items": {
"$ref": "#/$defs/hookMatcher"
}
},
"ElicitationResult": {
"type": "array",
"description": "Hooks that run after a user responds to an MCP elicitation, before the response is sent back to the server. See https://code.claude.com/docs/en/hooks",
"items": {
"$ref": "#/$defs/hookMatcher"
}
},
"TeammateIdle": {
"type": "array",
"description": "Hooks that run when an agent team teammate is about to go idle. Exit code 2 sends feedback and keeps the teammate working. Does not support matchers. Agent teams are experimental. See https://code.claude.com/docs/en/hooks#teammateidle",
Expand Down Expand Up @@ -658,6 +718,15 @@
"type": "boolean",
"description": "Disable all hooks and statusLine execution. When true in managed settings, user and project-level disableAllHooks cannot override it. See https://code.claude.com/docs/en/hooks#disable-or-remove-hooks"
},
"allowedHttpHookUrls": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard. When set, hooks with non-matching URLs are blocked. Undefined = no restriction, empty array = block all HTTP hooks. Arrays merge across settings sources. See https://code.claude.com/docs/en/settings#hook-configuration",
"examples": [["https://hooks.example.com/*", "http://localhost:*"]]
},
"allowManagedHooksOnly": {
"type": "boolean",
"description": "(Managed settings only) Prevent loading of user, project, and plugin hooks. Only allows managed hooks and SDK hooks. See https://code.claude.com/docs/en/settings#hook-configuration"
Expand Down Expand Up @@ -1087,7 +1156,7 @@
},
"outputStyle": {
"type": "string",
"description": "Controls the output style for assistant responses. See https://code.claude.com/docs/en/output-styles",
"description": "Controls the output style for assistant responses. Built-in styles: default, Explanatory, Learning. Custom styles can be added in ~/.claude/output-styles/ or .claude/output-styles/. See https://code.claude.com/docs/en/output-styles",
"examples": ["default", "Explanatory", "Learning"],
"minLength": 1
},
Expand Down Expand Up @@ -1140,7 +1209,7 @@
},
"allowManagedDomainsOnly": {
"type": "boolean",
"description": "(Managed settings only) Only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."
"description": "(Managed settings only) Only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources. Non-allowed domains are automatically blocked without user prompts."
}
},
"additionalProperties": false
Expand Down Expand Up @@ -1301,6 +1370,22 @@
"description": "How agent team teammates display: \"auto\" picks split panes in tmux or iTerm2, in-process otherwise. Agent teams are experimental and disabled by default. Enable them by adding CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to your settings.json or environment. See https://code.claude.com/docs/en/agent-teams",
"default": "auto"
},
"worktree": {
"type": "object",
"additionalProperties": false,
"description": "Configuration for --worktree sessions. See https://code.claude.com/docs/en/settings",
"properties": {
"sparsePaths": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "Directories to check out in each worktree via git sparse-checkout (cone mode). Only the listed paths are written to disk, which is faster in large monorepos.",
"examples": [["packages/my-app", "shared/utils"]]
}
}
},
"pluginTrustMessage": {
"type": "string",
"description": "(Managed settings only) Custom message appended to the plugin trust warning shown before installation. Use to provide organization-specific context about approved plugins. See https://code.claude.com/docs/en/settings#plugin-settings",
Expand Down
34 changes: 33 additions & 1 deletion src/test/claude-code-settings/hooks-complete.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"allowedHttpHookUrls": ["https://hooks.example.com/*"],
"hooks": {
"ConfigChange": [
{
Expand All @@ -11,6 +12,26 @@
"matcher": "user_settings"
}
],
"Elicitation": [
{
"hooks": [
{
"command": "echo 'MCP elicitation requested' >> /tmp/claude-mcp.log",
"type": "command"
}
]
}
],
"ElicitationResult": [
{
"hooks": [
{
"command": "echo 'Elicitation result received' >> /tmp/claude-mcp.log",
"type": "command"
}
]
}
],
"InstructionsLoaded": [
{
"hooks": [
Expand Down Expand Up @@ -52,6 +73,16 @@
"matcher": "Bash"
}
],
"PostCompact": [
{
"hooks": [
{
"command": "echo 'Post compact hook' >> /tmp/claude-session.log",
"type": "command"
}
]
}
],
"PostToolUse": [
{
"hooks": [
Expand Down Expand Up @@ -224,5 +255,6 @@
]
}
]
}
},
"httpHookAllowedEnvVars": ["WEBHOOK_SECRET"]
}
15 changes: 14 additions & 1 deletion src/test/claude-code-settings/modern-complete-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"allowManagedHooksOnly": false,
"allowManagedPermissionRulesOnly": false,
"allowedHttpHookUrls": ["https://hooks.example.com/*", "http://localhost:*"],
"alwaysThinkingEnabled": false,
"apiKeyHelper": "/usr/local/bin/claude-auth-helper",
"attribution": {
Expand All @@ -19,6 +20,10 @@
"source": "pathPattern"
}
],
"claudeMdExcludes": [
"**/other-team/CLAUDE.md",
"/home/user/monorepo/.claude/rules/**"
],
"cleanupPeriodDays": 60,
"companyAnnouncements": ["Welcome to the team!"],
"disableAllHooks": false,
Expand All @@ -44,6 +49,7 @@
},
"fastMode": true,
"fastModePerSessionOptIn": true,
"feedbackSurveyRate": 0.05,
"fileSuggestion": {
"command": "~/.claude/file-suggestion.sh",
"type": "command"
Expand Down Expand Up @@ -146,10 +152,14 @@
}
]
},
"httpHookAllowedEnvVars": ["HOOK_TOKEN", "WEBHOOK_SECRET"],
"includeCoAuthoredBy": true,
"includeGitInstructions": false,
"language": "english",
"model": "opus",
"modelOverrides": {
"claude-opus-4-6": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-prod"
},
"otelHeadersHelper": "/usr/local/bin/otel-headers.sh",
"outputStyle": "Explanatory",
"permissions": {
Expand Down Expand Up @@ -232,5 +242,8 @@
"type": "command"
},
"teammateMode": "tmux",
"terminalProgressBarEnabled": false
"terminalProgressBarEnabled": false,
"worktree": {
"sparsePaths": ["packages/my-app", "shared/utils"]
}
}