Performs initial configuration of a development host with a fixed sequence: setup proxy first, then configure pixi/uv/npm/bun global tooling, and finally configure Claude Code. Use only when explicitly invoked by name for first-time host bootstrap or full re-bootstrap.
Resources
3Install
npx skillscat add igamenovoer/magic-context/init-config-devbox Install via the SkillsCat registry.
SKILL.md
Initial development host configuration skill
Use this skill to run the full host configuration process in a repeatable way.
Activation
- This skill must be triggered manually by name:
init-config-devbox. - Do not auto-activate this skill for unrelated tasks.
Network policy
- Treat all network access as fallback.
- Prefer local assets first (
scripts/, existing binaries, local config/state). - Use network only when required inputs/tools are missing or explicitly requested.
- Proxy usage is controlled by
[proxy].candidate_listfrom selected TOML:- If
candidate_listis present and non-empty, use proxy-aware flow. - If
candidate_listis missing or empty, run all installation/configuration commands without proxy setup/sourcing.
- If
Inputs and references
- Proxy script:
scripts/setup-proxy.sh - Unified configuration file:
config.toml - Config schema:
config-schema.json - Vendored scripts:
scripts/- Refresh vendored scripts from raw GitHub URLs (no git checkout):
bash scripts/sync-from-lanren-ai.sh --ref main
- Refresh vendored scripts from raw GitHub URLs (no git checkout):
Configuration file selection:
- Allow user to specify an alternate TOML path (for example via prompt input or an explicit argument).
- If user does not provide a TOML path, fall back to the skill-accompanied file:
./config.toml
- Validate selected TOML against
./config-schema.jsonbefore applying changes.
Required execution order
1) Setup proxy (setup-proxy.sh and .bashrc)
- If
[proxy].candidate_listis present and non-empty, use accompanied local script first:install -m 0755 ./scripts/setup-proxy.sh "$HOME/setup-proxy.sh"
- If
[proxy].candidate_listis present and non-empty, ensure.bashrccontains proxy candidates in order:export PROXY_CANDIDATE_LIST="<candidate_list joined by comma>"- Do not hardcode host-specific proxy entries in this skill; use values from TOML or existing host
.bashrc.
- For proxy-required install operations, source first only when
[proxy].candidate_listis present and non-empty:source ~/setup-proxy.sh
- If
[proxy].candidate_listis missing or empty, skip proxy setup/sourcing entirely.
2) Configure/install pixi
Rules:
- If
[proxy].candidate_listis present and non-empty, source proxy before pixi install/update commands. - If
[proxy].candidate_listis missing or empty, run pixi commands directly without proxy sourcing. - Use global tool install:
pixi global install ... - Read channel priority from
[pixi].channel_priorityin TOML (do not hardcode channels in this skill). - If
[paths].pixi_cache_diris set and non-empty, redirect pixi/rattler cache via.bashrc:export PIXI_CACHE_DIR="<pixi_cache_dir>"export RATTLER_CACHE_DIR="<pixi_cache_dir>"
- If
[paths].pixi_cache_diris missing or empty, do not setPIXI_CACHE_DIR/RATTLER_CACHE_DIR; use Pixi/Rattler defaults.
Global tool set:
- Read from
[pixi].global_toolsin TOML (do not hardcode tool names in this skill).
Install command:
- If
[proxy].candidate_listis present and non-empty:source ~/setup-proxy.sh; pixi --no-progress global install <tools from [pixi].global_tools>
- If
[proxy].candidate_listis missing or empty:pixi --no-progress global install <tools from [pixi].global_tools>
3) Configure/install uv
Rules:
- If
[proxy].candidate_listis present and non-empty, source proxy before uv install/update commands. - If
[proxy].candidate_listis missing or empty, run uv commands directly without proxy sourcing. - Use global tool install:
uv tool install ... - If
[paths].uv_cache_diris set and non-empty, redirect uv cache via.bashrc:export UV_CACHE_DIR="<uv_cache_dir>"
- If
[paths].uv_cache_diris missing or empty, do not setUV_CACHE_DIR; use uv defaults.
Global tool set:
- Read from
[uv].global_toolsin TOML (do not hardcode tool names in this skill).
Install commands:
- If
[proxy].candidate_listis present and non-empty:source ~/setup-proxy.sh; uv tool install <each tool from [uv].global_tools>
- If
[proxy].candidate_listis missing or empty:uv tool install <each tool from [uv].global_tools>
4) Configure/install npm (skip bootstrap if already present)
Rules:
- If
npm --versionsucceeds, skip npm bootstrap installation. - If
[proxy].candidate_listis present and non-empty, source proxy before npm config/install operations. - If
[proxy].candidate_listis missing or empty, run npm config/install operations directly without proxy sourcing. - Configure npm mirror from TOML:
npm config set registry <[urls].npm_registry_mirror>
- Install global packages with latest policy:
- Read package list from
[npm].global_packagesand apply[npm].install_global/[npm].install_latest.
- Read package list from
Note:
- If no npm global package list is explicitly provided, only set registry/config and skip global installs.
5) Configure/install bun (skip bootstrap if already present)
Rules:
- If
bun --versionsucceeds, skip bun bootstrap installation. - If bootstrap is needed and
[proxy].candidate_listis present and non-empty, proxy may be used for bootstrap only. - If
[proxy].candidate_listis missing or empty, run bun bootstrap/install/update directly without proxy sourcing. - Install global packages with latest policy:
- Read package list from
[bun].global_packagesand apply[bun].install_global/[bun].install_latest.
- Read package list from
- Update globals:
bun update -g --latest
6) Configure Claude Code
Use local vendored scripts in scripts/claude-code-cli/.
Required outcomes:
- Skip login/onboarding enabled.
- Custom alias launcher created (read alias from
[claude].alias; do not hardcode alias in this skill). - Tavily MCP configured.
- Context7 MCP configured.
Credential policy:
- Read secrets and all configurable values from the selected TOML (user-provided TOML if specified, otherwise
./config.toml). - Do not write secrets into markdown docs.
Missing credential handling:
- For each required credential (
anthropic_api_key,tavily_api_key,context7_api_key), if the TOML value is empty or missing, explicitly ask the user how to proceed. - Offer exactly these choices per missing credential:
- Provide the credential value directly.
- Provide an environment variable name that already contains the credential.
- Refuse to provide it.
- If user provides a value or env reference, use it only for the current run unless the user explicitly asks to persist it.
- If user refuses to provide a credential, skip only the steps that require that credential and continue with all remaining applicable steps.
- Never block the full workflow due to one missing credential if unaffected steps can still run.
Credential-to-step mapping:
anthropic_api_keyis required forscripts/claude-code-cli/config-custom-api-key.sh.tavily_api_keyis required forscripts/claude-code-cli/config-tavily-mcp.sh.context7_api_keyis required only when applying Context7 API key viaclaude mcp add-json;scripts/claude-code-cli/config-context7-mcp.shcan still run.
Execution sequence (using vendored scripts):
sh scripts/claude-code-cli/config-skip-login.shsh scripts/claude-code-cli/config-custom-api-key.sh --alias-name <alias> --api-key <claude_api_key>sh scripts/claude-code-cli/config-tavily-mcp.sh --api-key <tavily_api_key>sh scripts/claude-code-cli/config-context7-mcp.sh- Then ensure Context7 key is applied in MCP env via
claude mcp add-jsonif needed.
Verification checklist
- Proxy selection works:
source ~/setup-proxy.sh - Pixi tools present:
pixi global list - uv tools present:
uv tool list - npm available and configured:
npm --versionandnpm config get registry - bun globals present:
bun pm -g ls - Claude onboarding skipped:
~/.claude.jsoncontainshasCompletedOnboarding=true - Claude MCP healthy:
claude mcp listshowstavilyandcontext7
Documentation requirements
- Keep all credentials only in the selected TOML (fallback:
./config.toml). - Store non-secret execution notes in your current task output/logs; do not duplicate secrets in docs.