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
98 changes: 84 additions & 14 deletions src/schemas/json/claude-code-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,25 @@
"permissionRule": {
"type": "string",
"description": "Tool permission rule. See https://code.claude.com/docs/en/settings#permission-rule-syntax",
"pattern": "^((Bash|Edit|ExitPlanMode|Glob|Grep|KillShell|LS|MultiEdit|NotebookEdit|NotebookRead|Read|Skill|SlashCommand|Task|TodoWrite|WebFetch|WebSearch|Write)(\\((?=.*[^)*?])[^)]+\\))?|mcp__.*)$",
"pattern": "^((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__.*)$",
"examples": [
"Bash",
"Bash(npm run build)",
"Bash(git commit:*)",
"Bash(npm run:*)",
"Bash(git commit *)",
"Bash(npm run *)",
"Bash(ls*)",
"Bash(git * main)",
"Edit",
"MultiEdit",
"Edit(/src/**/*.ts)",
"Read(./.env)",
"Read(./secrets/**)",
"Read(/Users/alice/secrets/**)",
"Read(//Users/alice/secrets/**)",
"Read(~/Documents/*.pdf)",
"SlashCommand(/clear)",
"Task(Explore)",
"WebFetch",
"WebFetch(domain:example.com)",
"mcp__puppeteer",
"mcp__github__search_repositories"
]
},
Expand Down Expand Up @@ -57,7 +58,7 @@
},
{
"type": "object",
"description": "LLM prompt hook",
"description": "LLM prompt hook. See https://code.claude.com/docs/en/hooks#prompt-based-hooks",
"additionalProperties": false,
"required": ["type", "prompt"],
"properties": {
Expand All @@ -71,14 +72,41 @@
"description": "Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON.",
"minLength": 1
},
"model": {
"type": "string",
"description": "Model to use for evaluation. Defaults to a fast model"
},
"timeout": {
"type": "number",
"description": "Optional timeout in seconds",
"description": "Optional timeout in seconds (default: 30)",
"exclusiveMinimum": 0
}
}
},
{
"type": "object",
"description": "Agent hook with multi-turn tool access for verification. See https://code.claude.com/docs/en/hooks#agent-based-hooks",
"additionalProperties": false,
"required": ["type", "prompt"],
"properties": {
"type": {
"type": "string",
"description": "Hook type",
"const": "agent"
},
"async": {
"type": "boolean",
"description": "Run this hook asynchronously without blocking Claude Code"
"prompt": {
"type": "string",
"description": "Prompt describing what to verify. Use $ARGUMENTS placeholder for hook input JSON.",
"minLength": 1
},
"model": {
"type": "string",
"description": "Model to use for evaluation. Defaults to a fast model"
},
"timeout": {
"type": "number",
"description": "Optional timeout in seconds (default: 60)",
"exclusiveMinimum": 0
}
}
}
Expand Down Expand Up @@ -222,8 +250,15 @@
},
"defaultMode": {
"type": "string",
"enum": ["acceptEdits", "bypassPermissions", "default", "plan"],
"description": "Default permission mode when Claude Code needs access"
"enum": [
"acceptEdits",
"bypassPermissions",
"default",
"delegate",
"dontAsk",
"plan"
],
"description": "Default permission mode.\n\"default\": prompts on first use.\n\"acceptEdits\": auto-accepts file edits.\n\"plan\": read-only, no modifications.\n\"delegate\": coordination-only for agent team leads (agent teams are experimental; enable via CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS).\n\"dontAsk\": auto-denies unless pre-approved via permissions.\n\"bypassPermissions\": skips all prompts (use only in isolated environments).\nSee https://code.claude.com/docs/en/permissions"
},
"disableBypassPermissionsMode": {
"type": "string",
Expand All @@ -242,7 +277,7 @@
}
},
"additionalProperties": false,
"description": "Tool usage permissions configuration. See https://code.claude.com/docs/en/iam#configuring-permissions",
"description": "Tool usage permissions configuration. See https://code.claude.com/docs/en/permissions and https://code.claude.com/docs/en/settings#permission-settings",
"examples": [
{
"allow": ["Bash(git add:*)"],
Expand All @@ -261,6 +296,12 @@
"type": "string",
"description": "Override the default model used by Claude Code. See https://code.claude.com/docs/en/model-config"
},
"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. See https://code.claude.com/docs/en/model-config#adjust-effort-level",
"default": "high"
},
"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 @@ -407,9 +448,23 @@
"$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",
"items": {
"$ref": "#/$defs/hookMatcher"
}
},
"TaskCompleted": {
"type": "array",
"description": "Hooks that run when a task is being marked as completed. Exit code 2 prevents completion and sends feedback. Does not support matchers. See https://code.claude.com/docs/en/hooks#taskcompleted",
"items": {
"$ref": "#/$defs/hookMatcher"
}
},
"Setup": {
"type": "array",
"description": "Hooks that run during repository initialization (--init, --init-only) or maintenance (--maintenance)",
"description": "UNDOCUMENTED. Hooks that run during repository initialization (--init, --init-only) or maintenance (--maintenance)",
"items": {
"$ref": "#/$defs/hookMatcher"
}
Expand Down Expand Up @@ -438,6 +493,10 @@
"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"
},
"allowManagedPermissionRulesOnly": {
"type": "boolean",
"description": "(Managed settings only) Prevent user and project settings from defining allow, ask, or deny permission rules. Only rules in managed settings apply. See https://code.claude.com/docs/en/settings"
},
"statusLine": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -960,6 +1019,11 @@
"description": "Show turn duration messages after responses (e.g., \"Cooked for 1m 6s\"). Set to false to hide these messages (default: true)",
"default": true
},
"prefersReducedMotion": {
"type": "boolean",
"description": "Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility",
"default": false
},
"alwaysThinkingEnabled": {
"type": "boolean",
"description": "Enable extended thinking by default for all sessions. Typically configured via the /config command rather than editing directly. See https://code.claude.com/docs/en/common-workflows#use-extended-thinking-thinking-mode"
Expand All @@ -972,6 +1036,12 @@
},
"description": "Company announcements to display at startup (one will be randomly selected if multiple are provided)"
},
"teammateMode": {
"type": "string",
"enum": ["auto", "in-process", "tmux"],
"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"
},
"pluginConfigs": {
"type": "object",
"additionalProperties": {
Expand Down
71 changes: 68 additions & 3 deletions src/test/claude-code-settings/hooks-complete.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
]
}
],
"PermissionRequest": [
{
"hooks": [
{
"command": "echo 'Permission requested' >> /tmp/claude-permissions.log",
"type": "command"
}
],
"matcher": "Bash"
}
],
"PostToolUse": [
{
"hooks": [
Expand All @@ -21,6 +32,16 @@
"matcher": "Edit"
}
],
"PostToolUseFailure": [
{
"hooks": [
{
"command": "echo 'Tool failure' >> /tmp/claude-errors.log",
"type": "command"
}
]
}
],
"PreCompact": [
{
"hooks": [
Expand Down Expand Up @@ -73,16 +94,38 @@
]
}
],
"Stop": [
"Setup": [
{
"hooks": [
{
"command": "echo 'Claude finished' | tee -a /tmp/claude-session.log",
"command": "echo 'Repository setup' >> /tmp/claude-setup.log",
"type": "command"
}
]
}
],
"Stop": [
{
"hooks": [
{
"prompt": "Check if all tasks are complete before stopping: $ARGUMENTS",
"timeout": 30,
"type": "prompt"
}
]
}
],
"SubagentStart": [
{
"hooks": [
{
"command": "echo 'Subagent spawned' >> /tmp/claude-subagent.log",
"type": "command"
}
],
"matcher": "Explore"
}
],
"SubagentStop": [
{
"hooks": [
Expand All @@ -92,7 +135,29 @@
"type": "command"
}
],
"matcher": "Task"
"matcher": "Explore"
}
],
"TaskCompleted": [
{
"hooks": [
{
"prompt": "Verify all tests pass and code meets requirements before marking task complete: $ARGUMENTS",
"timeout": 120,
"type": "agent"
}
]
}
],
"TeammateIdle": [
{
"hooks": [
{
"command": "npm test",
"timeout": 120,
"type": "command"
}
]
}
],
"UserPromptSubmit": [
Expand Down
4 changes: 4 additions & 0 deletions src/test/claude-code-settings/modern-complete-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"autoUpdatesChannel": "stable",
"cleanupPeriodDays": 60,
"disabledMcpjsonServers": ["untrusted-server"],
"effortLevel": "high",
"enableAllProjectMcpServers": true,
"env": {
"ANTHROPIC_MODEL": "claude-3-5-sonnet-20241022",
Expand Down Expand Up @@ -77,6 +78,7 @@
},
"includeCoAuthoredBy": true,
"language": "english",
"model": "opus",
"outputStyle": "Explanatory",
"permissions": {
"additionalDirectories": ["~/Documents/reference", "~/.config/claude-code"],
Expand Down Expand Up @@ -104,6 +106,7 @@
]
},
"plansDirectory": "./plans",
"prefersReducedMotion": false,
"respectGitignore": true,
"sandbox": {
"allowUnsandboxedCommands": false,
Expand All @@ -127,5 +130,6 @@
"mode": "append",
"verbs": ["Analyzing", "Building"]
},
"teammateMode": "auto",
"terminalProgressBarEnabled": true
}
2 changes: 2 additions & 0 deletions src/test/claude-code-settings/permissions-advanced.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"Grep",
"Read(~/projects/**)",
"Edit(~/projects/**)",
"ToolSearch",
"LSP",
"NotebookEdit",
"TodoWrite",
"WebFetch(domain:github.com)",
Expand Down