t1k:chrome-profile
| Field | Value |
|---|---|
| Module | t1k-delegation |
| Version | 2.12.24 |
| Effort | low |
| Tools | Bash, Glob, Grep, Read |
Keywords: browser profile, chrome profile, claude in chrome profile, list_connected_browsers, open page for user, open profile, open url for user, other profile, personal account, select_browser, switch profile, which profile, work account, wrong account, wrong browser
How to invoke
Section titled “How to invoke”/t1k:chrome-profile[list | <profile name, email or dir> [--url URL]]Chrome Profile — Know Which One You Are In, Open the One You Need
Section titled “Chrome Profile — Know Which One You Are In, Open the One You Need”Claude in Chrome acts in whichever profile’s extension is connected, normally the profile used last. A task that needs another account (finance, marketing, a work Google account) must switch first. Do this yourself; never ask the user which profile is open or to open it for you.
The script is <claudeDir>/skills/t1k-chrome-profile/scripts/chrome-profile.cjs (project .claude/ or ~/.claude/). It prints facts and opens a profile; you decide.
bun chrome-profile.cjs list [--json] # profiles of every install (newest first), with email + claude-ext yes/nobun chrome-profile.cjs resolve <selector> # one profile, or exit 2 naming the candidatesbun chrome-profile.cjs launch <selector> [--url URL] [--dry-run]bun chrome-profile.cjs install-extension <selector> # opens the Web Store page in THAT profile (one click)bun chrome-profile.cjs policy <status|apply> [--dry-run] [--yes] # force-install the extension in EVERY profile (admin, system-level; apply needs --yes)<selector> = dir (Profile 2), email, display name, or any substring; it is searched in every install whose browser is installed. An ambiguous one (two profiles, or the same profile in two installed browsers) fails naming each, never guesses.
Exit: 0 ok · 1 usage · 2 no or ambiguous match · 3 no Chrome found · 4 launch failed · 5 needs admin rights · 6 policy conflict.
Switching profile (the order matters)
Section titled “Switching profile (the order matters)”list --json: pick the profile, note itsemail. Installs are listed newestLocal Statefirst;statusis a hint (active= newest by over 60 s,ambiguous= within 60 s of the newest,older= likely leftover). An install whose browser is not installed (launchable: false, shown[NO BROWSER INSTALLED, ignored]) is ignored byresolve/launch. If two installed browsers both have the selector it exits 2 naming each: use the email or the profile dir.list_connected_browsers: remember the device IDs. The names are “Browser 1” and say nothing about the profile.launch <selector>, then polllist_connected_browsersfor up to 30 s. A new device ID is that profile’s extension.select_browser <new id>, open a tab, then verify the account: navigate tohttps://myaccount.google.com/and compare the email withexpectedEmail. A mismatch means the wrong browser is selected: do not act.- Close the tab you opened when done.
chrome://URLs are blocked for the tools, so the account page is the check.
When no new device appears
Section titled “When no new device appears”The profile’s extension is not registered with the Claude account. Say what is missing, once:
claude-ext: NOon one or more profiles → install it in all of them at once with the managed policy:policy status.CONFLICT(exit 6) means an organisation file already setsExtensionInstallForcelist: do not shadow it, tell the user to add the extension there.- It is a system-level change (admin rights, Chrome shows “Managed by your organization”), so pass
--yestopolicy applyonly after the user asked to install the extension everywhere or confirmed once withAskUserQuestion(without--yesit exits 1). Exit 5 prints the exactsudocommand: run it yourself via Bash (the permission prompt is the confirmation); ask for a paste-back only when sudo needs a TTY password. - The user restarts Chrome (all windows). The extension then installs in every profile, current and future. Linux only: native and Flatpak Chrome both read
/etc/opt/chrome/policies/managed. On Windows and macOSpolicy applyonly prints the admin step; useinstall-extension <selector>(opens the store page in that profile, user clicks Add to Chrome).
- Installed but not signed in: the user clicks the Claude icon in that profile’s window and signs in or presses Connect, then try
switch_browser. The policy installs the extension; it cannot sign anyone in.
Observed on Linux Flatpak Chrome: launching Default (extension installed) opened a window but no second device appeared and switch_browser answered “no other browsers”, i.e. that extension was not signed in. The sign-in is a one-time step per profile.
- Never read or edit profile files beyond
Local Stateand the existence ofExtensions/<id>(cookies,Login Data,Preferences); never type a password into a page. - Never trust a profile by position in the menu or by the “Browser N” name: verify the email.
- Never open
javascript:,file:orchrome:URLs (the script refuses them).
Executed by
Section titled “Executed by”Runs in t1k-mcp-manager (or inline). The agent ships in the optional t1k-mcp module: when it is not installed, run the script inline in the main session. Routing SSOT: docs/orchestration-rules.md § ‘Task-Type → Agent Routing’. list, resolve, launch, install-extension and policy are mechanical scripts/chrome-profile.cjs subcommands; choosing the profile, confirming the system-level policy and verifying the account stay with the main session.
| Step | Agent |
|---|---|
Run scripts/chrome-profile.cjs list / resolve / launch / policy status | t1k-mcp-manager |