[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C43SG5233WH221WX49WNRH":3,"skill-same:01M6C43SG5233WH221WX49WNRH":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":13,"ownerHtmlUrl":60,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":61,"install":62,"resources":75},"01M6C43SG5233WH221WX49WNRH","browser-canvas-testing","Canvas 游戏浏览器交互测试","VS Code native browser tool behavior for canvas-based games (Phaser 3, etc.). Use when interacting with HTML canvas elements, clicking game objects, verifying canvas state via browser tools, or when `clickElement` fails on canvas. DO NOT USE FOR: React component tests (use ui-testing) or Playwright E2E tests (use webapp-testing).","VS Code 原生浏览器工具在基于 canvas 的游戏（Phaser 3 等）中的行为指南。适用于与 HTML canvas 元素交互、点击游戏对象、通过浏览器工具验证 canvas 状态，或当 `clickElement` 在 canvas 上失败时。不适用于：React 组件测试（使用 ui-testing）或 Playwright E2E 测试（使用 webapp-testing）。","Grimblaz\u002Fagent-orchestra","Grimblaz","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F74755849?v=4","01M6C430M9XZDHGHPWQVTQ3KMA",null,"01M6C430RJY3MMX0QAZ3X8DR3Y",3,"MIT","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fbrowser-canvas-testing\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"canvas","browser canvas testing","browser","testing","e2e","webapp","html","use","behavior","tool","game","browser tools","react","Tools","ui","playwright","state","code","e2e tests","component","2026-11-10 10:12:30",false,"---\nname: browser-canvas-testing\ndescription: \"VS Code native browser tool behavior for canvas-based games (Phaser 3, etc.). Use when interacting with HTML canvas elements, clicking game objects, verifying canvas state via browser tools, or when `clickElement` fails on canvas. DO NOT USE FOR: React component tests (use ui-testing) or Playwright E2E tests (use webapp-testing).\"\n---\n\n# Browser Canvas Testing\n\nDomain knowledge for using VS Code native browser tools against HTML canvas applications verified via VS Code source code review.\n\n## When to Use\n\n- Clicking game objects or UI elements rendered inside an HTML `\u003Ccanvas>`\n- Verifying canvas visual state with `screenshotPage`\n- Discovering why `readPage` returns empty on a canvas-only page\n- Any Phaser 3 \u002F WebGL \u002F 2D canvas game interaction in browser tools\n\n---\n\n## 1. Why `clickElement` Cannot Target Canvas Objects\n\n`clickElement` is **selector-based only**. The VS Code source (`clickBrowserTool.ts`) defines these parameters:\n\n```\npageId, selector, ref, dblClick, button\n```\n\nThere is **no coordinate or position parameter**. The implementation does exactly:\n\n```js\npage.locator(selector).click();\n```\n\nA `\u003Ccanvas>` element renders its content via GPU\u002FCPU drawing calls — there are no child DOM elements for selectors to target. Even `canvas` as a CSS selector only clicks the canvas border box center, not a specific game object inside it.\n\n**Conclusion**: `clickElement` cannot be used for canvas game interaction. Use `runPlaywrightCode` instead.\n\n**Source**: [clickBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FclickBrowserTool.ts)\n\n---\n\n## 2. Canvas Coordinate Conversion Formula\n\nCanvas games use an internal game-space coordinate system that does not map directly to CSS page coordinates. Use `getBoundingClientRect` to convert.\n\n```js\n\u002F\u002F 1. Query canvas bounding rect (accounts for scaling and letterboxing)\nconst rect = await page.evaluate(() => {\n  const c = document.querySelector(\"canvas\");\n  if (!c) throw new Error(\"Canvas element not found\");\n  const r = c.getBoundingClientRect();\n  return { left: r.left, top: r.top, width: r.width, height: r.height };\n});\n\n\u002F\u002F 2. Convert game-space coords → CSS page coords\nconst cssX = rect.left + (gameX \u002F GAME_WIDTH) * rect.width;\nconst cssY = rect.top + (gameY \u002F GAME_HEIGHT) * rect.height;\n\n\u002F\u002F 3. Click via Playwright mouse API\nawait page.mouse.click(cssX, cssY);\n```\n\n**If the page has multiple `\u003Ccanvas>` elements** (e.g., a main scene canvas plus a HUD overlay), `document.querySelector('canvas')` returns the first one, which may not be the target. Use a specific selector instead: `document.querySelector('#game canvas')` or `document.getElementById('game-canvas')`. Inspect with `page.evaluate(() => document.querySelectorAll('canvas').length)` to detect multiple canvases.\n\n**Prerequisite**: The canvas must be rendered before calling `getBoundingClientRect()`. An unrendered canvas returns `{0,0,0,0}`, causing the formula to click `(0,0)` silently. See Section 3 for the render-ready wait pattern.\n\n**Variables**:\n\n- `gameX`, `gameY` — coordinates in the game's internal resolution (e.g., from game design docs or layout)\n- `GAME_WIDTH`, `GAME_HEIGHT` — the game's declared resolution (e.g., `1920`, `1080` for a 1920×1080 game)\n- `cssX`, `cssY` — CSS page coordinates passed to Playwright\n\nThis formula is verified working for Phaser 3 in **FIT scale mode** at 1920×1080.\n\n**Note — scale mode matters**: In FIT mode the canvas CSS box scales to the viewport while `GAME_WIDTH`\u002F`GAME_HEIGHT` stay constant, so this formula is exact. In **RESIZE mode** the game's internal resolution changes to match the viewport; use `canvas.width` and `canvas.height` read via `page.evaluate()` for `GAME_WIDTH`\u002F`GAME_HEIGHT` instead of hardcoded constants. Other modes (NONE, ENVELOP) may require similar adjustments.\n\n---\n\n## 3. `runPlaywrightCode` Usage Pattern\n\n`runPlaywrightCode` executes arbitrary Playwright code against the current browser page — the correct tool for all canvas interaction.\n\n**Full worked example** — click a game object at game-space position (960, 540) in a 1920×1080 game:\n\n```js\n\u002F\u002F Wait for canvas to be rendered and sized\nawait page.waitForFunction(() => {\n  const c = document.querySelector(\"canvas\");\n  return c !== null && c.getBoundingClientRect().width > 0;\n});\n\nconst rect = await page.evaluate(() => {\n  const c = document.querySelector(\"canvas\");\n  const r = c.getBoundingClientRect();\n  return { left: r.left, top: r.top, width: r.width, height: r.height };\n});\n\nconst GAME_WIDTH = 1920;\nconst GAME_HEIGHT = 1080;\nconst gameX = 960;\nconst gameY = 540;\n\nconst cssX = rect.left + (gameX \u002F GAME_WIDTH) * rect.width;\nconst cssY = rect.top + (gameY \u002F GAME_HEIGHT) * rect.height;\n\nawait page.mouse.click(cssX, cssY);\n```\n\n**Also useful via `runPlaywrightCode`**:\n\n- `await page.mouse.move(cssX, cssY)` — hover without clicking\n- `await page.keyboard.press('Space')` — send key events to the game\n- `await page.evaluate(() => window.gameState)` — read exposed JS globals for state assertions\n\n---\n\n## 4. `screenshotPage` — Works for Canvas Verification\n\n`screenshotPage` **does work** on canvas content. It uses VS Code's internal `browserViewModel.captureScreenshot()` — not Playwright's `.screenshot()` method. This internal capture reads the rendered frame buffer directly, so canvas pixels are captured correctly.\n\nUse `screenshotPage` to:\n\n- Verify game state visually after an interaction\n- Confirm UI transitions or animations completed\n- Capture evidence of pass\u002Ffail for test reports\n\n**Screenshot output**: write captured images to `.tmp\u002Fissue-{N}-{name}.png` per `skills\u002Fterminal-hygiene\u002FSKILL.md` `## Scratch & Temp-File Hygiene` — never pass a `C:\\...` absolute path to a Bash redirect.\n\n**Source**: [screenshotBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FscreenshotBrowserTool.ts)\n\n---\n\n## 5. `readPage` — Returns Empty for Canvas-Only Pages\n\n`readPage` calls `playwrightService.getSummary()` which returns a DOM accessibility\u002Fsemantic snapshot. Canvas elements render no accessible child nodes — the entire visual scene is opaque to the accessibility tree.\n\n**Result**: `readPage` returns an empty or near-empty response for canvas-only applications.\n\n**Do not use** `readPage` to:\n\n- Detect game objects or UI state in a canvas game\n- Assert text labels rendered inside the canvas\n- Navigate or introspect canvas content\n\nUse `runPlaywrightCode` with `page.evaluate()` to read game state from exposed JS APIs, or use `screenshotPage` for visual verification.\n\n**Source**: [readBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FreadBrowserTool.ts)\n\n---\n\n## VS Code Source Citations\n\nAll behaviors above are verified from VS Code 1.110 source code:\n\n| Tool                                        | Source File                                                                                                                                                                                        |\n| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `click_element` \u002F `clickElement`            | [clickBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FclickBrowserTool.ts)           |\n| `screenshot_page` \u002F `screenshotPage`        | [screenshotBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FscreenshotBrowserTool.ts) |\n| `read_page` \u002F `readPage`                    | [readBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FreadBrowserTool.ts)             |\n| `run_playwright_code` \u002F `runPlaywrightCode` | VS Code native Playwright code execution (no single tool source file — functionality available when `workbench.browser.enableChatTools: true`)                                                     |\n\n## Gotchas\n\n| Trigger                                                               | Gotcha                                                                                                                    | Fix                                                                                                          |\n| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |\n| Using `clickElement` to interact with canvas game objects             | `clickElement` is selector-based only — no coordinate parameter exists; canvas internals are not addressable via selector | Use `runPlaywrightCode` with `page.mouse.click(cssX, cssY)` and the canvas coordinate formula                |\n| Querying `getBoundingClientRect()` before the canvas has rendered     | Returns `{0, 0, 0, 0}` silently; click lands at top-left corner of page                                                   | Add `await page.waitForFunction(() => document.querySelector('canvas')?.width > 0)` before querying the rect |\n| Hardcoding `GAME_WIDTH`\u002F`GAME_HEIGHT` in RESIZE scale mode            | FIT formula doesn't apply; clicks land at wrong position                                                                  | Read `canvas.width`\u002F`canvas.height` via `page.evaluate()` rather than using known design dimensions          |\n| Using `document.querySelector('canvas')` when multiple canvases exist | Always returns the first canvas — may be HUD overlay, not game scene                                                      | Use a specific selector (`#game canvas`) or verify canvas count first                                        |\n| Using `readPage` on canvas-only pages                                 | Returns empty — canvas pixels are not DOM text                                                                            | Use `screenshotPage` for visual state verification instead                                                   |\n","# Browser Canvas Testing\n\nDomain knowledge for using VS Code native browser tools against HTML canvas applications verified via VS Code source code review.\n\n## When to Use\n\n- Clicking game objects or UI elements rendered inside an HTML `\u003Ccanvas>`\n- Verifying canvas visual state with `screenshotPage`\n- Discovering why `readPage` returns empty on a canvas-only page\n- Any Phaser 3 \u002F WebGL \u002F 2D canvas game interaction in browser tools\n\n---\n\n## 1. Why `clickElement` Cannot Target Canvas Objects\n\n`clickElement` is **selector-based only**. The VS Code source (`clickBrowserTool.ts`) defines these parameters:\n\n```\npageId, selector, ref, dblClick, button\n```\n\nThere is **no coordinate or position parameter**. The implementation does exactly:\n\n```js\npage.locator(selector).click();\n```\n\nA `\u003Ccanvas>` element renders its content via GPU\u002FCPU drawing calls — there are no child DOM elements for selectors to target. Even `canvas` as a CSS selector only clicks the canvas border box center, not a specific game object inside it.\n\n**Conclusion**: `clickElement` cannot be used for canvas game interaction. Use `runPlaywrightCode` instead.\n\n**Source**: [clickBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FclickBrowserTool.ts)\n\n---\n\n## 2. Canvas Coordinate Conversion Formula\n\nCanvas games use an internal game-space coordinate system that does not map directly to CSS page coordinates. Use `getBoundingClientRect` to convert.\n\n```js\n\u002F\u002F 1. Query canvas bounding rect (accounts for scaling and letterboxing)\nconst rect = await page.evaluate(() => {\n  const c = document.querySelector(\"canvas\");\n  if (!c) throw new Error(\"Canvas element not found\");\n  const r = c.getBoundingClientRect();\n  return { left: r.left, top: r.top, width: r.width, height: r.height };\n});\n\n\u002F\u002F 2. Convert game-space coords → CSS page coords\nconst cssX = rect.left + (gameX \u002F GAME_WIDTH) * rect.width;\nconst cssY = rect.top + (gameY \u002F GAME_HEIGHT) * rect.height;\n\n\u002F\u002F 3. Click via Playwright mouse API\nawait page.mouse.click(cssX, cssY);\n```\n\n**If the page has multiple `\u003Ccanvas>` elements** (e.g., a main scene canvas plus a HUD overlay), `document.querySelector('canvas')` returns the first one, which may not be the target. Use a specific selector instead: `document.querySelector('#game canvas')` or `document.getElementById('game-canvas')`. Inspect with `page.evaluate(() => document.querySelectorAll('canvas').length)` to detect multiple canvases.\n\n**Prerequisite**: The canvas must be rendered before calling `getBoundingClientRect()`. An unrendered canvas returns `{0,0,0,0}`, causing the formula to click `(0,0)` silently. See Section 3 for the render-ready wait pattern.\n\n**Variables**:\n\n- `gameX`, `gameY` — coordinates in the game's internal resolution (e.g., from game design docs or layout)\n- `GAME_WIDTH`, `GAME_HEIGHT` — the game's declared resolution (e.g., `1920`, `1080` for a 1920×1080 game)\n- `cssX`, `cssY` — CSS page coordinates passed to Playwright\n\nThis formula is verified working for Phaser 3 in **FIT scale mode** at 1920×1080.\n\n**Note — scale mode matters**: In FIT mode the canvas CSS box scales to the viewport while `GAME_WIDTH`\u002F`GAME_HEIGHT` stay constant, so this formula is exact. In **RESIZE mode** the game's internal resolution changes to match the viewport; use `canvas.width` and `canvas.height` read via `page.evaluate()` for `GAME_WIDTH`\u002F`GAME_HEIGHT` instead of hardcoded constants. Other modes (NONE, ENVELOP) may require similar adjustments.\n\n---\n\n## 3. `runPlaywrightCode` Usage Pattern\n\n`runPlaywrightCode` executes arbitrary Playwright code against the current browser page — the correct tool for all canvas interaction.\n\n**Full worked example** — click a game object at game-space position (960, 540) in a 1920×1080 game:\n\n```js\n\u002F\u002F Wait for canvas to be rendered and sized\nawait page.waitForFunction(() => {\n  const c = document.querySelector(\"canvas\");\n  return c !== null && c.getBoundingClientRect().width > 0;\n});\n\nconst rect = await page.evaluate(() => {\n  const c = document.querySelector(\"canvas\");\n  const r = c.getBoundingClientRect();\n  return { left: r.left, top: r.top, width: r.width, height: r.height };\n});\n\nconst GAME_WIDTH = 1920;\nconst GAME_HEIGHT = 1080;\nconst gameX = 960;\nconst gameY = 540;\n\nconst cssX = rect.left + (gameX \u002F GAME_WIDTH) * rect.width;\nconst cssY = rect.top + (gameY \u002F GAME_HEIGHT) * rect.height;\n\nawait page.mouse.click(cssX, cssY);\n```\n\n**Also useful via `runPlaywrightCode`**:\n\n- `await page.mouse.move(cssX, cssY)` — hover without clicking\n- `await page.keyboard.press('Space')` — send key events to the game\n- `await page.evaluate(() => window.gameState)` — read exposed JS globals for state assertions\n\n---\n\n## 4. `screenshotPage` — Works for Canvas Verification\n\n`screenshotPage` **does work** on canvas content. It uses VS Code's internal `browserViewModel.captureScreenshot()` — not Playwright's `.screenshot()` method. This internal capture reads the rendered frame buffer directly, so canvas pixels are captured correctly.\n\nUse `screenshotPage` to:\n\n- Verify game state visually after an interaction\n- Confirm UI transitions or animations completed\n- Capture evidence of pass\u002Ffail for test reports\n\n**Screenshot output**: write captured images to `.tmp\u002Fissue-{N}-{name}.png` per `skills\u002Fterminal-hygiene\u002FSKILL.md` `## Scratch & Temp-File Hygiene` — never pass a `C:\\...` absolute path to a Bash redirect.\n\n**Source**: [screenshotBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FscreenshotBrowserTool.ts)\n\n---\n\n## 5. `readPage` — Returns Empty for Canvas-Only Pages\n\n`readPage` calls `playwrightService.getSummary()` which returns a DOM accessibility\u002Fsemantic snapshot. Canvas elements render no accessible child nodes — the entire visual scene is opaque to the accessibility tree.\n\n**Result**: `readPage` returns an empty or near-empty response for canvas-only applications.\n\n**Do not use** `readPage` to:\n\n- Detect game objects or UI state in a canvas game\n- Assert text labels rendered inside the canvas\n- Navigate or introspect canvas content\n\nUse `runPlaywrightCode` with `page.evaluate()` to read game state from exposed JS APIs, or use `screenshotPage` for visual verification.\n\n**Source**: [readBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FreadBrowserTool.ts)\n\n---\n\n## VS Code Source Citations\n\nAll behaviors above are verified from VS Code 1.110 source code:\n\n| Tool                                        | Source File                                                                                                                                                                                        |\n| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `click_element` \u002F `clickElement`            | [clickBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FclickBrowserTool.ts)           |\n| `screenshot_page` \u002F `screenshotPage`        | [screenshotBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FscreenshotBrowserTool.ts) |\n| `read_page` \u002F `readPage`                    | [readBrowserTool.ts](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvscode\u002Fblob\u002F3487365a09898056546f68899ee94f286a3ca915\u002Fsrc\u002Fvs\u002Fworkbench\u002Fcontrib\u002FbrowserView\u002Felectron-browser\u002Ftools\u002FreadBrowserTool.ts)             |\n| `run_playwright_code` \u002F `runPlaywrightCode` | VS Code native Playwright code execution (no single tool source file — functionality available when `workbench.browser.enableChatTools: true`)                                                     |\n\n## Gotchas\n\n| Trigger                                                               | Gotcha                                                                                                                    | Fix                                                                                                          |\n| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |\n| Using `clickElement` to interact with canvas game objects             | `clickElement` is selector-based only — no coordinate parameter exists; canvas internals are not addressable via selector | Use `runPlaywrightCode` with `page.mouse.click(cssX, cssY)` and the canvas coordinate formula                |\n| Querying `getBoundingClientRect()` before the canvas has rendered     | Returns `{0, 0, 0, 0}` silently; click lands at top-left corner of page                                                   | Add `await page.waitForFunction(() => document.querySelector('canvas')?.width > 0)` before querying the rect |\n| Hardcoding `GAME_WIDTH`\u002F`GAME_HEIGHT` in RESIZE scale mode            | FIT formula doesn't apply; clicks land at wrong position                                                                  | Read `canvas.width`\u002F`canvas.height` via `page.evaluate()` rather than using known design dimensions          |\n| Using `document.querySelector('canvas')` when multiple canvases exist | Always returns the first canvas — may be HUD overlay, not game scene                                                      | Use a specific selector (`#game canvas`) or verify canvas count first                                        |\n| Using `readPage` on canvas-only pages                                 | Returns empty — canvas pixels are not DOM text                                                                            | Use `screenshotPage` for visual state verification instead                                                   |\n",{"name":5,"description":7},"main","d5486aacc32c9ca1b07173cfd530f8fe75c29e58","skills\u002Fbrowser-canvas-testing",0,"https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra","https:\u002F\u002Fgithub.com\u002FGrimblaz","2026-08-16 01:12:46",{"source":9,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add Grimblaz\u002Fagent-orchestra --skill browser-canvas-testing",{"tool":68,"command":69},"bunx","bunx skills add Grimblaz\u002Fagent-orchestra --skill browser-canvas-testing",{"tool":71,"command":72},"pnpm","pnpm dlx skills add Grimblaz\u002Fagent-orchestra --skill browser-canvas-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fbrowser-canvas-testing\u002FSKILL.md",true,[],[77,98,128,148,176,192],{"skillNo":78,"name":79,"nameZh":80,"description":81,"descriptionZh":82,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":83,"categories":84,"keywords":87,"publishedAt":50},"01M6C48YMJVFHM7DVGG1WWW5RJ","webapp-testing","Playwright 端到端测试","Playwright end-to-end testing guidance for web apps, with practical patterns and setup steps. Use when creating or improving browser-based E2E coverage, test stability, and CI execution. DO NOT USE FOR: React component tests (use ui-testing), canvas game interaction (use browser-canvas-testing), TDD workflow (use test-driven-development), debugging failures (use systematic-debugging), or randomized property tests (use property-based-testing).","面向 Web 应用的 Playwright 端到端测试指南，包含实用模式和设置步骤。在创建或改进基于浏览器的 E2E 覆盖率、测试稳定性和 CI 执行时使用。不要用于：React 组件测试（使用 ui-testing）、Canvas 游戏交互（使用 browser-canvas-testing）、TDD 工作流（使用 test-driven-development）、失败调试（使用 systematic-debugging）或随机化属性测试（使用 property-based-testing）。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[85,86],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[33,88,35,30,89,90,45,91,92,42,49,93,94,32,95,96,34,40,97,37],"webapp testing","tdd","workflow","test","web","debugging","development","ci","execution","coverage",{"skillNo":99,"name":100,"nameZh":101,"description":102,"descriptionZh":103,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":104,"categories":105,"keywords":110,"publishedAt":50},"01M6C48TNNP2KCSQXV8YK7SK49","verification-before-completion","任务完成前验证","Evidence-based verification checklist before marking work complete. Use before PRs, releases, marking tickets done, or any \"I'm finished\" declaration; also when naming a baseline commit for a differential suite claim, when designing a mutation campaign or red-run evidence, when making an absence claim, a universal claim, or a one-time demonstration offered as a standing guarantee, when attributing a measurement or claiming a sweep or verification loop is complete, and when stating what a check or a CI suite will do about a change. DO NOT USE FOR: post-merge cleanup or archival (use post-pr-review) or processing GitHub review comments (use code-review-intake).","在将工作标记为完成前使用的基于证据的验证清单。适用于提交 PR、发布、将工单标记为完成，或任何「我已完成」的声明之前；也适用于为差异测试套件的主张指定基线提交、设计变异测试活动或红灯运行证据、做出「不存在」的主张、普遍性主张，或将一次性演示作为长期保证提供时、归因某项测量结果或声称某次扫描或验证循环已完成时，以及陈述某项检查或 CI 套件将如何处理某个变更时。不要用于：合并后清理或归档（使用 post-pr-review），或处理 GitHub 审查意见（使用 code-review-intake）。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[106,107],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":108,"categoryName":109,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8C48JNVH0P83Z0KVKAQ4819","成果验证与价值评估",[111,112,113,114,115,116,117,118,119,47,120,121,95,122,123,124,125,37,126,127],"verification","verification before completion","review","change","commit","merge","pr","cleanup","run","code-review","intake","loop","verification loop","work","check","evidence","campaign",{"skillNo":129,"name":130,"nameZh":131,"description":132,"descriptionZh":133,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":134,"categories":135,"keywords":138,"publishedAt":50},"01M6C48QZWNTP7JGKD32QZAKKX","validation-methodology","验证与审查方法论","Reusable validation and review methodology for staged validation, failure triage, and prosecution-depth setup. Use when running validation ladders, triaging failures, or executing adversarial review passes. DO NOT USE FOR: CE Gate orchestration, specialist dispatch ownership, or step execution flow (keep those in Code-Conductor).","用于分阶段验证、故障分诊和追查深度设置的可复用验证与审查方法论。在运行验证阶梯、对失败进行分诊或执行对抗性审查时使用。不要用于：CE Gate 编排、专家派发的职责归属或步骤执行流程（这些保留在 Code-Conductor 中）。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fvalidation-methodology\u002FSKILL.md",[136,137],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":108,"categoryName":109,"taxonomyType":27,"taxonomyTypeDesc":28},[139,140,141,113,142,143,144,145,47,146,96,37,147],"validation","methodology","validation methodology","triage","orchestration","setup","adversarial review","flow","dispatch",{"skillNo":149,"name":150,"nameZh":151,"description":152,"descriptionZh":153,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":154,"categories":155,"keywords":162,"publishedAt":50},"01M6C48MCAHG5Z79BJ369CRYRZ","upstream-onboarding","上游智能体接手协议","Shared opening-phase protocol for upstream agents (Experience-Owner, Solution-Designer, Issue-Planner) and Code-Conductor when invoked on an existing GitHub issue. Renders a scaled context brief and runs a standards check on inherited work at each phase boundary. Use when a user-invocable agent receives a request referencing an existing GitHub issue and must load solution-authoring and upstream-onboarding at the opening phase. DO NOT USE FOR: subagent dispatches (which already operate within an assessed session context); post-merge review (use post-pr-review); research or non-tree subagents.","供上游智能体（Experience-Owner、Solution-Designer、Issue-Planner）与 Code-Conductor 在针对现有 GitHub issue 被调用时使用的共享开场阶段协议。它会生成适配规模的上下文简报，并在每个阶段边界对承接的工作执行标准检查。当用户可调用的智能体收到引用现有 GitHub issue 的请求、且必须在开场阶段加载 solution-authoring 与 upstream-onboarding 时使用。不要用于：子智能体派发（其已在经评估的会话上下文中运行）、合并后审查（使用 post-pr-review）、研究类或非树形子智能体。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fupstream-onboarding\u002FSKILL.md",[156,159],{"categoryNo":157,"categoryName":158,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",{"categoryNo":160,"categoryName":161,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发",[163,164,113,165,166,116,167,117,47,168,169,170,171,172,173,124,125,174,175,37],"onboarding","upstream onboarding","github","research","standards check","protocol","brief","boundary","designer","subagent","planner","user","session",{"skillNo":177,"name":178,"nameZh":179,"description":180,"descriptionZh":181,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":182,"categories":183,"keywords":186,"publishedAt":50},"01M6C48GPVE120TGPMD1CS365H","ui-testing","React 组件测试策略","Resilient React component testing strategies focusing on user behavior. Use when writing or reviewing component-level React tests, fixing flaky component tests, or establishing React testing patterns. DO NOT USE FOR: Playwright E2E tests (use webapp-testing), canvas game interaction (use browser-canvas-testing), TDD workflow (use test-driven-development), debugging failures (use systematic-debugging), UI component design (use frontend-design), or randomized property tests (use property-based-testing).","以用户行为为核心的弹性 React 组件测试策略。适用于编写或审阅组件级 React 测试、修复不稳定的组件测试，或建立 React 测试模式。不适用于：Playwright E2E 测试（使用 webapp-testing）、canvas 游戏交互（使用 browser-canvas-testing）、TDD 工作流（使用 test-driven-development）、失败调试（使用 systematic-debugging）、UI 组件设计（使用 frontend-design），或随机属性测试（使用 property-based-testing）。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fui-testing\u002FSKILL.md",[184,185],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[33,44,187,188,189,190,30,90,45,91,42,49,93,94,32,191,34,40,37,35],"ui testing","frontend","design","writing","testing patterns",{"skillNo":193,"name":194,"nameZh":195,"description":196,"descriptionZh":197,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":198,"categories":199,"keywords":206,"publishedAt":50},"01M6C48DRJ9XBDR2FW0W37DY53","ui-iteration","UI 界面视觉迭代优化","Reusable screenshot-driven UI polish workflow for iterative visual refinement. Use when improving layout, hierarchy, spacing, feedback, or Tailwind-based presentation through repeated review-and-adjust passes. DO NOT USE FOR: functional bug fixing, accessibility-only audits, or major redesign strategy work (use Code-Smith or frontend-design).","可复用的截图驱动 UI 打磨工作流，用于迭代式视觉优化。适用于通过反复审阅与调整来改进布局、层级、间距、反馈或基于 Tailwind 的呈现效果。不适用于：功能性 Bug 修复、仅针对无障碍的审计，或重大重设计策略工作（使用 Code-Smith 或 frontend-design）。","https:\u002F\u002Fgithub.com\u002FGrimblaz\u002Fagent-orchestra\u002Fblob\u002Fmain\u002Fskills\u002Fui-iteration\u002FSKILL.md",[200,203],{"categoryNo":201,"categoryName":202,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQMKHSMFVQHR2KYAEVN","界面设计师",{"categoryNo":204,"categoryName":205,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[44,207,188,189,113,90,208,47,209,210,211,212,213,124,214,215,37,216],"ui iteration","accessibility","screenshot","Tailwind","polish","ui polish","feedback","redesign","strategy","only"]