← ClaudeAtlas

project-switchlisted

Switch between registered projects in the same terminal. Use with /project-switch.
AirMile/claude-config · ★ 0 · AI & Automation · score 75
Install: claude install-skill AirMile/claude-config
# Project Switch Shows a list of all git repos in `{projects_root}` plus any `extra_paths` bookmarks (vaults, scratch dirs, etc.), and automatically switches to the chosen project by closing the current session and starting a new one in the same terminal tab. ## Trigger `/project-switch` or `/project-switch [name]` ## Why a new session Claude Code has two CWD levels: - **Harness-CWD** (fixed at session start) — determines which `CLAUDE.md`, `.claude/settings.local.json` permissions, and `.claude/`-symlinks (skills/agents/hooks) are loaded, and what the UI shows as the active project. - **Bash-subshell-CWD** (changes with `cd`) — only relevant for shell commands, does not load project context. Switching via `cd` in a Bash call works for commands but does not load project context. Starting a new session via `/exit` + `cd <path> && claude` moves the entire harness along. ## Process ### PHASE 0: Pre-flight **Detect platform:** ```bash case "$(uname -s)" in Darwin*) PLATFORM="macos" ;; Linux*) PLATFORM="linux" ;; MINGW*|MSYS*|CYGWIN*) PLATFORM="windows" ;; *) PLATFORM="windows" ;; esac ``` **Resolve `{projects_root}`** in this order (first match wins): 1. Env var `CLAUDE_PROJECTS_ROOT` 2. `paths.local.yaml` in current project (if present) 3. `skills/project-add/paths.yaml` defaults for the platform **Validation:** - `{projects_root}` exists as a directory → otherwise: error message with instruction to set env var or `path