drive-browser
Skill4 starsChanged 18 days agoMITView on GitHub
Drive a browser WITH the user's already-logged-in session from the terminal (navigate, click, fill, capture) over the debugging protocol (CDP), when no browser MCP tool is available. Use when you have to operate an authenticated external panel —Vercel, Stripe, a dashboard, a provider's console— reusing the cookies of the user's Chrome; when they say "conéctate a mi navegador", "usa mi sesión", "hazlo tú en Vercel/Stripe"; or when you try to open a debugging port and Chrome rejects it or lands on the login screen.
- Deletes or force-pushes
- Sends data out
1 other project uses a version of this.
Adopted by
Most recently taken up by
- suchipi/skillstheir own version, first seen Nov 5, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- suchipi/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-repo-to-docsSkill
- adrSkill
- auth-bypass-localSkill
- before-afterSkill
- bug-huntSkill
- carry-envSkill
- code-healthSkill
- crux-doctorSkill
- crux-initSkill
- css-to-componentsSkill
- deploy-fallbackSkill
- deploy-watchSkill
- device-loopSkill
- e2eSkill
- end-sessionSkill
- eval-fixturesSkill
- explain-planSkill
- flowSkill
- grillSkill
- merge-conflictsSkill
- motion-videoSkill
- oauth-reauthorizeSkill
- prod-signalsSkill
- promote-to-docsSkill
- prose-checkSkill
- read-documentSkill
- render-loopSkill
- repo-mapSkill
- review-prSkill
- root-causeSkill
- runbookSkill
- security-auditSkill
- share-localSkill
- shipSkill
- skill-auditSkill
- skill-creatorSkill
- teachSkill
- ui-behaviourSkill
- ui-tellsSkill
- visual-diffSkill
- visual-testSkill
- wizardSkill
- workspaceSkill
- write-testsSkill
- x-postsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
- Distinctive: line 48
If it ends up on the login page, the keyring is locked or the site binds the session to the device: sign in once in that window.
- Very specific: line 55
Read and execute: cdp.py eval '<js>' and cdp.py evalshot '<js>' <png> <s>.
- Very specific: line 81
Leave the value in window.__X__ and dump it to a file with writefile, which writes with chmod 600 and prints only the length:
- Distinctive: line 91
Google does not accept the copied profile: ask the user to sign in once in the headed window and carry on yourself.
- Very specific: line 104
If
evalhangs,: do not kill Chrome: open a new tab (curl -s -X PUT "http://127.0.0.1:9222/json/new?<url>") and close the old one … - Distinctive: line 108
The environment kills background processes: when each call ends: Chrome goes as a persistent task.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
drive-browser
Control the user's Chrome, with its session cookies, from the terminal over CDP
(--remote-debugging-port), when an authenticated website has to be operated
and there is no browser tool. Why each restriction:
<this-skill-directory>/references/why.md.
Do not use for screenshots of your own local app (/visual-test), nor if a
browser MCP is available: check with claude mcp list. If you are going to
repeat this, install one (it loads when the agent restarts):
claude mcp add chrome-devtools -s user -- npx -y chrome-devtools-mcp@latest --browser-url http://127.0.0.1:9222.
Needed
google-chromeand a desktop session (echo $DISPLAYnon-empty). A locked screen does not stop headed Chrome; a reboot does, until the user logs in and the keyring opens.python3withwebsockets.- The keyring unlocked (it is if the user has Chrome open).
Procedure
The profile with the session (it is usually not
Default):python3 - <<'PY' import sqlite3, glob, os ch=os.path.expanduser("~/.config/google-chrome") for p in glob.glob(ch+"/*/Cookies"): c=sqlite3.connect(p) n=c.execute("select count(*) from cookies where host_key like '%vercel%'").fetchone()[0] print(p, "->", n); c.close() PY- Launch headed Chrome on a copy of the profile, as a persistent background
task:
<this-skill-directory>/scripts/chrome-session.sh ~/.config/google-chrome/"Profile 1". Wait forcurl -s http://127.0.0.1:9222/json/version. - Check that the session came across:
python3 <this-skill-directory>/scripts/cdp.py goto https://vercel.com/dashboard /tmp/dash.png 6. If it ends up on the login page, the keyring is locked or the site binds the session to the device: sign in once in that window. - Drive with short, separate calls:
- Click: the
clickaction ofcdp.py, which sends real mouse events. JS.click()or a syntheticMouseEventtrigger nothing on many SPAs; use them only ifclickdoes not find the element. - Read and execute:
cdp.py eval '<js>'andcdp.py evalshot '<js>' <png> <s>. - Controlled inputs: the native setter and
input/change. With autocomplete, set the value to "" with the setter and thentype; if the dropdown does not appear, Enter. - In React many buttons are
div: find them by text. - Files:
cdp.py upload '<css selector>' <file> [index]. The native file chooser cannot be driven. - Rich editors (ProseMirror, Tiptap) keep their instance on the element:
document.querySelector(".tiptap").editor.commands.setContent(...)instead of typing.
- Click: the
When finished, close by port and delete the copy, which has cookies, unless it is the fixed one you keep for repeating:
fuser -k 9222/tcp; rm -rf /tmp/cdp-profile
To repeat, keep the copy in a fixed directory and relaunch it with
KEEP_PROFILE=1 chrome-session.sh <profile> ~/.config/cdp-<site> [port]: a
Google sign-in done once there is a single click the next time, without the
password. A second
session goes on another port, with CDP_URL=http://127.0.0.1:<port>.
Secrets: never print them
Leave the value in window.__X__ and dump it to a file with writefile, which
writes with chmod 600 and prints only the length:
python3 .../cdp.py eval 'window.__X__=document.body.innerText.match(/DATABASE_URL=(\S+)/)[1]; "len="+window.__X__.length'
python3 .../cdp.py writefile 'window.__X__' /tmp/secretGotchas
- Google does not accept the copied profile: ask the user to sign in once in the headed window and carry on yourself. Other sites do accept the cookies.
- Chrome does not debug the default profile and you cannot attach to the
user's real Chrome: always a copy in another
--user-data-dir. - Headless decrypts the cookies as long as the keyring is unlocked
(
--password-store=gnome-libsecretandLocal State, which the script copies), but sites behind a bot check (Cloudflare's "Verify you are human") stop it. Then it is headed, and the check is not to be got around. - If every call hangs, look at the screen (
gnome-screenshot -f /tmp/s.png). It was a native "Leave site?" dialog after a publish button: the page waits for an answer and its own JS cannot see it.cdp.pyaccepts that kind after its own clicks; one opened outside it, the user answers.cdp.pygives up afterCDP_TIMEOUTseconds (45) and says so. - If
evalhangs, do not kill Chrome: open a new tab (curl -s -X PUT "http://127.0.0.1:9222/json/new?<url>") and close the old one (/json/close/<targetId>). - Kill by port (
fuser -k 9222/tcp), never withpkill. - The environment kills background processes when each call ends: Chrome goes as a persistent task.
urllibto127.0.0.1may go out through a proxy;cdp.pyalready avoids it.- The scrolling container is the
divwithscrollHeight > clientHeight.
Related
/visual-test— headless screenshots of your app, without a session/share-local— open your local environment to the outside/oauth-reauthorize— when an OAuth token fails, not the web session
Does 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.

