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