Created
August 14, 2025 16:48
-
-
Save xdannyrobertsx/0a395c59b1ef09508e52522289bd5bf6 to your computer and use it in GitHub Desktop.
Claude Code Settings Schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "title": "Claude Code Settings", | |
| "description": "Configuration schema for Claude Code settings.json files", | |
| "type": "object", | |
| "additionalProperties": false, | |
| "properties": { | |
| "$schema": { | |
| "type": "string", | |
| "description": "JSON Schema reference for this configuration file" | |
| }, | |
| "apiKeyHelper": { | |
| "type": "string", | |
| "description": "Custom script, to be executed in /bin/sh, to generate an auth value. This value will be sent as X-Api-Key and Authorization: Bearer headers for model requests", | |
| "examples": ["/bin/generate_temp_api_key.sh"] | |
| }, | |
| "cleanupPeriodDays": { | |
| "type": "integer", | |
| "description": "How long to locally retain chat transcripts", | |
| "default": 30, | |
| "minimum": 1, | |
| "examples": [20, 30, 60] | |
| }, | |
| "env": { | |
| "type": "object", | |
| "description": "Environment variables that will be applied to every session", | |
| "patternProperties": { | |
| "^[A-Z][A-Z0-9_]*$": { | |
| "type": "string" | |
| } | |
| }, | |
| "additionalProperties": { | |
| "type": "string" | |
| }, | |
| "examples": [{"FOO": "bar", "NODE_ENV": "development"}] | |
| }, | |
| "includeCoAuthoredBy": { | |
| "type": "boolean", | |
| "description": "Whether to include the co-authored-by Claude byline in git commits and pull requests", | |
| "default": true, | |
| "examples": [false] | |
| }, | |
| "permissions": { | |
| "type": "object", | |
| "description": "Permission configuration for tool access and working directories", | |
| "additionalProperties": false, | |
| "properties": { | |
| "allow": { | |
| "type": "array", | |
| "description": "Array of permission rules to allow tool use", | |
| "items": { | |
| "type": "string", | |
| "pattern": "^(Bash|Edit|Glob|Grep|LS|MultiEdit|NotebookEdit|NotebookRead|Read|Task|TodoWrite|WebFetch|WebSearch|Write)(\\([^)]*\\))?$" | |
| }, | |
| "examples": [["Bash(git diff:*)", "Read", "Write"]] | |
| }, | |
| "deny": { | |
| "type": "array", | |
| "description": "Array of permission rules to deny tool use", | |
| "items": { | |
| "type": "string", | |
| "pattern": "^(Bash|Edit|Glob|Grep|LS|MultiEdit|NotebookEdit|NotebookRead|Read|Task|TodoWrite|WebFetch|WebSearch|Write)(\\([^)]*\\))?$" | |
| }, | |
| "examples": [["WebFetch", "Bash(curl:*)"]] | |
| }, | |
| "additionalDirectories": { | |
| "type": "array", | |
| "description": "Additional working directories that Claude has access to", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "examples": [["../docs/", "../lib/"]] | |
| }, | |
| "defaultMode": { | |
| "type": "string", | |
| "description": "Default permission mode when opening Claude Code", | |
| "enum": ["acceptEdits", "plan", "execute", "bypassPermissions"], | |
| "examples": ["acceptEdits"] | |
| }, | |
| "disableBypassPermissionsMode": { | |
| "type": "string", | |
| "description": "Disable bypassPermissions mode from being activated", | |
| "enum": ["disable"], | |
| "examples": ["disable"] | |
| } | |
| } | |
| }, | |
| "hooks": { | |
| "type": "object", | |
| "description": "Configure custom commands to run before or after tool executions", | |
| "additionalProperties": false, | |
| "properties": { | |
| "PreToolUse": { | |
| "type": "object", | |
| "description": "Commands to run before tool execution", | |
| "patternProperties": { | |
| "^(Bash|Edit|Glob|Grep|LS|MultiEdit|NotebookEdit|NotebookRead|Read|Task|TodoWrite|WebFetch|WebSearch|Write)$": { | |
| "type": "string" | |
| } | |
| }, | |
| "additionalProperties": false | |
| }, | |
| "PostToolUse": { | |
| "type": "object", | |
| "description": "Commands to run after tool execution", | |
| "patternProperties": { | |
| "^(Bash|Edit|Glob|Grep|LS|MultiEdit|NotebookEdit|NotebookRead|Read|Task|TodoWrite|WebFetch|WebSearch|Write)$": { | |
| "type": "string" | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| }, | |
| "examples": [{"PreToolUse": {"Bash": "echo 'Running command...'"}}] | |
| }, | |
| "model": { | |
| "type": "string", | |
| "description": "Model to use for conversations", | |
| "examples": ["claude-3-5-sonnet-20241022", "claude-sonnet-4-20250514", "sonnet", "opus"] | |
| }, | |
| "forceLoginMethod": { | |
| "type": "string", | |
| "description": "Restrict login method to specific account type", | |
| "enum": ["claudeai", "console"], | |
| "examples": ["claudeai"] | |
| }, | |
| "enableAllProjectMcpServers": { | |
| "type": "boolean", | |
| "description": "Enable all MCP servers defined in .mcp.json files", | |
| "examples": [true] | |
| }, | |
| "enabledMcpjsonServers": { | |
| "type": "array", | |
| "description": "Specific MCP servers from .mcp.json files to approve", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "examples": [["memory", "github"]] | |
| }, | |
| "disabledMcpjsonServers": { | |
| "type": "array", | |
| "description": "Specific MCP servers from .mcp.json files to reject", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "examples": [["filesystem"]] | |
| }, | |
| "awsAuthRefresh": { | |
| "type": "string", | |
| "description": "Command to refresh AWS credentials from .aws directory", | |
| "examples": ["aws sso login --profile myprofile"] | |
| }, | |
| "awsCredentialExport": { | |
| "type": "string", | |
| "description": "Script for advanced AWS credential configuration", | |
| "examples": ["/bin/generate_aws_grant.sh"] | |
| }, | |
| "autoUpdates": { | |
| "type": "boolean", | |
| "description": "Whether to enable automatic updates", | |
| "default": true, | |
| "examples": [false] | |
| }, | |
| "preferredNotifChannel": { | |
| "type": "string", | |
| "description": "Where to receive notifications", | |
| "enum": ["iterm2", "iterm2_with_bell", "terminal_bell", "notifications_disabled"], | |
| "default": "iterm2", | |
| "examples": ["iterm2"] | |
| }, | |
| "theme": { | |
| "type": "string", | |
| "description": "Color theme for Claude Code", | |
| "enum": ["dark", "light", "light-daltonized", "dark-daltonized"], | |
| "examples": ["dark"] | |
| }, | |
| "verbose": { | |
| "type": "boolean", | |
| "description": "Whether to show full bash and command outputs", | |
| "default": false, | |
| "examples": [true] | |
| } | |
| }, | |
| "examples": [ | |
| { | |
| "model": "claude-3-5-sonnet-20241022", | |
| "cleanupPeriodDays": 20, | |
| "includeCoAuthoredBy": false, | |
| "env": { | |
| "NODE_ENV": "development", | |
| "DEBUG": "true" | |
| }, | |
| "permissions": { | |
| "allow": ["Bash(git diff:*)", "Read", "Write"], | |
| "deny": ["WebFetch", "Bash(curl:*)"], | |
| "additionalDirectories": ["../docs/"], | |
| "defaultMode": "acceptEdits" | |
| }, | |
| "hooks": { | |
| "PreToolUse": { | |
| "Bash": "echo 'Running command...'" | |
| }, | |
| "PostToolUse": { | |
| "Edit": "prettier --write $CLAUDE_EDITED_FILE" | |
| } | |
| } | |
| } | |
| ] | |
| } |
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://www.schemastore.org/claude-code-settings.json",
"$ref": "#/definitions/ClaudeCodeSettings",
"definitions": {
"ClaudeCodeSettings": {
"type": "object",
"properties": {
"$schema": {
"type": "string",
"const": "https://json.schemastore.org/claude-code-settings.json",
"description": "JSON Schema reference for Claude Code settings"
},
"apiKeyHelper": {
"type": "string",
"description": "Path to a script that outputs authentication values"
},
"awsCredentialExport": {
"type": "string",
"description": "Path to a script that exports AWS credentials"
},
"awsAuthRefresh": {
"type": "string",
"description": "Path to a script that refreshes AWS authentication"
},
"cleanupPeriodDays": {
"type": "integer",
"minimum": 0,
"description": "Number of days to retain chat transcripts (0 to disable cleanup)"
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Environment variables to set for Claude Code sessions"
},
"includeCoAuthoredBy": {
"type": "boolean",
"description": "Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)"
},
"permissions": {
"type": "object",
"properties": {
"allow": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of permission rules for allowed operations"
},
"deny": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of permission rules for denied operations"
},
"ask": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of permission rules that should always prompt for confirmation"
},
"defaultMode": {
"type": "string",
"enum": [
"acceptEdits",
"bypassPermissions",
"default",
"plan"
],
"description": "Default permission mode when Claude Code needs access"
},
"disableBypassPermissionsMode": {
"type": "string",
"enum": [
"disable"
],
"description": "Disable the ability to bypass permission prompts"
},
"additionalDirectories": {
"type": "array",
"items": {
"type": "string"
},
"description": "Additional directories to include in the permission scope"
}
},
"additionalProperties": false,
"description": "Tool usage permissions configuration"
},
"model": {
"type": "string",
"description": "Override the default model used by Claude Code"
},
"enableAllProjectMcpServers": {
"type": "boolean",
"description": "Whether to automatically approve all MCP servers in the project"
},
"enabledMcpjsonServers": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of approved MCP servers from .mcp.json"
},
"disabledMcpjsonServers": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of rejected MCP servers from .mcp.json"
},
"hooks": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"matcher": {
"type": "string",
"description": "String pattern to match (e.g. tool names like \"Write\")"
},
"hooks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "command",
"description": "Hook type (currently only \"command\" is supported)"
},
"command": {
"type": "string",
"description": "Shell command to execute"
},
"timeout": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Timeout in seconds for this specific command"
}
},
"required": [
"type",
"command"
],
"additionalProperties": false
},
"description": "List of hooks to execute when the matcher matches"
}
},
"required": [
"hooks"
],
"additionalProperties": false
}
},
"description": "Custom commands to run before/after tool executions"
},
"disableAllHooks": {
"type": "boolean",
"description": "Disable all hooks and statusLine execution"
},
"statusLine": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "command"
},
"command": {
"type": "string"
},
"padding": {
"type": "number"
}
},
"required": [
"type",
"command"
],
"additionalProperties": false,
"description": "Custom status line display configuration"
},
"enabledPlugins": {
"type": "object",
"additionalProperties": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "boolean"
}
]
},
"description": "Enabled plugins using plugin-id@marketplace-id format. Example: { \"formatter@anthropic-tools\": true }. Also supports extended format with version constraints."
},
"extraKnownMarketplaces": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"source": {
"anyOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "url"
},
"url": {
"type": "string",
"format": "uri",
"description": "Direct URL to marketplace.json file"
}
},
"required": [
"source",
"url"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "github"
},
"repo": {
"type": "string",
"description": "GitHub repository in owner/repo format"
},
"path": {
"type": "string",
"description": "Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"
}
},
"required": [
"source",
"repo"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "git"
},
"url": {
"type": "string",
"pattern": "\\.git$",
"description": "Full git repository URL"
},
"path": {
"type": "string",
"description": "Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"
}
},
"required": [
"source",
"url"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "npm"
},
"package": {
"type": "string",
"description": "NPM package containing marketplace.json"
}
},
"required": [
"source",
"package"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "file"
},
"path": {
"type": "string",
"description": "Local file path to marketplace.json"
}
},
"required": [
"source",
"path"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "directory"
},
"path": {
"type": "string",
"description": "Local directory containing .claude-plugin/marketplace.json"
}
},
"required": [
"source",
"path"
],
"additionalProperties": false
}
],
"description": "Where to fetch the marketplace from"
},
"installLocation": {
"type": "string",
"description": "Local cache path where marketplace manifest is stored (auto-generated if not provided)"
}
},
"required": [
"source"
],
"additionalProperties": false
},
"description": "Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources."
},
"skippedMarketplaces": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of marketplace names the user has chosen not to install when prompted"
},
"skippedPlugins": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of plugin IDs (plugin@marketplace format) the user has chosen not to install when prompted"
},
"forceLoginMethod": {
"type": "string",
"enum": [
"claudeai",
"console"
],
"description": "Force a specific login method: \"claudeai\" for Claude Pro/Max, \"console\" for Console billing"
},
"forceLoginOrgUUID": {
"type": "string",
"description": "Organization UUID to use for OAuth login"
},
"otelHeadersHelper": {
"type": "string",
"description": "Path to a script that outputs OpenTelemetry headers"
},
"outputStyle": {
"type": "string",
"description": "Controls the output style for assistant responses"
},
"skipWebFetchPreflight": {
"type": "boolean",
"description": "Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"
},
"sandbox": {
"type": "object",
"properties": {
"network": {
"type": "object",
"properties": {
"allowUnixSockets": {
"type": "array",
"items": {
"type": "string"
},
"description": "Allow Unix domain sockets for local IPC (SSH agent, Docker, etc.). Provide an array of specific paths. Defaults to blocking if not specified"
},
"allowLocalBinding": {
"type": "boolean",
"description": "Allow binding to local network addresses (e.g., localhost ports). Defaults to false if not specified"
}
},
"additionalProperties": false
},
"filesystem": {
"type": "object",
"properties": {
"read": {
"type": "object",
"properties": {
"denyOnly": {
"type": "array",
"items": {
"type": "string"
},
"description": "Paths to deny read access to"
}
},
"required": [
"denyOnly"
],
"additionalProperties": false
},
"write": {
"type": "object",
"properties": {
"allowOnly": {
"type": "array",
"items": {
"type": "string"
},
"description": "Paths to allow write access to"
},
"includeDefaults": {
"type": "boolean",
"default": true,
"description": "Include default write paths when using allowOnly mode"
},
"denyWithinAllow": {
"type": "array",
"items": {
"type": "string"
},
"description": "Paths to deny even within allowed paths (e.g., [\"./.claude\"])"
}
},
"required": [
"allowOnly"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"ignoreViolations": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of filesystem paths to ignore sandbox violations for when this command pattern matches"
},
"description": "Map of command patterns to filesystem paths to ignore violations for. Use \"*\" to match all commands"
},
"unsandboxedCommands": {
"type": "array",
"items": {
"type": "string"
},
"description": "Commands that should never run in the sandbox (e.g., [\"git\", \"docker\"])"
},
"enableWeakerNestedSandbox": {
"type": "boolean",
"description": "Enable weaker sandbox mode for unprivileged docker environments where --proc mounting fails. This significantly reduces the strength of the sandbox and should only be used when this risk is acceptable.Default: false (secure)."
}
},
"additionalProperties": false
},
"spinnerTipsEnabled": {
"type": "boolean",
"description": "Whether to show tips in the spinner"
},
"alwaysThinkingEnabled": {
"type": "boolean",
"description": "Whether extended thinking is always enabled (default: false)"
}
},
"additionalProperties": false
}
},
"title": "Claude Code Settings",
"description": "Configuration settings for Claude Code. Learn more: https://docs.claude.com/en/docs/claude-code/settings",
"$comment": "Generated on 2025-10-07T20:10:20.124Z"
}
I dumped one from Claude Code VSCode extension.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for putting this together. this gist should be more popular.