
playwriter
Reuse a running Chrome session for browser automation via Playwriter CLI + MCP. Use when the task depends on the browser the user already has open — existing logins, cookies, extensions, passkey-friendly flows, or live-tab continuity. Route repeatable fresh-browser or CI-style checks to browser-harness instead.
- Installs
- 344
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/akillness/jeo-skills --skill playwriter- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads playwriter automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
playwriter
Playwriter is the running-browser browser-automation skill. It connects an agent to Chrome/Chromium that is already part of the user’s real workflow instead of spawning a clean disposable browser. That makes it useful for authenticated flows, extension-dependent pages, and long-lived tab context — but less reproducible than a fresh-session browser tool.
When to use this skill
Use playwriter when the task needs one or more of these:
- the browser the user already has open
- existing logins, cookies, or trusted-device state
- extension-dependent workflows
- passkey / SSO / MFA-heavy flows where manual login handoff is realistic
- live-tab continuity with a human and agent sharing the same browser
- MCP-based browser control for Claude / Codex / Gemini using the running browser
Do not use playwriter by default for:
- CI-style repeatable browser checks
- fresh-session verification that should not touch the user’s real browser profile
- simple scraping or deterministic form checks that fit
browser-harness - tasks that need the strongest isolation or the least user-state coupling
Quick routing rule
| If the job needs... | Use |
|---|---|
| The browser the user already has open | playwriter |
| Existing logins / cookies / extensions | playwriter |
| A clean, reproducible, disposable session | browser-harness |
| Headless verification / screenshot diffs / isolated checks | browser-harness |
| Hosted or cloud browser infrastructure | a provider-specific or cloud-browser skill |
Instructions
Step 1: Pick the right browser runtime
Use playwriter only when running-browser reuse is the requirement. If the task is really about a clean disposable browser or CI-style reproducibility, route to browser-harness instead.
Step 2: Follow the core workflow
Always follow the same loop:
- Prepare the running-browser bridge
- Create or select a session
- Observe first with
snapshot({ page }) - Act once
- Observe again before the next action
Step 1: Install the extension and CLI
# install the CLI
npm install -g playwriter
# or use it without global install
npx playwriter@latest --help
Install the Playwriter Chrome extension, then click the extension icon on the tab you want to control. The tab should show the connected/green state before you assume automation is available.
Step 2: Start browser support and create a session
Use the upstream browser/session flow, not a vague “extension auto-starts everything” assumption:
# start the managed browser/runtime if needed
playwriter browser start
# create a stateful sandbox session
playwriter session new
# inspect current sessions
playwriter session list
Notes:
playwriter browser startcan launch Chrome for Testing / Chromium with the Playwriter extension available.playwriter session newcreates a stateful sandbox and returns a session id.- Browser tabs are shared, but session state is isolated.
Step 3: Observe → act → observe
# navigate
playwriter -s 1 -e 'await page.goto("https://example.com")'
# observe current page state
playwriter -s 1 -e 'console.log(await snapshot({ page }))'
# act using a fresh aria-ref from the snapshot
playwriter -s 1 -e 'await page.locator("aria-ref=e5").click()'
# observe again after the action
playwriter -s 1 -e 'console.log(await snapshot({ page }))'
Rules:
- Never keep using old
aria-refvalues after navigation or major DOM changes. - Prefer
snapshot({ page })over screenshots when text structure is enough. - Use screenshots or recordings only when visual evidence matters.
High-value command patterns
Navigation and state
playwriter browser start
playwriter session new
playwriter session list
playwriter session reset 1
playwriter session delete 1
Execute Playwright code in a session
# basic navigation
playwriter -s 1 -e 'await page.goto("https://github.com")'
# fill + submit
playwriter -s 1 -e 'await page.fill("#search", "playwriter"); await page.keyboard.press("Enter")'
# save reusable state between calls
playwriter -s 1 -e 'state.lastUrl = page.url(); state.heading = await page.textContent("h1")'
playwriter -s 1 -e 'console.log(state.lastUrl, state.heading)'
Multiline code safely
playwriter -s 1 -e "$(cat <<'EOF'
const title = await page.title();
state.title = title;
console.log(await snapshot({ page }));
EOF
)"
Use heredocs when the JavaScript would become fragile with quoting.
MCP integration
Use Playwriter when a model client needs browser tooling for the running browser, not when it simply needs any browser tool.
Example MCP config
{
"mcpServers": {
"playwriter": {
"command": "npx",
"args": ["-y", "playwriter@latest"]
}
}
}
Common uses:
- Claude / Codex / Gemini can call into Playwriter through MCP.
- MCP gives the agent a transport layer; Playwriter still owns the browser/session behavior.
- Session reuse, browser visibility, and tab consent remain Playwriter concerns, not MCP concerns.
Safety and expectations
playwriteris privileged mode because it can touch the user’s real browser session.- Prefer it only when session reuse is genuinely required.
- Expect lower reproducibility than a clean isolated browser because tabs, extensions, and humans can mutate state.
- Manual login / MFA / CAPTCHA handoff is normal in this lane; don’t pretend full autonomy is guaranteed.
- Detach or reset cleanly; do not assume it is safe to kill the user’s browser.
Troubleshooting
| Issue | What to check |
|---|---|
| Nothing responds | Confirm the extension is installed and enabled on the target tab |
| Wrong tab/page state | Re-run snapshot({ page }) and confirm you are on the expected tab before clicking |
| Stale / broken session | playwriter session reset <id> |
| Quoting breaks JavaScript | Use a heredoc for -e input |
| Need repeatable isolated automation | Route to browser-harness instead |
| Browser state is too messy / human interference | Start a fresh session or use a fresh-session browser tool |
Examples
Example 1: Logged-in SaaS workflow
- Prompt: "Use my already logged-in Chrome to update a Jira ticket without re-authenticating."
- Expected skill behavior: choose
playwriter, mention running-browser reuse, create a session, observe first, then act.
Example 2: Clean browser verification
- Prompt: "Run a repeatable headless checkout test in CI and compare screenshots."
- Expected skill behavior: route away from
playwritertobrowser-harnessor another fresh-session tool because isolation matters more than session reuse.
Example 3: MCP browser bridge
- Prompt: "Connect Codex or Claude to the browser I already have open so it can use my current tabs and cookies."
- Expected skill behavior: choose
playwriter, explain MCP config, and make the running-browser assumption explicit.
Best practices
- Choose
playwriterbecause the browser state matters, not because the word “browser” appears. - Start with
snapshot({ page })before any action that could hit the wrong tab or stale UI state. - Re-snapshot after each meaningful action; live browser state drifts faster than isolated automation state.
- Use heredocs for non-trivial JavaScript to avoid shell-quoting bugs.
- Treat manual login / MFA / CAPTCHA handoff as normal in this lane.
- Report why a running browser was necessary and when a fresh-session tool would have been safer.
References
Deep-dive docs in this skill:
- modes-and-routing
- session-workflow
- mcp-integration
Primary sources:
- https://raw.githubusercontent.com/remorses/playwriter/main/README.md
- https://playwright.dev/docs/auth
- https://playwright.dev/docs/api/class-browsertype#browser-type-connect-over-cdp
- https://modelcontextprotocol.io/introduction
Output expectations
When using this skill, report:
- why
playwriterwas chosen instead of a fresh-session browser tool - session/runtime assumptions
- key actions taken
- evidence captured (
snapshot, screenshot, recording, logs) - any manual handoff or auth-related limitation encountered
FAQ
What does the playwriter skill do?
Reuse a running Chrome session for browser automation via Playwriter CLI + MCP. Use when the task depends on the browser the user already has open — existing logins, cookies, extensions, passkey-friendly flows, or live-tab continuity. Route repeatable fresh-browser or CI-style checks to browser-harness instead.
How do I install playwriter?
Run npx skills add https://github.com/akillness/jeo-skills --skill playwriter in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/playwriter/ (personal) or .claude/skills/playwriter/ (project).
Which AI agents can use playwriter?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is playwriter safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains playwriter?
It is published by akillness in akillness/jeo-skills. It has 344 recorded installs.
More from akillness/jeo-skills
rtk
akillness/jeo-skills
Install, initialize, verify, and troubleshoot RTK (Rust Token Killer) for AI coding agents. Use when you need to reduce shell-command token output, confirm that the correct rtk binary is installed, choose between Homebrew, install.sh, or Cargo installation, wire rtk init for Claude Code, Codex, Gemini CLI, Cursor, Copilot, Windsurf, Cline, or OpenCode, or use compact wrappers such as rtk git status, rtk read, rtk grep, rtk test, rtk lint, and rtk gain. Triggers on: rtk, rust token killer, token saver cli, rtk init, rtk gain, codex rtk, gemini rtk, opencode rtk, claude hook token reduction.
graphify
akillness/jeo-skills
Drive Graphify from its CLI to build, refresh, query, export, and serve a durable code/corpus knowledge graph. Use when the user wants .graphify/GRAPHREPORT.md, graph.json, graph.html, graphify update/summary/query/path/explain/tree, change-aware review context, git-hook or watch-based refresh, a stdio MCP graph server, or an install into jeo, jeopi, gjc, opencode, Claude, Codex, or Gemini. Also covers the honest structural fallback when native extraction is empty or misleading. Route simple locate/reference work to codebase-search, narrative knowledge-base work to llm-wiki, and project-memory handoff to opencontext. Triggers on: graphify, graphify update, graphify query, knowledge graph CLI, GRAPHREPORT.md, graph.json, codebase graph, graph refresh, graphify install, graphify serve, review context, affected flows.
data-analysis
akillness/jeo-skills
Analyze datasets to extract insights, identify patterns, and generate reports.
code-refactoring
akillness/jeo-skills
Turn a cleanup packet into one behavior-preserving refactor brief. Use when simplifying a messy function/component/service, freezing behavior before touching fragile legacy code, splitting a cleanup-heavy diff into reviewable slices, or planning a repeated migration / codemod without changing intended behavior. Route diagnosis to debugging, review judgment to code-review, validation-program design to testing-strategies, bottleneck-led tuning to performance-optimization, and pure symbol inventory to codebase-search.
technical-writing
akillness/jeo-skills
Write internal technical documentation for engineers and operators: technical specs, architecture docs, ADRs, runbooks, migration plans, and developer-facing implementation guides. Use when the main job is capturing a technical decision, system boundary, operating procedure, or rollout path for builders and maintainers. Triggers on: tech spec, design doc, architecture doc, ADR, runbook, migration guide, implementation guide, rollout doc, operational guide, and internal technical writing. End-user onboarding guides, tutorials, FAQs, and help-center flows belong here too. Route API portals to api-documentation, release notes to changelog-maintenance, decks to presentation-builder, and GTM messaging to marketing-automation.
web-accessibility
akillness/jeo-skills
Routing-first skill for web accessibility remediation and verification. Use when the main job is classifying which accessibility surface is failing — semantics, keyboard/focus, labels/announcements, visual perception/reflow, media alternatives, or routed-app navigation feedback — and turning vague audit, WCAG, axe/Lighthouse, or "make this accessible" requests into one concrete remediation packet. Broad UI critique for hierarchy, polish, and launch readiness belongs here too. Route component API architecture and system governance to design-system, and responsive layout strategy to responsive-design.
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。