User Env Deployer
Overview
Use this skill when the user wants an agent to install or align a local terminal environment, especially zsh, oh-my-zsh, tmux, and related dotfiles. The goal is to inspect the current machine, choose the correct package/install path, patch existing shell files safely, verify the result, and leave behind a portable record the user can reuse elsewhere.
Load references/dotfile-templates.md when you need the default ~/.zshrc, ~/.tmux.conf, platform package-manager mapping, or verification commands.
Workflow
1. Ground in the current machine
- Detect OS and package manager before proposing commands.
- Inspect existing dotfiles before changing them:
~/.zshrc
~/.zprofile
~/.tmux.conf
~/.oh-my-zsh
- Check whether
tmux, zsh, and oh-my-zsh are already present.
- If the request references another repo or container setup, inspect that source first and extract the actual shell-management pattern instead of guessing.
- For SGLang Docker parity, use
docker/configs/.zshrc for shell init and docker/configs/opt/.tmux.conf for tmux, not the generic fallback template.
2. Choose the deployment shape
- Preserve existing user bootstrap lines unless they are clearly obsolete or the user asked for replacement.
- Default to manual tmux launch rather than auto-attaching from every interactive shell.
- If
oh-my-zsh is absent and the user wants parity with an oh-my-zsh-based environment, install it and make ~/.zshrc load it explicitly.
- Keep shell init conservative:
- avoid aggressive auto-start logic
- avoid replacing unrelated aliases or exports
- avoid moving login-shell behavior into the wrong startup file
3. Apply dotfile changes
- Use additive, readable dotfiles.
- For
~/.zshrc:
- keep the user’s existing bootstrap lines near the top
- set
ZSH="$HOME/.oh-my-zsh" when oh-my-zsh is installed
- if matching SGLang, prefer
robbyrussell with git z zsh-autosuggestions zsh-syntax-highlighting
- add only the aliases and history settings that the referenced environment actually uses
- do not add tmux auto-start or helper functions unless the user asked for them
- For
~/.tmux.conf:
- if matching SGLang, mirror its pane/status styling, backtick prefix, vi copy mode, and
-/= split bindings
- if matching SGLang, note that its copy binding expects a
yank helper on PATH
- otherwise use a conservative fallback with mouse support, history limit, low escape time, and cwd-preserving splits
4. Verify behavior
- Confirm installs with version or presence checks.
- Start an interactive
zsh and verify the expected helper function or alias exists.
- Create a disposable tmux session, load the config, list sessions, and clean up.
- If verification fails inside a restricted sandbox, rerun the relevant checks unsandboxed and record the sandbox caveat.
5. Export a reusable record
- When the user wants portability, write a Markdown file that captures:
- platform and package manager
- source inspiration, if any
- deployment plan
- commands actually run
- final dotfile contents
- verification commands
- portability notes for Linux and Windows/WSL
Guardrails
- Never overwrite user dotfiles blindly without first reading them.
- Do not assume Homebrew,
apt, dnf, or pacman; detect what is available.
- Treat
oh-my-zsh as optional unless the user explicitly wants it or the reference environment depends on it.
- Prefer the referenced environment's plugin set. Do not add extra prompt frameworks or plugin managers beyond the user request.
- If tmux socket creation fails in sandboxed verification, treat it as an environment constraint, not immediately as a config failure.
Expected Outputs
- Updated shell dotfiles with minimal unrelated churn.
- Working
tmux installation and helper command.
- A short verification summary.
- Optional Markdown handoff document for reproducing the environment on other machines.
1---2name: user-env-deployer3description: Deploy or align a user's local shell environment, especially zsh, oh-my-zsh, tmux, and dotfiles. Use when the user wants terminal setup, dev-container shell parity, or reproducible workstation environment configuration across platforms.4---56# User Env Deployer78## Overview910Use this skill when the user wants an agent to install or align a local terminal environment, especially `zsh`, `oh-my-zsh`, `tmux`, and related dotfiles. The goal is to inspect the current machine, choose the correct package/install path, patch existing shell files safely, verify the result, and leave behind a portable record the user can reuse elsewhere.1112Load [references/dotfile-templates.md](./references/dotfile-templates.md) when you need the default `~/.zshrc`, `~/.tmux.conf`, platform package-manager mapping, or verification commands.1314## Workflow1516### 1. Ground in the current machine1718- Detect OS and package manager before proposing commands.19- Inspect existing dotfiles before changing them:20 - `~/.zshrc`21 - `~/.zprofile`22 - `~/.tmux.conf`23 - `~/.oh-my-zsh`24- Check whether `tmux`, `zsh`, and `oh-my-zsh` are already present.25- If the request references another repo or container setup, inspect that source first and extract the actual shell-management pattern instead of guessing.26- For SGLang Docker parity, use `docker/configs/.zshrc` for shell init and `docker/configs/opt/.tmux.conf` for tmux, not the generic fallback template.2728### 2. Choose the deployment shape2930- Preserve existing user bootstrap lines unless they are clearly obsolete or the user asked for replacement.31- Default to manual tmux launch rather than auto-attaching from every interactive shell.32- If `oh-my-zsh` is absent and the user wants parity with an `oh-my-zsh`-based environment, install it and make `~/.zshrc` load it explicitly.33- Keep shell init conservative:34 - avoid aggressive auto-start logic35 - avoid replacing unrelated aliases or exports36 - avoid moving login-shell behavior into the wrong startup file3738### 3. Apply dotfile changes3940- Use additive, readable dotfiles.41- For `~/.zshrc`:42 - keep the user’s existing bootstrap lines near the top43 - set `ZSH="$HOME/.oh-my-zsh"` when `oh-my-zsh` is installed44 - if matching SGLang, prefer `robbyrussell` with `git z zsh-autosuggestions zsh-syntax-highlighting`45 - add only the aliases and history settings that the referenced environment actually uses46 - do not add tmux auto-start or helper functions unless the user asked for them47- For `~/.tmux.conf`:48 - if matching SGLang, mirror its pane/status styling, backtick prefix, vi copy mode, and `-`/`=` split bindings49 - if matching SGLang, note that its copy binding expects a `yank` helper on `PATH`50 - otherwise use a conservative fallback with mouse support, history limit, low escape time, and cwd-preserving splits5152### 4. Verify behavior5354- Confirm installs with version or presence checks.55- Start an interactive `zsh` and verify the expected helper function or alias exists.56- Create a disposable tmux session, load the config, list sessions, and clean up.57- If verification fails inside a restricted sandbox, rerun the relevant checks unsandboxed and record the sandbox caveat.5859### 5. Export a reusable record6061- When the user wants portability, write a Markdown file that captures:62 - platform and package manager63 - source inspiration, if any64 - deployment plan65 - commands actually run66 - final dotfile contents67 - verification commands68 - portability notes for Linux and Windows/WSL6970## Guardrails7172- Never overwrite user dotfiles blindly without first reading them.73- Do not assume Homebrew, `apt`, `dnf`, or `pacman`; detect what is available.74- Treat `oh-my-zsh` as optional unless the user explicitly wants it or the reference environment depends on it.75- Prefer the referenced environment's plugin set. Do not add extra prompt frameworks or plugin managers beyond the user request.76- If tmux socket creation fails in sandboxed verification, treat it as an environment constraint, not immediately as a config failure.7778## Expected Outputs7980- Updated shell dotfiles with minimal unrelated churn.81- Working `tmux` installation and helper command.82- A short verification summary.83- Optional Markdown handoff document for reproducing the environment on other machines.