Flip postprovision default: don't write .vscode/settings.json unless CLAUDE_WRITE_VSCODE_SETTINGS=1#29
Merged
Conversation
…CLAUDE_WRITE_VSCODE_SETTINGS=1 (#28) Follow-up to #25 / #26. The starter's primary consumers (Anthropic SDK users, Claude Code CLI users, OpenAI-compatible-client users) don't need .vscode/settings.json; only the Anthropic Claude Code VS Code extension does, and that's a niche. azd up writing into the workspace by default is surprising for the majority. Flip it: skip by default, opt in with CLAUDE_WRITE_VSCODE_SETTINGS=1 (or -WriteVsCodeSettings / --write-vscode-settings).\n\nKeeps CLAUDE_SKIP_VSCODE_SETTINGS, -SkipVsCodeSettings, and --skip-vscode-settings as deprecated no-ops so anyone who already set them after #26 doesn't break. Skipping is the default now anyway.\n\nUpdated README post-deploy section (step 2 marked Opt-in, lead-in line no longer claims the hook writes the file), copilot-instructions env-var table, and SKILL.md MODIFY table.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #28. Follow-up to #25 / #26.
Flips the default behavior of the postprovision hook: by default it no longer writes
.vscode/settings.json. Users who want the Anthropic Claude Code VS Code extension wired up automatically can opt in withCLAUDE_WRITE_VSCODE_SETTINGS=1.Why
The starter's primary consumers are people building with the Anthropic SDK, calling Foundry from Copilot Chat / AI Toolkit, or running the Claude Code CLI (which only needs the
claude-code.env.{ps1,sh}activator at the repo root — no.vscode/settings.jsonrequired). The VS Code extension is a niche layered on top.azd upwriting into the workspace by default is surprising for the majority and only benefits the minority, so flipping the default is the right call.Usage
azd env set CLAUDE_WRITE_VSCODE_SETTINGS 1 azd upOr pass
-WriteVsCodeSettings/--write-vscode-settingswhen re-running the script standalone.When the user has not opted in, the script now prints:
And the closing banner adapts: if
.vscode/settings.jsonwas written, it points the user at the extension. If not, it shows the opt-in command.Backward compat
CLAUDE_SKIP_VSCODE_SETTINGS,-SkipVsCodeSettings, and--skip-vscode-settings(all from #26) are kept as deprecated no-ops so anyone who already set them doesn't break. Skipping is the default now anyway.Changes
scripts/configure-claude-code.ps1-WriteVsCodeSettingsswitch +CLAUDE_WRITE_VSCODE_SETTINGSenv var (matches1/true/yes/on).-SkipVsCodeSettingskept as deprecated no-op. Default flow: skip with opt-in hint.scripts/configure-claude-code.sh--write-vscode-settingsflag +CLAUDE_WRITE_VSCODE_SETTINGSenv var.--skip-vscode-settings/CLAUDE_SKIP_VSCODE_SETTINGSkept as deprecated no-ops.README.md.vscode/settings.json..github/copilot-instructions.mdCLAUDE_SKIP_VSCODE_SETTINGSrow withCLAUDE_WRITE_VSCODE_SETTINGSrow in the env-var contract table.skills/claude-on-foundry/SKILL.md.vscode/settings.jsonwrite" MODIFY-table row with "Wire up the Claude Code VS Code extension".Verification
Local tests on Windows / pwsh and Windows / git-bash — all 6 paths behave correctly:
.vscode/settings.jsonwritten?.ps1default.ps1+CLAUDE_WRITE_VSCODE_SETTINGS=1.ps1+ deprecatedCLAUDE_SKIP_VSCODE_SETTINGS=1.shdefault.sh+CLAUDE_WRITE_VSCODE_SETTINGS=1.sh+ deprecatedCLAUDE_SKIP_VSCODE_SETTINGS=1-SkipVsCodeSettings/--skip-vscode-settingsflags also still parse cleanly (exit 0) so existing CI / docs that pass them don't break.