Agent Skills › yetanotherbrowser/yab › google-accounts

google-accounts

GitHub

指导Agent在多账号环境下识别、选择并切换Google账户,避免操作错误。通过URL参数或邮箱定位账户,结合记忆与快照确认身份,确保在Gmail等应用中执行正确任务。

Skills/google-accounts/SKILL.md yetanotherbrowser/yab

触发场景

用户需要在多个Google账户间切换 访问Google应用前需确认当前登录账户 操作涉及敏感数据时需验证账户权限

安装

npx skills add yetanotherbrowser/yab --skill google-accounts -g -y
更多选项

非标准路径

npx skills add https://github.com/yetanotherbrowser/yab/tree/main/Skills/google-accounts -g -y

不安装直接使用

npx skills use yetanotherbrowser/yab@google-accounts

指定 Agent (Claude Code)

npx skills add yetanotherbrowser/yab --skill google-accounts -a claude-code -g -y

安装 repo 全部 skill

npx skills add yetanotherbrowser/yab --all -g -y

预览 repo 内 skill

npx skills add yetanotherbrowser/yab --list

SKILL.md

Frontmatter
{
    "name": "google-accounts",
    "sites": [
        "accounts.google.com",
        "myaccount.google.com",
        "mail.google.com",
        "docs.google.com",
        "drive.google.com",
        "calendar.google.com"
    ],
    "keywords": [
        "google",
        "google account",
        "gmail account",
        "work account",
        "personal account",
        "authuser",
        "switch account",
        "\/u\/1"
    ],
    "signed-in": [
        "SID",
        "__Secure-1PSID"
    ],
    "description": "Working out which signed-in Google account is \/u\/0, \/u\/1 and so on, switching between them, and picking the right one before touching any Google app."
}

Google accounts

Many people are signed in to more than one Google account in the same browser: a personal one, a work one, a client's. Every Google app addresses them by a number in the URL (/u/0/, /u/1/, ...) or by an authuser= parameter. Read this before doing anything in Gmail, Docs, Sheets, Drive, Calendar, Forms or Slides, because acting in the wrong account is the most common and most embarrassing mistake.

How the numbers work

  • The number is the order the accounts were signed in on this browser. /u/0/ is the first (the default one), not necessarily the one the user thinks of as primary.
  • The order can shift when the user signs out of one account and back in. Do not rely on a number you remembered from weeks ago without checking it again.
  • The same document, thread or event has different ids or no access at all under another account. A 404, "You need access" or an empty search often just means the wrong account.
  • Most apps also accept the email in place of the number: https://mail.google.com/mail/u/${email}/, or ?authuser=${email} on Docs, Drive and Calendar links. This is the safest form when you know the address, because it cannot drift.

Finding out who is who

  1. Check memory first: memory_search("google account") or the person's name. The user may already have said which address is work and which is personal.
  2. Open https://accounts.google.com/AccountChooser (or https://accounts.google.com/SignOutOptions) and snapshot: it lists every signed-in account with its name and email, in /u/N order.
  3. Or open the app itself at a given index, for example https://mail.google.com/mail/u/1/. The tab title reads like Inbox (4) - name@company.com - Gmail, and the avatar button at the top right has an accessible name such as Google Account: Name (name@company.com).
  4. Once you know the mapping, remember it (which address is which role), not the bare numbers.

Choosing the right account

  • The task names an address or a company: use the account with that domain.
  • The task mentions a colleague, a client or a work document: prefer the work account. A family member, a personal purchase or a subscription: prefer the personal one.
  • A link the user gave you usually carries its own /u/N/ or authuser. If it fails, try the other accounts before reporting that the item does not exist.
  • When searching for something whose account is unclear (an email, a file), search each account in turn, in its own tab, and say which account the result came from.
  • If it is genuinely ambiguous and the action is not read only (sending, sharing, creating), ask the user with handoff or in your reply rather than guessing.

Switching

  • Change the number or email in the URL and navigate. This is quicker than the avatar menu.
  • The avatar menu (top right) also lists accounts; clicking one opens that app under that account, often in a new tab.
  • "Add another account" and any password or 2FA screen is for the user: handoff(tab, "sign in to ..."). Never type credentials.

Pitfalls

  • A Google Workspace admin may block personal accounts from opening work files, which looks the same as a missing file.
  • accounts.google.com pages can show "Choose an account" when a link has no account hint. Pick the right row by email, not by position.
  • Do not sign the user out of anything to "fix" the ordering.

版本历史

  • a4661df 当前 2026-11-16 19:55

同 Skill 集合

Skills/1password/SKILL.md
Skills/airtable/SKILL.md
Skills/apple-passwords/SKILL.md
Skills/asana/SKILL.md
Skills/bitwarden/SKILL.md
Skills/boosts/SKILL.md
Skills/confluence/SKILL.md
Skills/dashlane/SKILL.md
Skills/google-docs/SKILL.md
Skills/google-search/SKILL.md
Skills/image-search/SKILL.md
Skills/lastpass/SKILL.md
Skills/nordpass/SKILL.md
Skills/notification-activation/SKILL.md
Skills/password-manager/SKILL.md
Skills/proton-pass/SKILL.md
Skills/skill-creator/SKILL.md
Skills/trello/SKILL.md
Skills/visual-reading/SKILL.md
Skills/visualize/SKILL.md
Skills/yab/SKILL.md
Skills/clickup/SKILL.md

元信息

文件数
0
版本
a4661df
Hash
4545e75c
收录时间
2026-11-16 19:55

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-17 07:51
浙ICP备14020137号-1