Non-negotiable rules:
- Detect the actual stack from repository files before recommending any command.
- Read existing
.claude/settings.json, .claude/settings.local.json, and .mcp.json before proposing changes.
- Only include commands and integrations for tools actually detected in the project.
- Exclude destructive system commands, absolute paths, and user-specific paths.
- Get explicit user approval before writing any settings file.
Update Claude Settings
Inputs
$request: Optional guidance such as local vs shared settings, stack hints, or requested integrations
Goal
Generate a credible settings update by:
- detecting the real toolchain and frameworks
- comparing that stack against current Claude settings
- proposing only the needed command permissions, domains, and MCP integrations
- getting approval before writing
- validating the resulting JSON files
Step 0: Resolve target mode
Determine what the user wants to update:
.claude/settings.local.json
.claude/settings.json
.mcp.json
- audit-only recommendations without writing
Default behavior:
- prefer
.claude/settings.local.json for user-local permissions
- use
.claude/settings.json only when the user explicitly wants shared project settings
- update
.mcp.json only when detected integrations justify it
Success criteria: The target files and whether this is audit-only or write mode are explicit.
Step 1: Detect the real stack
Inspect the repository root and relevant config files to identify:
- languages
- package managers
- frameworks
- build tools
- monorepo shape
- service integrations
- project-local CLIs or infrastructure tools
Load references/stack-detection.md for indicator files and detection rules.
Rules:
- detect from real files, not assumptions
- prefer lock files over guesses for package manager selection
- use dependency manifests to confirm frameworks and integrations
- if the repo is effectively empty, stop and ask the user for the intended stack instead of fabricating settings
Success criteria: The detected stack is explicit and supported by real files.
Step 2: Read current settings and identify gaps
Read existing:
.claude/settings.json
.claude/settings.local.json
.mcp.json
Capture:
- currently allowed commands
- denies or user customizations that must be preserved
- stale commands for tools no longer present
- missing commands for tools that are present
Rules:
- do not overwrite existing settings blindly
- preserve user intent where possible
- keep shared vs local settings distinct
Success criteria: The current config state and the gap against the detected stack are understood.
Step 3: Build recommendations
Build the recommendation set from:
- baseline safe commands
- stack-specific commands
- package-manager-specific commands
- framework-specific commands
- documentation domains
- MCP suggestions for detected services
Load:
references/command-catalog.md for command selection
references/webfetch-and-mcp.md for domains and MCP suggestions
references/output-contract.md for output structure and file-target rules
Rules:
- only include commands for detected tools
- include the correct development commands Claude actually needs, not just read-only inspection commands
- exclude competing package-manager commands unless multiple managers are truly present
- do not suggest GitHub MCP; use
gh CLI instead
Success criteria: The recommendation set matches the detected stack and contains no stale or unsafe entries.
Step 4: Present the recommendation and confirm
Before writing, present:
- detected stack summary
- target files
- recommended command categories
- domains and MCP suggestions
- additions, removals, and unchanged areas when current settings already exist
Use AskUserQuestion if the user needs to choose between:
- local vs shared settings
- audit-only vs apply
- selective vs full application
Do not write until the user explicitly approves the update.
Success criteria: The user has approved the intended settings changes.
Step 5: Write the approved files
Apply the minimal correct edit to the approved targets.
Rules:
- preserve existing customizations unless they directly conflict with detected reality
- keep local settings local and shared settings shared
- write
.mcp.json only when there is a concrete detected integration or an explicit user request
- do not introduce comments into JSON files
Success criteria: The approved settings changes are written to the correct files.
Step 6: Verify and report
Verify:
- each written JSON file parses correctly
- command permissions match the detected stack
- no destructive/system-level commands slipped in
- package-manager permissions match the real lock files
- target files are the ones the user approved
Report:
- detected stack
- files written or left unchanged
- command/domain/integration counts
- any preserved customizations or unresolved ambiguities
Success criteria: The user can see exactly what changed and the files are valid.
Guardrails
- Do not let the model invoke this skill proactively; it mutates durable config.
- Do not add
context: fork; this workflow edits the active repository.
- Do not add
paths:; this is a generic maintenance skill.
- Do not keep giant command tables, framework matrices, or long failure catalogs inline in
SKILL.MD.
- Do not add commands for undetected tools.
- Do not include destructive system commands, absolute paths, or user-specific paths.
- Do not write any file without explicit approval.
When To Load References
references/stack-detection.md
Use for lock-file, framework, service, and monorepo detection.
references/command-catalog.md
Use for baseline commands, stack-specific commands, and package-manager exclusion rules.
references/webfetch-and-mcp.md
Use for documentation domains and MCP server suggestion rules.
references/output-contract.md
Use for output format, target-file selection, merge policy, and verification requirements.
Output Contract
Report:
- detected stack summary
- target files
- recommended additions, removals, and unchanged areas
- whether files were written or only audited
- JSON verification results and any unresolved ambiguities
1---2name: update-claude-settings3description: Generate or update Claude Code settings from the project's REAL stack, not a generic allowlist — `.claude/settings.local.json`, `.claude/settings.json`, and `.mcp.json`. Detects the real toolchain and frameworks from lock files and manifests, diffs that against current settings, and proposes only the command permissions, doc domains, and MCP integrations the detected tools justify. User-only maintenance workflow that mutates durable config: every entry is EVIDENCE-driven (detected tools only), destructive, absolute, and user-specific paths are excluded, existing customizations are preserved, and nothing is written without explicit approval. Use to audit or refresh Claude settings for the current repo.4---5
6<EXTREMELY-IMPORTANT>
7This skill updates durable Claude configuration and must stay evidence-driven.
8
9Non-negotiable rules:
101. Detect the actual stack from repository files before recommending any command.
112. Read existing `.claude/settings.json`, `.claude/settings.local.json`, and `.mcp.json` before proposing changes.
123. Only include commands and integrations for tools actually detected in the project.
134. Exclude destructive system commands, absolute paths, and user-specific paths.
145. Get explicit user approval before writing any settings file.
15</EXTREMELY-IMPORTANT>
16
17# Update Claude Settings
18
19## Inputs
20
21- `$request`: Optional guidance such as local vs shared settings, stack hints, or requested integrations
22
23## Goal
24
25Generate a credible settings update by:
26
27- detecting the real toolchain and frameworks
28- comparing that stack against current Claude settings
29- proposing only the needed command permissions, domains, and MCP integrations
30- getting approval before writing
31- validating the resulting JSON files
32
33## Step 0: Resolve target mode
34
35Determine what the user wants to update:
36
37- `.claude/settings.local.json`
38- `.claude/settings.json`
39- `.mcp.json`
40- audit-only recommendations without writing
41
42Default behavior:
43
44- prefer `.claude/settings.local.json` for user-local permissions
45- use `.claude/settings.json` only when the user explicitly wants shared project settings
46- update `.mcp.json` only when detected integrations justify it
47
48**Success criteria**: The target files and whether this is audit-only or write mode are explicit.
49
50## Step 1: Detect the real stack
51
52Inspect the repository root and relevant config files to identify:
53
54- languages
55- package managers
56- frameworks
57- build tools
58- monorepo shape
59- service integrations
60- project-local CLIs or infrastructure tools
61
62Load `references/stack-detection.md` for indicator files and detection rules.
63
64Rules:
65
66- detect from real files, not assumptions
67- prefer lock files over guesses for package manager selection
68- use dependency manifests to confirm frameworks and integrations
69- if the repo is effectively empty, stop and ask the user for the intended stack instead of fabricating settings
70
71**Success criteria**: The detected stack is explicit and supported by real files.
72
73## Step 2: Read current settings and identify gaps
74
75Read existing:
76
77- `.claude/settings.json`
78- `.claude/settings.local.json`
79- `.mcp.json`
80
81Capture:
82
83- currently allowed commands
84- denies or user customizations that must be preserved
85- stale commands for tools no longer present
86- missing commands for tools that are present
87
88Rules:
89
90- do not overwrite existing settings blindly
91- preserve user intent where possible
92- keep shared vs local settings distinct
93
94**Success criteria**: The current config state and the gap against the detected stack are understood.
95
96## Step 3: Build recommendations
97
98Build the recommendation set from:
99
100- baseline safe commands
101- stack-specific commands
102- package-manager-specific commands
103- framework-specific commands
104- documentation domains
105- MCP suggestions for detected services
106
107Load:
108
109- `references/command-catalog.md` for command selection
110- `references/webfetch-and-mcp.md` for domains and MCP suggestions
111- `references/output-contract.md` for output structure and file-target rules
112
113Rules:
114
115- only include commands for detected tools
116- include the correct development commands Claude actually needs, not just read-only inspection commands
117- exclude competing package-manager commands unless multiple managers are truly present
118- do not suggest GitHub MCP; use `gh` CLI instead
119
120**Success criteria**: The recommendation set matches the detected stack and contains no stale or unsafe entries.
121
122## Step 4: Present the recommendation and confirm
123
124Before writing, present:
125
126- detected stack summary
127- target files
128- recommended command categories
129- domains and MCP suggestions
130- additions, removals, and unchanged areas when current settings already exist
131
132Use `AskUserQuestion` if the user needs to choose between:
133
134- local vs shared settings
135- audit-only vs apply
136- selective vs full application
137
138Do not write until the user explicitly approves the update.
139
140**Success criteria**: The user has approved the intended settings changes.
141
142## Step 5: Write the approved files
143
144Apply the minimal correct edit to the approved targets.
145
146Rules:
147
148- preserve existing customizations unless they directly conflict with detected reality
149- keep local settings local and shared settings shared
150- write `.mcp.json` only when there is a concrete detected integration or an explicit user request
151- do not introduce comments into JSON files
152
153**Success criteria**: The approved settings changes are written to the correct files.
154
155## Step 6: Verify and report
156
157Verify:
158
159- each written JSON file parses correctly
160- command permissions match the detected stack
161- no destructive/system-level commands slipped in
162- package-manager permissions match the real lock files
163- target files are the ones the user approved
164
165Report:
166
167- detected stack
168- files written or left unchanged
169- command/domain/integration counts
170- any preserved customizations or unresolved ambiguities
171
172**Success criteria**: The user can see exactly what changed and the files are valid.
173
174## Guardrails
175
176- Do not let the model invoke this skill proactively; it mutates durable config.
177- Do not add `context: fork`; this workflow edits the active repository.
178- Do not add `paths:`; this is a generic maintenance skill.
179- Do not keep giant command tables, framework matrices, or long failure catalogs inline in `SKILL.MD`.
180- Do not add commands for undetected tools.
181- Do not include destructive system commands, absolute paths, or user-specific paths.
182- Do not write any file without explicit approval.
183
184## When To Load References
185
186- `references/stack-detection.md`
187 Use for lock-file, framework, service, and monorepo detection.
188
189- `references/command-catalog.md`
190 Use for baseline commands, stack-specific commands, and package-manager exclusion rules.
191
192- `references/webfetch-and-mcp.md`
193 Use for documentation domains and MCP server suggestion rules.
194
195- `references/output-contract.md`
196 Use for output format, target-file selection, merge policy, and verification requirements.
197
198## Output Contract
199
200Report:
201
2021. detected stack summary
2032. target files
2043. recommended additions, removals, and unchanged areas
2054. whether files were written or only audited
2065. JSON verification results and any unresolved ambiguities