switch
Move this conversation to another Claude account (the previous one, or one by name), or set up, add, remove, rename and list accounts.
- License 许可
- MIT
- 所属仓库
- KrishP147/skills
- 最近更新
- 2026-11-10
- Stars
- ★ 37
- Forks
- 1
01 前言 Front Matter
- name
- switch
- description
- Move this conversation to another Claude account (the previous one, or one by name), or set up, add, remove, rename and list accounts.
- allowed-tools
- [ "Bash(\"${CLAUDE_SWITCH_PYTHON:-python3}\" \"${CLAUDE_SKILL_DIR}/scripts/claude_switch.py\" request:*)", "Bash(\"${CLAUDE_SWITCH_PYTHON:-python3}\" \"${CLAUDE_SKILL_DIR}/scripts/claude_switch.py\" setup:*)", "Bash(python \"${CLAUDE_SKILL_DIR}/scripts/claude_switch.py\" setup:*)", "Bash(\"${CLAUDE_SWITCH_PYTHON:-python3}\" \"${CLAUDE_SKILL_DIR}/scripts/claude_switch.py\" add:*)", "Bash(\"${CLAUDE_SWITCH_PYTHON:-python3}\" \"${CLAUDE_SKILL_DIR}/scripts/claude_switch.py\" remove:*)", "Bash(\"${CLAUDE_SWITCH_PYTHON:-python3}\" \"${CLAUDE_SKILL_DIR}/scripts/claude_switch.py\" rename:*)", "Bash(\"${CLAUDE_SWITCH_PYTHON:-python3}\" \"${CLAUDE_SKILL_DIR}/scripts/claude_switch.py\" list:*)", "Bash(\"${CLAUDE_SWITCH_PYTHON:-python3}\" \"${CLAUDE_SKILL_DIR}/scripts/claude_switch.py\" theme:*)" ]
- argument-hint
- [account name] | setup [name] | add <name> | remove <name> [--delete-dir] | rename <old> <new> | list | theme <name> [theme]
- disable-model-invocation
- true
02 资源文件 3
- 参考文档README.md18.0 KB
- 脚本scripts/claude_switch.py66.4 KB
- 脚本scripts/statusline.py4.2 KB
03 SKILL.md 正文
Pick the branch by the first word of $ARGUMENTS and run only its commands with the Bash tool, exactly as written, no text before the first one.
setup [name] (first-time setup; name is the account you're on, default main): two steps, never one.
-
Show the changes, then ask "Write these changes? (yes/no)" and stop until the user answers:
"${CLAUDE_SWITCH_PYTHON:-python3}" "${CLAUDE_SKILL_DIR}/scripts/claude_switch.py" $ARGUMENTS --dry-runIf it says Python was not found or
python3: command not found(on Windowspython3is often a Microsoft Store stub), run this instead, and usepythonin step 2 too:python "${CLAUDE_SKILL_DIR}/scripts/claude_switch.py" $ARGUMENTS --dry-runeverything is up to dateor a refusal (a bad name, a name or dir already taken) ends it here: show the output as is. -
Only on the user's explicit yes in their next message, run the same command with
--yesin place of--dry-run:"${CLAUDE_SWITCH_PYTHON:-python3}" "${CLAUDE_SKILL_DIR}/scripts/claude_switch.py" $ARGUMENTS --yesThen tell the user: open a new terminal and start Claude with
claude(orclaude-<name>);/switchworks in sessions started that way. Anything but yes: say nothing was changed and stop.
add <name> [--dir DIR]:
"${CLAUDE_SWITCH_PYTHON:-python3}" "${CLAUDE_SKILL_DIR}/scripts/claude_switch.py" $ARGUMENTS --session "${CLAUDE_SESSION_ID}"
Show its output as is. switching to '<name>' means the launcher ends this session and reopens it on the new account, which asks for a login; add nothing.
rename <old> <new>, list or theme <name> [theme]:
"${CLAUDE_SWITCH_PYTHON:-python3}" "${CLAUDE_SKILL_DIR}/scripts/claude_switch.py" $ARGUMENTS
Show its output as is.
remove <name> [--delete-dir]: two steps, never one.
-
Show the plan, then ask "Remove as above? (yes/no)" and stop until the user answers:
"${CLAUDE_SWITCH_PYTHON:-python3}" "${CLAUDE_SKILL_DIR}/scripts/claude_switch.py" $ARGUMENTS --dry-runA refusal (the account you're on, the last or first account, an overlapping dir) ends it here.
-
Only on the user's explicit yes in their next message:
"${CLAUDE_SWITCH_PYTHON:-python3}" "${CLAUDE_SKILL_DIR}/scripts/claude_switch.py" $ARGUMENTS --yesAnything but yes: say nothing was changed and stop.
Anything else (empty or an account name): run this and show its output as is.
"${CLAUDE_SWITCH_PYTHON:-python3}" "${CLAUDE_SKILL_DIR}/scripts/claude_switch.py" request $ARGUMENTS --session "${CLAUDE_SESSION_ID}"
- Ends with
switching to '<name>'→ the launcher ends this session and resumes it on that account. Add nothing. - Anything else (unknown name with the account list, already on that account, not started by the launcher with setup steps, python not found) → nothing was switched; show the output as is. Python not found means the session wasn't started by the launcher: suggest
/switch setup.
04 同仓库更多 Skills
wayfinder
Plan an effort too big for one session as a map of decision tickets (GitHub issue + sub-issues) and resolve them one per session until the way is clear, then hand off to divide.
skill
暂无简介
teammate-brief
Write an onboarding document for a person joining or picking up a project — what it is, setup steps verified by running them, env var names and where to get them, tasks with "done when", owners, don't-touch list. Use for "brief my teammate", "onboarding doc for X", "hand this project to someone".
spend-gate
Gate any billable action (GPU pods/instances, paid APIs or tiers, cloud credits) behind a cost estimate, a live balance check, and an explicit yes for that action. Use before any create/deploy on a paid provider (runpodctl, vultr-cli, aws/gcloud/az, modal, provider MCP create/deploy/run/start/update), any paid API call, or when spend-guard blocks one.
sitrep
Live status of this session in ≤10 lines — what's running, git state, PRs + CI, asked vs done, what needs the user, and a SAFE/NOT SAFE close verdict. Use for "how's it going", "status update", "what's running", "can I close this".
session-bridge
Coordinate with another Claude Code session or agent on the same repo — snapshot its state, check for overlap, send it a gated message. Use for "check with / message the other session", "what's the other agent doing", "is anyone else touching this file or branch".