Skip to content

t1k:chrome-profile

FieldValue
Modulet1k-delegation
Version2.12.24
Effortlow
ToolsBash, 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

/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.

Terminal window
bun chrome-profile.cjs list [--json] # profiles of every install (newest first), with email + claude-ext yes/no
bun chrome-profile.cjs resolve <selector> # one profile, or exit 2 naming the candidates
bun 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.

  1. list --json: pick the profile, note its email. Installs are listed newest Local State first; status is 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 by resolve/launch. If two installed browsers both have the selector it exits 2 naming each: use the email or the profile dir.
  2. list_connected_browsers: remember the device IDs. The names are “Browser 1” and say nothing about the profile.
  3. launch <selector>, then poll list_connected_browsers for up to 30 s. A new device ID is that profile’s extension.
  4. select_browser <new id>, open a tab, then verify the account: navigate to https://myaccount.google.com/ and compare the email with expectedEmail. A mismatch means the wrong browser is selected: do not act.
  5. Close the tab you opened when done. chrome:// URLs are blocked for the tools, so the account page is the check.

The profile’s extension is not registered with the Claude account. Say what is missing, once:

  • claude-ext: NO on one or more profiles → install it in all of them at once with the managed policy:
    1. policy status. CONFLICT (exit 6) means an organisation file already sets ExtensionInstallForcelist: do not shadow it, tell the user to add the extension there.
    2. It is a system-level change (admin rights, Chrome shows “Managed by your organization”), so pass --yes to policy apply only after the user asked to install the extension everywhere or confirmed once with AskUserQuestion (without --yes it exits 1). Exit 5 prints the exact sudo command: run it yourself via Bash (the permission prompt is the confirmation); ask for a paste-back only when sudo needs a TTY password.
    3. 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 macOS policy apply only prints the admin step; use install-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 State and the existence of Extensions/<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: or chrome: URLs (the script refuses them).

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.

StepAgent
Run scripts/chrome-profile.cjs list / resolve / launch / policy statust1k-mcp-manager