Skip to content

Commit fc9037b

Browse files
Add Claude Code settings.json schema (SchemaStore#4798)
* Add Claude Code settings.json schema - Add JSON schema for Claude Code settings.json file - Supports all settings properties including models, themes, permissions - Includes comprehensive test files covering edge cases - Matches **/.claude/settings.json files * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent f544174 commit fc9037b

14 files changed

+197
-0
lines changed

src/api/json/catalog.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,12 @@
11961196
"fileMatch": [".clawjectrc", ".clawjectrc.json"],
11971197
"url": "https://raw.githubusercontent.com/clawject/clawject/main/packages/core/src/config/schema.json"
11981198
},
1199+
{
1200+
"name": "Claude Code Settings",
1201+
"description": "Configuration file for Claude Code",
1202+
"fileMatch": ["**/.claude/settings.json"],
1203+
"url": "https://json.schemastore.org/claude-code-settings.json"
1204+
},
11991205
{
12001206
"name": "CVE Record Format",
12011207
"description": "CVE record format to describe security vulnerabilities",
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://json.schemastore.org/claude-code-settings.json",
4+
"$defs": {
5+
"rule": {
6+
"type": "string",
7+
"description": "Tool permission rule (e.g., 'Bash(ls:*)', 'Read(~/.zshrc)', 'WebFetch(domain:github.com)')",
8+
"pattern": "^(Agent|Bash|Edit|Glob|Grep|LS|MultiEdit|NotebookEdit|NotebookRead|Read|TodoRead|TodoWrite|WebFetch|WebSearch|Write)\\(?|^mcp__"
9+
}
10+
},
11+
"description": "Configuration file for Claude Code CLI settings",
12+
"allowTrailingCommas": true,
13+
"additionalProperties": true,
14+
"type": "object",
15+
"properties": {
16+
"$schema": {
17+
"type": "string",
18+
"description": "The schema for the settings.json file"
19+
},
20+
"apiKeyHelper": {
21+
"type": "string",
22+
"description": "Custom script path to generate an auth value"
23+
},
24+
"autoUpdaterStatus": {
25+
"type": "string",
26+
"description": "Enable or disable the auto-updater",
27+
"enum": ["enabled", "disabled"],
28+
"default": "enabled"
29+
},
30+
"cleanupPeriodDays": {
31+
"type": "number",
32+
"description": "How long to locally retain chat transcripts (in days)",
33+
"default": 30,
34+
"minimum": 0
35+
},
36+
"env": {
37+
"type": "object",
38+
"description": "Environment variables applied to every session",
39+
"additionalProperties": false,
40+
"patternProperties": {
41+
"^[A-Z_]+$": {
42+
"type": "string",
43+
"description": "Environment variable value"
44+
}
45+
},
46+
"default": {}
47+
},
48+
"includeCoAuthoredBy": {
49+
"type": "boolean",
50+
"description": "Include 'co-authored-by Claude' byline in git commits and pull requests",
51+
"default": true
52+
},
53+
"model": {
54+
"type": "string",
55+
"description": "Claude model to use",
56+
"enum": ["opus", "sonnet"]
57+
},
58+
"permissions": {
59+
"type": "object",
60+
"description": "Tool permissions",
61+
"additionalProperties": false,
62+
"properties": {
63+
"allow": {
64+
"type": "array",
65+
"description": "List of allowed tool rules",
66+
"items": { "$ref": "#/$defs/rule" },
67+
"uniqueItems": true
68+
},
69+
"deny": {
70+
"type": "array",
71+
"description": "List of denied tool rules",
72+
"items": { "$ref": "#/$defs/rule" },
73+
"uniqueItems": true
74+
}
75+
},
76+
"default": {
77+
"allow": [],
78+
"deny": []
79+
}
80+
},
81+
"preferredNotifChannel": {
82+
"type": "string",
83+
"description": "Preferred notification channel",
84+
"enum": [
85+
"iterm2",
86+
"iterm2_with_bell",
87+
"terminal_bell",
88+
"notifications_disabled"
89+
],
90+
"default": "iterm2"
91+
},
92+
"theme": {
93+
"type": "string",
94+
"description": "UI theme configuration",
95+
"enum": ["dark", "light", "light-daltonized", "dark-daltonized"]
96+
},
97+
"verbose": {
98+
"type": "boolean",
99+
"description": "Show full bash and command outputs",
100+
"default": false
101+
}
102+
}
103+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"model": "sonnet",
3+
"verbose": false
4+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"apiKeyHelper": "/usr/local/bin/claude-auth",
3+
"autoUpdaterStatus": "enabled",
4+
"cleanupPeriodDays": 30,
5+
"env": {
6+
"DEBUG_MODE": "true",
7+
"EDITOR": "vim"
8+
},
9+
"includeCoAuthoredBy": false,
10+
"model": "sonnet",
11+
"permissions": {
12+
"allow": [
13+
"Read(~/.zshrc)",
14+
"Bash(ls:*)",
15+
"Bash(git log:*)",
16+
"WebFetch(domain:anthropic.com)"
17+
],
18+
"deny": [
19+
"Bash(rm:*)",
20+
"Bash(curl:*)",
21+
"Bash(wget:*)",
22+
"WebFetch(domain:bad.actor.com)"
23+
]
24+
},
25+
"preferredNotifChannel": "iterm2",
26+
"theme": "dark",
27+
"verbose": false
28+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"apiKeyHelper": "",
3+
"cleanupPeriodDays": 0,
4+
"env": {},
5+
"permissions": {
6+
"allow": [],
7+
"deny": []
8+
}
9+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"env": {
3+
"DEBUG_LEVEL": "2",
4+
"EDITOR": "nano",
5+
"HOME_DIR": "/home/user",
6+
"PATH": "/usr/local/bin:/usr/bin:/bin"
7+
}
8+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"includeCoAuthoredBy": true,
3+
"model": "opus"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"preferredNotifChannel": "notifications_disabled",
3+
"verbose": true
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"preferredNotifChannel": "terminal_bell",
3+
"theme": "dark-daltonized"
4+
}

0 commit comments

Comments
 (0)