[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75MDB7R92QFPFMNS2MDCBM3":3,"skill-same:01M75MDB7R92QFPFMNS2MDCBM3":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M75MDB7R92QFPFMNS2MDCBM3","playwright-mcp",null,"Complete guide for using Playwright MCP to automate browsers inside AI agent workflows. Use this skill whenever the agent needs to: navigate web pages, fill forms, click elements, take screenshots, mock API responses, manage cookies\u002FlocalStorage, save auth state, generate Playwright test code, record video\u002Ftraces, export PDFs, or handle any browser interaction. Triggers on phrases like \"open browser\", \"automate this flow\", \"test this page\", \"fill this form\", \"screenshot this site\", \"mock the API\", \"save login state\", \"generate playwright test\", \"browser automation\", \"interact with the site\", or any task requiring real browser control. Even if the user mentions just a URL and a goal, this skill applies.","Razaib-khan\u002FForgeWeave","Razaib-khan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160170334?v=4","01M75M7QPJVP3N29AZVG6RN6R7","Razaib Khan","01M75M7QQS6KEPD0W2ZB99ENKK",1,"MIT","https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave\u002Fblob\u002Fmain\u002Fsrc\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Fplaywright-mcp\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: playwright-mcp\ndescription: |\n  Complete guide for using Playwright MCP to automate browsers inside AI agent workflows. Use this skill whenever the agent needs to: navigate web pages, fill forms, click elements, take screenshots, mock API responses, manage cookies\u002FlocalStorage, save auth state, generate Playwright test code, record video\u002Ftraces, export PDFs, or handle any browser interaction. Triggers on phrases like \"open browser\", \"automate this flow\", \"test this page\", \"fill this form\", \"screenshot this site\", \"mock the API\", \"save login state\", \"generate playwright test\", \"browser automation\", \"interact with the site\", or any task requiring real browser control. Even if the user mentions just a URL and a goal, this skill applies.\n---\n\n# Playwright MCP — AI Agent Browser Automation\n\nPlaywright MCP is a **Model Context Protocol server** that lets AI agents control real browsers through structured accessibility snapshots. Refs like `e5`, `e12` give deterministic handles to every interactive element — no pixel-guessing, no brittle CSS selectors.\n\n> **Read `references\u002Ftools.md`** for the full tool catalogue before choosing an approach.  \n> **Read `references\u002Fconfig.md`** for CLI flags, capabilities, and JSON config options.  \n> **Read `references\u002Fpatterns.md`** for copy-paste workflow recipes.\n\n---\n\n## Core Mental Model\n\n```\nbrowser_navigate → browser_snapshot → interact via refs → browser_snapshot (verify)\n```\n\nEvery action follows this cycle. The snapshot is the ground truth. Never assume page state — always re-snapshot after an action.\n\n---\n\n## Decision Tree: What to Use\n\n### 1. Snapshot vs Vision Mode\n\n| Situation | Use |\n|-----------|-----|\n| Standard web app — forms, buttons, links, tables | **Snapshot (default)** |\n| Canvas, SVG, chart, game UI, custom drawn widget | **Vision mode** (`--caps=vision`) |\n| Verifying visual layout, pixel correctness | **Screenshot** + snapshot together |\n\n**Rule:** Snapshots for 90%+ of tasks. Vision only for elements absent from the accessibility tree.\n\n### 2. Which Capability to Enable\n\nEnable only what you need — each capability adds tokens to every interaction:\n\n| Need | Add to `--caps=` |\n|------|-----------------|\n| Mock API responses \u002F intercept network | `network` |\n| Cookies, localStorage, auth state save\u002Frestore | `storage` |\n| Verify elements, generate `.spec.ts` test code | `testing` |\n| Canvas\u002Fchart coordinate-based clicking | `vision` |\n| Export page as PDF | `pdf` |\n| Video recording, tracing | `devtools` |\n\nMinimal config (no capabilities) is fastest and cheapest on tokens.\n\n### 3. Token Budget Awareness\n\nA single `browser_navigate` on a content-rich page can return **thousands of tokens**. Across a multi-step session this compounds.\n\n| Practice | Saves Tokens |\n|----------|-------------|\n| Enable only needed capabilities | High |\n| Use `browser_snapshot` only when you need to verify or find a ref | High |\n| Avoid `browser_take_screenshot` unless visual proof is required | Medium |\n| Use `browser_fill_form` (one call) instead of multiple `browser_type` | Low |\n| Stop tracing\u002Fvideo when not debugging | Medium |\n\n---\n\n## Standard Workflow Templates\n\n### Login Flow\n\n```\nbrowser_navigate { url }\nbrowser_snapshot                          → find email\u002Fpassword refs\nbrowser_type { ref: \"e3\", text: email }\nbrowser_type { ref: \"e5\", text: password }\nbrowser_click { ref: \"e7\" }              → submit button\nbrowser_snapshot                          → verify dashboard appeared\n```\n\nSave state after login so you never repeat it:\n```\nbrowser_storage_state                     → writes auth-state.json\n```\nRestore on next run: `--storage-state=.\u002Fauth-state.json`\n\n### Form Fill (Multi-Field)\n\n```\nbrowser_navigate { url }\nbrowser_snapshot\nbrowser_fill_form {\n  fields: [\n    { ref: \"e3\", value: \"...\" },\n    { ref: \"e5\", value: \"...\" }\n  ]\n}\nbrowser_click { ref: \"e9\" }              → submit\nbrowser_snapshot                          → verify success message\n```\n\n### API Mocking\n\nRequires `--caps=network`:\n```\nbrowser_route {\n  pattern: \"**\u002Fapi\u002Fusers\",\n  body: '[{\"id\":1,\"name\":\"Alice\"}]',\n  contentType: \"application\u002Fjson\"\n}\nbrowser_navigate { url }\nbrowser_snapshot                          → page now uses mocked data\n```\n\n### Debugging a Broken Page\n\n```\nbrowser_navigate { url }\nbrowser_console_messages { level: \"error\" }   → read JS errors first\nbrowser_snapshot                              → inspect element tree\nbrowser_take_screenshot                       → visual evidence\n```\n\nIf the problem is complex, start a trace:\n```\nbrowser_start_tracing\n[... reproduce the issue ...]\nbrowser_stop_tracing                          → share trace.zip with team\n```\n\n### Generate Playwright Test Code\n\nRequires `--caps=testing`. After completing an exploratory flow:\n```\nbrowser_generate_locator { ref: \"e5\" }\n→ page.getByPlaceholder('What needs to be done?')\n```\nUse `browser_verify_text_visible`, `browser_verify_element_visible` to add assertions that translate to `expect()` calls.\n\n---\n\n## Common Pitfalls\n\n| Mistake | Correct Approach |\n|---------|-----------------|\n| Acting on a stale ref after page re-render | Re-run `browser_snapshot` before each new interaction |\n| Using vision mode on a standard form | Default to snapshot — forms are always in the accessibility tree |\n| Taking screenshots repeatedly to \"check\" state | Use `browser_snapshot` — it's structured and token-cheaper |\n| Opening storage\u002Fnetwork capabilities you don't need | Only add capabilities matching the task |\n| Forgetting `browser_wait_for` on dynamic pages | Wait for content to appear before snapshotting |\n| Logging in on every agent run | Save `browser_storage_state` once, load with `--storage-state` |\n| Multiple `browser_type` calls for one form | Use `browser_fill_form` — one call, fewer tokens |\n\n---\n\n## Refs: How They Work\n\nAfter `browser_snapshot`, every interactive element has a `ref` like `e5`. These refs are:\n- **Ephemeral** — valid only until the next page render\n- **Deterministic** — clicking `e5` always hits the same element\n- **Auto-waitable** — Playwright waits for the element to be ready before acting\n\nAlways re-snapshot when you suspect the page has changed.\n\n---\n\n## Quick Config Reference\n\n```json\n{\n  \"mcpServers\": {\n    \"playwright\": {\n      \"command\": \"npx\",\n      \"args\": [\"@playwright\u002Fmcp@latest\", \"--caps=network,storage,testing\"]\n    }\n  }\n}\n```\n\nKey flags: `--headless`, `--browser=firefox`, `--device=iPhone 15`, `--isolated`, `--storage-state=.\u002Fauth.json`, `--port 8931` (HTTP server mode).\n\nFull options → `references\u002Fconfig.md`  \nFull tool list → `references\u002Ftools.md`  \nCopy-paste recipes → `references\u002Fpatterns.md`","# Playwright MCP — AI Agent Browser Automation\n\nPlaywright MCP is a **Model Context Protocol server** that lets AI agents control real browsers through structured accessibility snapshots. Refs like `e5`, `e12` give deterministic handles to every interactive element — no pixel-guessing, no brittle CSS selectors.\n\n> **Read `references\u002Ftools.md`** for the full tool catalogue before choosing an approach.  \n> **Read `references\u002Fconfig.md`** for CLI flags, capabilities, and JSON config options.  \n> **Read `references\u002Fpatterns.md`** for copy-paste workflow recipes.\n\n---\n\n## Core Mental Model\n\n```\nbrowser_navigate → browser_snapshot → interact via refs → browser_snapshot (verify)\n```\n\nEvery action follows this cycle. The snapshot is the ground truth. Never assume page state — always re-snapshot after an action.\n\n---\n\n## Decision Tree: What to Use\n\n### 1. Snapshot vs Vision Mode\n\n| Situation | Use |\n|-----------|-----|\n| Standard web app — forms, buttons, links, tables | **Snapshot (default)** |\n| Canvas, SVG, chart, game UI, custom drawn widget | **Vision mode** (`--caps=vision`) |\n| Verifying visual layout, pixel correctness | **Screenshot** + snapshot together |\n\n**Rule:** Snapshots for 90%+ of tasks. Vision only for elements absent from the accessibility tree.\n\n### 2. Which Capability to Enable\n\nEnable only what you need — each capability adds tokens to every interaction:\n\n| Need | Add to `--caps=` |\n|------|-----------------|\n| Mock API responses \u002F intercept network | `network` |\n| Cookies, localStorage, auth state save\u002Frestore | `storage` |\n| Verify elements, generate `.spec.ts` test code | `testing` |\n| Canvas\u002Fchart coordinate-based clicking | `vision` |\n| Export page as PDF | `pdf` |\n| Video recording, tracing | `devtools` |\n\nMinimal config (no capabilities) is fastest and cheapest on tokens.\n\n### 3. Token Budget Awareness\n\nA single `browser_navigate` on a content-rich page can return **thousands of tokens**. Across a multi-step session this compounds.\n\n| Practice | Saves Tokens |\n|----------|-------------|\n| Enable only needed capabilities | High |\n| Use `browser_snapshot` only when you need to verify or find a ref | High |\n| Avoid `browser_take_screenshot` unless visual proof is required | Medium |\n| Use `browser_fill_form` (one call) instead of multiple `browser_type` | Low |\n| Stop tracing\u002Fvideo when not debugging | Medium |\n\n---\n\n## Standard Workflow Templates\n\n### Login Flow\n\n```\nbrowser_navigate { url }\nbrowser_snapshot                          → find email\u002Fpassword refs\nbrowser_type { ref: \"e3\", text: email }\nbrowser_type { ref: \"e5\", text: password }\nbrowser_click { ref: \"e7\" }              → submit button\nbrowser_snapshot                          → verify dashboard appeared\n```\n\nSave state after login so you never repeat it:\n```\nbrowser_storage_state                     → writes auth-state.json\n```\nRestore on next run: `--storage-state=.\u002Fauth-state.json`\n\n### Form Fill (Multi-Field)\n\n```\nbrowser_navigate { url }\nbrowser_snapshot\nbrowser_fill_form {\n  fields: [\n    { ref: \"e3\", value: \"...\" },\n    { ref: \"e5\", value: \"...\" }\n  ]\n}\nbrowser_click { ref: \"e9\" }              → submit\nbrowser_snapshot                          → verify success message\n```\n\n### API Mocking\n\nRequires `--caps=network`:\n```\nbrowser_route {\n  pattern: \"**\u002Fapi\u002Fusers\",\n  body: '[{\"id\":1,\"name\":\"Alice\"}]',\n  contentType: \"application\u002Fjson\"\n}\nbrowser_navigate { url }\nbrowser_snapshot                          → page now uses mocked data\n```\n\n### Debugging a Broken Page\n\n```\nbrowser_navigate { url }\nbrowser_console_messages { level: \"error\" }   → read JS errors first\nbrowser_snapshot                              → inspect element tree\nbrowser_take_screenshot                       → visual evidence\n```\n\nIf the problem is complex, start a trace:\n```\nbrowser_start_tracing\n[... reproduce the issue ...]\nbrowser_stop_tracing                          → share trace.zip with team\n```\n\n### Generate Playwright Test Code\n\nRequires `--caps=testing`. After completing an exploratory flow:\n```\nbrowser_generate_locator { ref: \"e5\" }\n→ page.getByPlaceholder('What needs to be done?')\n```\nUse `browser_verify_text_visible`, `browser_verify_element_visible` to add assertions that translate to `expect()` calls.\n\n---\n\n## Common Pitfalls\n\n| Mistake | Correct Approach |\n|---------|-----------------|\n| Acting on a stale ref after page re-render | Re-run `browser_snapshot` before each new interaction |\n| Using vision mode on a standard form | Default to snapshot — forms are always in the accessibility tree |\n| Taking screenshots repeatedly to \"check\" state | Use `browser_snapshot` — it's structured and token-cheaper |\n| Opening storage\u002Fnetwork capabilities you don't need | Only add capabilities matching the task |\n| Forgetting `browser_wait_for` on dynamic pages | Wait for content to appear before snapshotting |\n| Logging in on every agent run | Save `browser_storage_state` once, load with `--storage-state` |\n| Multiple `browser_type` calls for one form | Use `browser_fill_form` — one call, fewer tokens |\n\n---\n\n## Refs: How They Work\n\nAfter `browser_snapshot`, every interactive element has a `ref` like `e5`. These refs are:\n- **Ephemeral** — valid only until the next page render\n- **Deterministic** — clicking `e5` always hits the same element\n- **Auto-waitable** — Playwright waits for the element to be ready before acting\n\nAlways re-snapshot when you suspect the page has changed.\n\n---\n\n## Quick Config Reference\n\n```json\n{\n  \"mcpServers\": {\n    \"playwright\": {\n      \"command\": \"npx\",\n      \"args\": [\"@playwright\u002Fmcp@latest\", \"--caps=network,storage,testing\"]\n    }\n  }\n}\n```\n\nKey flags: `--headless`, `--browser=firefox`, `--device=iPhone 15`, `--isolated`, `--storage-state=.\u002Fauth.json`, `--port 8931` (HTTP server mode).\n\nFull options → `references\u002Fconfig.md`  \nFull tool list → `references\u002Ftools.md`  \nCopy-paste recipes → `references\u002Fpatterns.md`",{"name":5,"description":7},"main","93f2582acd699b8d3917b2b61fdd2178b69f921c","src\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Fplaywright-mcp",0,"https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave","https:\u002F\u002Fgithub.com\u002FRazaib-khan","Web dev & AI explorer | Building, breaking, learning | Long-term mindset","2026-06-22 22:46:11",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Razaib-khan\u002FForgeWeave --skill playwright-mcp",{"tool":38,"command":39},"bunx","bunx skills add Razaib-khan\u002FForgeWeave --skill playwright-mcp",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Razaib-khan\u002FForgeWeave --skill playwright-mcp","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave\u002Fblob\u002Fmain\u002Fsrc\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Fplaywright-mcp\u002FSKILL.md",true,[46,52,56],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fconfig.md","REFERENCE","参考文档",5902,"https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave\u002Fblob\u002Fmain\u002Fsrc\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Fplaywright-mcp\u002Freferences\u002Fconfig.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fpatterns.md",7538,"https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave\u002Fblob\u002Fmain\u002Fsrc\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Fplaywright-mcp\u002Freferences\u002Fpatterns.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Ftools.md",6167,"https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave\u002Fblob\u002Fmain\u002Fsrc\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Fplaywright-mcp\u002Freferences\u002Ftools.md",[61,68,75,82,89,96],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M75MEJ4J1S2ZERWSM5ZBKRTE","Workflow Orchestrator","Coordinates multi-skill execution pipelines (e.g., research → plan → build → test)","https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave\u002Fblob\u002Fmain\u002Fsrc\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Fworkflow-orchestrator\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M75MEEZQ0V89BABKZF5XQ3MW","Web Research","Browser-driven or scraping-based skill for real-time internet extraction using Playwright and HTTP-based fetching","https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave\u002Fblob\u002Fmain\u002Fsrc\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Fweb-research\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M75MECJV3NEN6GY89ZT7NWFA","Validation Engine","Checks outputs from other skills for consistency, correctness, and adherence to AGENTS.md rules","https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave\u002Fblob\u002Fmain\u002Fsrc\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Fvalidation-engine\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M75MEAAXKRA9HJWWQH0MMBGY","Tool Selector","Determines which tools, APIs, MCP actions, or system capabilities are required for a given task","https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave\u002Fblob\u002Fmain\u002Fsrc\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Ftool-selector\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M75ME7JAXQG26T1NEB3VNDM6","Test Generator","Creates test plans and test cases (unit, integration, edge cases) based on existing or planned code","https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave\u002Fblob\u002Fmain\u002Fsrc\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Ftest-generator\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M75ME52949X3D8JQSYAWGDRB","Skill Generator","Meta-skill that creates new SKILL.md files from research outputs and patterns discovered in execution","https:\u002F\u002Fgithub.com\u002FRazaib-khan\u002FForgeWeave\u002Fblob\u002Fmain\u002Fsrc\u002Fforgeweave\u002Ftemplates\u002Fqwen\u002F.qwen\u002Fskills\u002Fskill-generator\u002FSKILL.md",[],[]]