Skip to content

Move machine-specific Claude settings out of the shared config - #11961

Open
Yornik wants to merge 4 commits into
mendix:developmentfrom
Yornik:claude-settings-shared-vs-local
Open

Yornik wants to merge 4 commits into
mendix:developmentfrom
Yornik:claude-settings-shared-vs-local

Conversation

@Yornik

@Yornik Yornik commented Sep 24, 2026

Copy link
Copy Markdown
Member

Context

This addresses the #docs thread about whether .claude/ belongs in .gitignore.

Both positions in that thread are right, because they are about different files. Skills are not in settings.json. They are seven standalone tracked files, and they keep shipping to everyone who clones the repo no matter what happens here:

.claude/skills/docs-{add,alt-text,enhance,polish,pr-review,proofread,review}/SKILL.md
.claude/hooks/{validate-bash-command,audit-log}.sh
.claude/rules/{aws,security}.md
.claude/scripts/resolve-doc-url.sh
.claude/statusline.sh
CLAUDE.md

So gitignoring .claude/ is not the answer — that would unshare the skills, which is exactly what we want to keep. Only one part of settings.json causes the problem, and this PR moves just that part.

What breaks today

The env block pinned values that are specific to one machine:

Key Problem
AWS_PROFILE: my-sandbox Anyone whose profile has a different name gets credential failures
CLAUDE_CODE_USE_BEDROCK: 1 Forces Bedrock on contributors not using it
ANTHROPIC_MODEL + 4 more model IDs Pinned to claude-sonnet-4-6 / claude-opus-4-8; goes stale every release
MAX_THINKING_TOKENS: 1024 Throttles reasoning for every contributor
CLAUDE_CODE_MAX_OUTPUT_TOKENS: 10240 Caps output for every contributor
OTEL_METRICS_EXPORTER: otlp No effect, since telemetry is disabled two lines above

The last two are the least visible and probably the most damaging: they quietly degrade the agent for everyone.

What changed

  • Moved those keys to a new .claude/settings.local.json.example. Copy it to .claude/settings.local.json, which is already gitignored and takes precedence over the shared file. Nothing is lost — the Bedrock setup is still one cp away.
  • Kept the telemetry opt-out in the shared file, since it is machine-neutral.
  • Nested the permission rules under permissions. They were top-level allow and deny keys. The documented schema is "permissions": { "allow": [...], "deny": [...] } and no top-level form exists, so the deny list was almost certainly inert — meaning the sudo, kubectl apply, terraform apply, and rm -rf / guards were not actually blocking anything, while .claude/rules/security.md states that guardrails are mandatory. Worth confirming with /permissions after merge.

All 81 deny and 69 allow entries are byte-identical, verified programmatically; only the nesting changed. Hooks and status line are untouched. Both files parse as valid JSON.

Note for reviewers

check-claude-settings.yml fails any PR touching .claude/** unless the author is on its tech-writer allowlist, so this PR will go red and post the standard warning comment. That gate is working as intended — this change does need TW sign-off, which is why it is a separate PR from the docs work rather than bundled in.

The permissions nesting fix is arguably the more urgent half. Happy to split it into its own PR if you would rather land that first and discuss the env question separately.

🤖 Generated with Claude Code

The shared .claude/settings.json pinned an AWS profile, forced Bedrock,
and hard-coded five model IDs. Those values are specific to one machine,
so every other contributor inherits a profile that does not exist for
them and a model set that goes stale on each release. It also set
MAX_THINKING_TOKENS to 1024 and CLAUDE_CODE_MAX_OUTPUT_TOKENS to 10240,
which throttles reasoning and output for everyone who clones the repo.

Move those values to a new .claude/settings.local.json.example template.
Contributors copy it to .claude/settings.local.json, which is already
gitignored and takes precedence over the shared file. Keep the telemetry
opt-out, which is machine-neutral.

Also nest the permission rules under a "permissions" object. The rules
were top-level "allow" and "deny" keys, which is not the schema Claude
Code documents, so the deny list was not taking effect. All 81 deny and
69 allow entries are unchanged, as are the hooks and the status line.

Skills, hooks, rules, scripts, and the status line are separate tracked
files and continue to ship to everyone who clones the repo.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
MarkvanMents and others added 3 commits October 2, 2026 13:35
Remove the default AWS_PROFILE reference from the check-claude-settings
workflow and link to settings.local.json.example instead of an inline
code block. Update the settings comment, example file, and AI tools page
to match.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Describe what the shared Claude settings contain, note that the example
local settings target Bedrock, and add a section on truncated output.
Add a GitHub Copilot section. Update the example file to current model
IDs and drop the token limit keys.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Make the GitHub Copilot section an H3 under Using AI Assistants, note
that Copilot users use prompt files instead of skills, clarify the
provider setup sentence, and name model selection in the workflow
comment.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants