plugins/claude-ecosystem/skills/sync-environment-variables/SKILL.md
Add missing environment variable defaults to settings.json or settings.local.json
npx skillsauth add melodic-software/claude-code-plugins sync-environment-variablesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Add missing environment variable entries with explicit defaults to settings files.
| Argument | Description |
|----------|-------------|
| --target project | Update .claude/settings.json (default) |
| --target local | Update .claude/settings.local.json |
| --dry-run | Show changes without modifying files |
| --include-undocumented | Include changelog/discovered vars (not just official) |
Run environment variable discovery using the same process as list-environment-variables:
docs-management skill for official documentation--include-undocumented, spawn MCP research agentsCollect all discovered variables with their default values.
Determine target file based on --target argument:
| Target | File Path |
|--------|-----------|
| project (default) | .claude/settings.json |
| local | .claude/settings.local.json |
Read the target file. If it doesn't exist:
project: Create new file with basic structurelocal: Create new file (this is gitignored)Parse the current env section (if present).
For each discovered environment variable, categorize:
| Category | Criteria | Action |
|----------|----------|--------|
| MISSING | Not in current settings, has known default | Add to settings |
| EXISTS | Already in current settings | Skip (preserve user value) |
| USER-SPECIFIC | No universal default (e.g., API keys) | Skip, report only |
| CUSTOM | CLAUDE_HOOK_* or repo-specific | Never touch |
These variables have known, safe defaults:
{
"env": {
"DISABLE_AUTOUPDATER": "0",
"DISABLE_TELEMETRY": "0",
"CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR": "0",
"CLAUDE_CODE_SKIP_EXT_PROMPT": "0"
}
}
ANTHROPIC_API_KEY - User-specific, no defaultCLAUDE_CODE_USE_BEDROCK - Provider choice, user decisionCLAUDE_CODE_USE_VERTEX - Provider choice, user decisionAWS_* - AWS credentials, user-specificGOOGLE_* - Google credentials, user-specificHTTP_PROXY / HTTPS_PROXY - Network-specificCLAUDE_HOOK_* - Repository-specific hook variablesDisplay what will be added:
## Environment Variable Sync Preview
### Target: .claude/settings.json
### Variables to Add
| Variable | Default | Reason |
|----------|---------|--------|
| DISABLE_AUTOUPDATER | "0" | Official default, not in current settings |
| ... | ... | ... |
### Variables Skipped (Already Set)
| Variable | Current Value |
|----------|---------------|
| DISABLE_TELEMETRY | "1" |
| ... | ... |
### Variables Skipped (No Safe Default)
| Variable | Reason |
|----------|--------|
| ANTHROPIC_API_KEY | User-specific, no universal default |
| ... | ... |
Unless --dry-run is specified, ask for confirmation:
AskUserQuestion:
question: "Apply these changes to settings?"
options:
- "Yes, apply changes"
- "No, abort"
- "Show me the full file preview first"
If --dry-run, stop here and report "Dry run complete. No changes made."
env section{
"env": {
"CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR": "0",
"DISABLE_AUTOUPDATER": "0",
"DISABLE_TELEMETRY": "0"
}
}
If file has other sections (permissions, hooks, etc.), preserve them.
| Error | Action | |-------|--------| | Target file not valid JSON | Report error, do not modify | | Write permission denied | Report error with path | | Discovery failed | Report partial results, ask to continue |
After applying changes:
## Sync Complete
**Target:** .claude/settings.json
### Added (3 variables)
- CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR = "0"
- DISABLE_AUTOUPDATER = "0"
- CLAUDE_CODE_SKIP_EXT_PROMPT = "0"
### Preserved (1 variable)
- DISABLE_TELEMETRY = "1" (user-set value kept)
### Skipped (2 variables)
- ANTHROPIC_API_KEY (no safe default)
- CLAUDE_CODE_USE_BEDROCK (provider choice)
**File validated:** JSON syntax OK
development
Search Milan Jovanovic's .NET blog for Clean Architecture, DDD, CQRS, EF Core, and ASP.NET Core patterns. Use for finding applicable patterns, code examples, and architecture guidance. Invoke when working with .NET projects that could benefit from proven architectural patterns.
tools
Install and configure Data API Builder (DAB) for production SQL Server MCP access with RBAC
tools
Manage MssqlMcp servers - status, rebuild, and upstream updates
tools
Developer environment setup guides for Windows, macOS, Linux, and WSL. Use when setting up development machines, installing tools, configuring environments, or following platform-specific setup guides. Covers package management, shell/terminal, code editors, AI tooling, containerization, databases, and more.