# Switch

> Switch Claude Code to a different project folder with full context reload

- **Type:** Skill
- **Install:** `agentstack add skill-theaichimera-claude-code-project-intelligence-switch`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [theaichimera](https://agentstack.voostack.com/s/theaichimera)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [theaichimera](https://github.com/theaichimera)
- **Source:** https://github.com/theaichimera/claude-code-project-intelligence/tree/main/skills/switch

## Install

```sh
agentstack add skill-theaichimera-claude-code-project-intelligence-switch
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# /switch - Switch Project Context

Switch to a different project folder. Claude exits and restarts in the target folder with that project's full context (progressions, sessions, preferences) loaded automatically.

## Usage

`/switch `

## Instructions

When the user invokes `/switch`:

1. **Resolve the target project:**

```bash
${CLAUDE_PLUGIN_ROOT:-~/.claude/project-intelligence}/bin/pi-switch "$ARGUMENTS"
```

This writes the target folder to `~/.claude/.switch-target`.

2. **Confirm the switch to the user:**

Tell them: "Switching to [project]. Exiting now — Claude will restart in the new folder."

3. **Exit the session.** The shell wrapper (`cc` function) will detect the switch target, `cd` to the folder, and relaunch Claude automatically.

**IMPORTANT:** After running `pi-switch`, you MUST exit. The switch only works if Claude exits so the shell wrapper can take over.

## Requirements

The user must use the `cc` shell wrapper function instead of calling `claude` directly. If not installed, tell them to add this to their `~/.zshrc`:

```bash
# Claude Code with project switching support
cc() {
  while true; do
    claude "$@"
    if [[ -f ~/.claude/.switch-target ]]; then
      local target
      target=$(cat ~/.claude/.switch-target)
      rm -f ~/.claude/.switch-target
      cd "$target" || break
      set --
    else
      break
    fi
  done
}
```

Then restart their shell: `source ~/.zshrc`

## Examples

- `/switch cloudfix` — Switch to the cloudfix project
- `/switch pi-dev` — Switch back to pi-dev
- `/switch ~/cc/new-project` — Switch to an absolute path

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [theaichimera](https://github.com/theaichimera)
- **Source:** [theaichimera/claude-code-project-intelligence](https://github.com/theaichimera/claude-code-project-intelligence)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-theaichimera-claude-code-project-intelligence-switch
- Seller: https://agentstack.voostack.com/s/theaichimera
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
