matthewwong525/WongStack / .agents/plugins/browser
browser
VerifiedThe person's own browser, for errands.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 4.4 KB |
| SKILL.md | skill md | 3.6 KB |
| VERSION | other | 6 B |
| addon/background.js | script | 1.1 KB |
| addon/check.svg | other | 591 B |
| addon/manifest.json | config | 462 B |
| references/browser-proxy.md | markdown | 5.2 KB |
| references/browser-window.md | markdown | 6.4 KB |
| references/browsing.md | markdown | 18.6 KB |
| references/login-codes.md | markdown | 5.6 KB |
| references/password-manager.md | markdown | 8.3 KB |
| references/setup.md | markdown | 6.4 KB |
| scripts/addons.mjs | script | 26.3 KB |
| scripts/browse.mjs | script | 53.5 KB |
| scripts/browser-server.mjs | script | 50.8 KB |
| scripts/connect-browser.mjs | script | 17.3 KB |
| scripts/forwarder.mjs | script | 14.5 KB |
| scripts/launch-config.py | script | 7.4 KB |
| scripts/lib/cli.mjs | script | 1.2 KB |
| scripts/lib/env.mjs | script | 614 B |
| scripts/lib/primary-root.mjsexecutable | script | 1.9 KB |
| scripts/lib/profile.mjs | script | 1.4 KB |
| scripts/login-move.mjs | script | 4.0 KB |
| scripts/mask-keys.mjs | script | 2.9 KB |
| scripts/proxy-lines.mjs | script | 4.7 KB |
| scripts/refs.mjs | script | 5.4 KB |
references/login-codes.md
View on GitHub# Login codes
When a site asks for a one-time code after you [sign in in a live view](../skills/hand-over/references/live-view.md#sign-in), the agent gets the code itself from your email, or asks you for it in the chat: never through a link. It is part of [browsing](browsing.md#saved-browser-logins).
## Spot the code step
*Hand back* after a sign-in doesn't prove you're signed in: the site may still want a check or a code. So the agent takes a snapshot of the next page and reads what it asks for, before it says it's signed in:
- **A robot check:** a tick box such as *I'm not a robot*, or a picture puzzle. It comes first: the agent offers [a live view](../skills/hand-over/references/live-view.md) for you to tap through, then reads the page again.
- **A code box:** a field labelled code, OTP, verification, or 2FA, or one marked `autocomplete="one-time-code"`.
- **An app approval:** text like *check your phone* or *approve in the app*, with no box.
- **An emailed sign-in link:** text like *check your email for a link*, with no box. It is handled as a code is: it expires in minutes too.
- **A backup or recovery code box:** you type it in [a live view](../skills/hand-over/references/live-view.md#pay-or-type-a-code), never the chat. A backup code doesn't expire, so it must not sit in the stored chat.
The page usually says where the code went: *We sent a code to j\*\*\*@gmail.com*, or *to •••• 1234*. Email → [read the inbox](#read-the-code-from-your-email). A text, an authenticator app, or no clear answer → [ask in the chat](#ask-in-the-chat).
## Read the code from your email
The agent reads the code itself only when its browser is already signed in to that email. It never logs in to your email to fetch a code: that login may want a code of its own, and loop.
1. **Pick the webmail** from the email the site names, such as *j\*\*\*@gmail.com*:
| Email ends in | Webmail |
| --- | --- |
| `gmail.com`, `googlemail.com` | `https://mail.google.com/` |
| `outlook.com`, `hotmail.com`, `live.com` | `https://outlook.live.com/mail/` |
| `icloud.com`, `me.com` | `https://www.icloud.com/mail/` |
| anything else | Gmail, which also serves Google Workspace; then ask |
2. **Open it in a page of its own**, named with `--session`, so the login page stays as it is and [shares the same logins](browsing.md#saved-browser-logins). For Gmail, open the search straight away:
```bash
node .claude/skills/browser/scripts/browse.mjs open "https://mail.google.com/mail/u/0/#search/from%3Anetflix.com+newer_than%3A1h" --session inbox
```
3. **A login page there means it isn't signed in.** Close that page (`close --session inbox`) and ask in the chat.
4. **Open only the newest message** from the site's sender in the last 15 minutes, read the code from its text, close that page, and go back to the login page. For a sign-in link, open the link from that message instead. Wait up to about a minute for a late email, then ask in the chat.
5. **Show no picture of the inbox.** This overrides [a picture of each new page](browsing.md#show-what-the-browser-is-doing) for that page: your inbox holds far more than the code.
6. **Say what it did, in one line:** *Got Netflix's code from your email.*
## Ask in the chat
One line names the site and where the code went: *Netflix sent a code to your phone ending 1234. What is it?* No link, no *ready?* question. The agent puts your reply in the box with `browse.mjs type` and submits. For an emailed sign-in link, it asks you to paste the link, and opens it.
The code stays in the stored chat and on one command line. That's fine, not a leak: it dies in minutes, unlike a password. A reply that looks like a backup code, because you say so or it's longer than 10 characters with dashes, isn't used; the agent offers [a live view](../skills/hand-over/references/live-view.md#pay-or-type-a-code) instead.
## Approve on your phone
For an *approve in the app* prompt, the agent says *Tap Yes in the Google app on your phone.* and checks the address with `browse.mjs get url` until it leaves the approval page. After about 2 minutes, the site's own limit, it says it timed out and offers to try again.
- **Google asks for a passkey first.** A passkey on your own device can't reach the agent's browser; one in 1Password [can](password-manager.md#use-it-at-a-sign-in). Else the agent taps *Try another way*, picks the password, and then waits for this phone prompt.
- **Check the start of the address, not any part of it.** Google's sign-in address holds the target site in its `continue=` part, so `mail.google.com` anywhere in it matches too early. Match the site's own address at the start, such as `https://mail.google.com` for Gmail.
## A wrong or expired code
The agent says so, taps the site's *Resend* when it has one, and asks again. After three failures, it stops and gives you [steps to finish it yourself](browsing.md#steps-for-you-to-finish).
## What is not a code
Each of these has its own route in [when a step needs you](browsing.md#when-a-step-needs-you):
- **A backup or recovery code** goes through [a live view](../skills/hand-over/references/live-view.md#pay-or-type-a-code).
- **A *Sign in with Google* or *Apple* button** [follows the provider's own login](browsing.md#saved-browser-logins); a code the provider sends comes back here.
- **A robot check**, a tick box or a picture puzzle, goes to [a live view](../skills/hand-over/references/live-view.md).
- **A passkey on your own device, or Face ID,** is yours there, with [steps to finish it yourself](browsing.md#steps-for-you-to-finish).
- **A password** is yours to type in [a sign-in turn](../skills/hand-over/references/live-view.md#sign-in).
Back to [browsing](browsing.md).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |