claude-switcher
Skill2 starsChanged 5 days agoMITView on GitHub
Check which Claude accounts this machine has, who is signed in to each and which VS Code profile uses which, and set up a new one — so a second (or third) Claude account is a VS Code profile switch away. `/claude-switcher` checks; `/claude-switcher add <name>` sets one up.
In this repository24 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- 1passwordSkill
- brainSkill
- brainstormSkill
- bridgeSkill
- clear-cacheSkill
- commitSkill
- cross-artifactSkill
- ctoSkill
- diskSkill
- killSkill
- lookSkill
- parseSkill
- pbarSkill
- planSkill
- pruneSkill
- pushSkill
- reportSkill
- researchSkill
- swarmSkill
- vibe-auditSkill
- video-editorSkill
- webSkill
- wikiSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 58
Have the user create the VS Code profile: Only they can; it is a VS Code screen: Profiles: Create Profile, the exact name, copy from the …
- Very specific: line 114
Leave a process wrapper alone: If the check notes claudeCode.claudeProcessWrapper is set, the project has its own account routing.
- Very specific: line 122
If .claude/kit.json has a rules."claude-switcher" entry, read it and apply it as an additional instruction for this skill.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Claude Switcher
Several Claude accounts on one machine, picked by VS Code profile. Typical reasons: a personal plan and an employer's, a client that requires its own account, or a second account for the same work when one runs out of usage.
This skill works on the whole machine, not just the project it runs from.
| Argument | What happens |
(none) or check | Show every account, who is signed in, which profile and folders use it, and what is off. Changes nothing. |
add <name> | Set up a new account: its folder, its VS Code profile, its login. |
How it works
- An account is a folder. Claude Code keeps one login, one settings file and one session
history per config folder.
~/.claudeis the default account;~/.claude-<name>is another. TheCLAUDE_CONFIG_DIRvariable picks the folder. - A VS Code profile picks the folder. The profile's own settings set
CLAUDE_CONFIG_DIRfor the Claude panel and for the VS Code terminal. So "which account" becomes "which profile". - VS Code remembers a profile per folder. A project reopens in the profile it was last in.
Switching account is
Profiles: Switch Profile, thenDeveloper: Reload Window.
Everything mechanical is in one script, ~/.claude-kit/scripts/claude-switcher. It stores
nothing of its own: it reads the account folders and VS Code's files every time.
Procedure
Check (every mode starts here)
~/.claude-kit/scripts/claude-switcherRelay the result as a short table (account, signed in as, VS Code profile, folders), then the
Needs attention and Notes lines in plain words with the fix for each. <- this session
marks the account this Claude session is on; say it outright, since "which account am I on right
now" is usually the real question.
In check mode, stop here. Fix nothing without being asked.
Add an account
- Settle three things, asking only for what the request did not already say:
- Name: short, lowercase (
work,acme). The folder becomes~/.claude-<name>. - Profile name: the VS Code profile. Defaults to the account name.
- Shared or separate history: shared when it is a second account for the same work (both see one session list and the same memories; only the login differs). Separate when the accounts must not see each other's work, such as a client's or an employer's.
- Name: short, lowercase (
- Have the user create the VS Code profile. Only they can; it is a VS Code screen:
Profiles: Create Profile, the exact name, copy from the profile they normally use (that carries extensions and settings across). Create the account and point the profile at it:
~/.claude-kit/scripts/claude-switcher add <name> --profile "<Profile>" [--share-history <account>]Safe to re-run; it reports
[ok]for what is already in place.[todo]means the profile does not exist yet (step 2).[manual]means that profile's settings file has comments, so the script left it alone: add the two settings it prints by hand.Have the user sign in, in a real terminal (Terminal.app, not the VS Code panel and not this session, because it opens a browser and waits):
~/.claude-kit/scripts/claude-switcher login <name>- Have the user switch the project's window: in the window that has the project folder
open,
Profiles: Switch Profile→ the new profile, thenDeveloper: Reload Window. - Check again and confirm the new account shows the right email, the profile, and the project folder. VS Code writes the folder-to-profile link to disk lazily, so "no folder opened in it yet" straight after a switch is not a problem by itself.
What goes wrong (all of these happened)
- Signing in from the VS Code panel lands in the wrong folder. It reported "failed to
retrieve auth status after login" and had in fact replaced the default account's login with
the new one. Sign in from a terminal, always. The tell is one email signed in to two accounts,
which the check reports. To undo it:
claude-switcher login defaultwith the right account. - A new, empty window on the profile shows the wrong session list. The list is per folder, so a window with no folder open lists the home folder's sessions. Switch the profile in the project's own window.
- Switching profile without reloading. A Claude process already running keeps the account it started on. Reload the window.
- One folder cannot be open in two windows, so one folder is on one account at a time. To
have both open side by side, open the folder in one profile and the project's
.code-workspacefile in the other; VS Code treats them as different things. - Hidden and archived sessions are remembered per profile, even with shared history.
- A terminal outside VS Code knows nothing about profiles and uses the default account.
Use
~/.claude-kit/scripts/claude-switcher run <name>there. - Each account has its own settings, plugins and MCP sign-ins.
addcopiessettings.jsononce; after that they drift apart unless edited together. Sign-in-based MCP servers need/mcponce per account.
Rules
- Never sign in or out on the user's behalf, and never read, copy or print anything from an
account's
.claude.jsonbeyond the signed-in email. Logins live in the system keychain; leave them there. - Never delete an account folder. It holds session history. If one should go, say which folder and let the user remove it.
- Leave a process wrapper alone. If the check notes
claudeCode.claudeProcessWrapperis set, the project has its own account routing; do not change or remove it. checkchanges nothing.
Project overrides
If .claude/kit.json has a rules."claude-switcher" entry, read it and apply it as an additional
instruction for this skill. Absent file or key means no overrides — that is the normal case.
jq -r '.rules."claude-switcher" // empty' .claude/kit.json 2>/dev/nullDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

