[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78FCKC9FDDX02HD4C3WJC6F":3,"skill-same:01M78FCKC9FDDX02HD4C3WJC6F":79},{"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":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M78FCKC9FDDX02HD4C3WJC6F","visual-regression",null,"Automated pixel-level visual regression testing (VRT), Playwright snapshot integration, SSIM\u002Fpixelmatch diffing, dynamic masking, animation freezing, and deterministic CI rendering gates.","poppyTM\u002Foride","poppyTM","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F339400917?v=4","01M78F6YNKFR5S5JQR27X9F09Z","Poppy Team","01M78F6YP8ZZTRES9X8Q2ZAD21",1,"MIT","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvisual-regression\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: visual-regression\ndescription: Automated pixel-level visual regression testing (VRT), Playwright snapshot integration, SSIM\u002Fpixelmatch diffing, dynamic masking, animation freezing, and deterministic CI rendering gates.\n---\n\n# Automated Visual Regression Testing (VRT) Contract\n\n## 1. Purpose\nDesign, execute, and govern automated pixel-level Visual Regression Testing (VRT) suites across component libraries and full-page application views. Prevent unintended layout shifts, font regressions, color mutations, and responsive breakpoint bugs by enforcing deterministic headless environments, dynamic content masking, animation freezing, and strict pixelmatch\u002FSSIM thresholds.\n\n---\n\n## 2. Use When\n- Establishing CI visual gates for component design systems (Storybook, Playwright Test).\n- Validating refactored CSS, Tailwind classes, or global design tokens against visual regressions.\n- Auditing multi-theme rendering (Light, Dark, High-Contrast) across responsive viewports.\n- Verifying cross-browser rendering parity (Chromium, WebKit, Firefox).\n\n---\n\n## 3. Do Not Use When\n- Performing functional assertion testing (DOM text, API mocks, unit state logic) where Playwright standard assertions or Jest suffice.\n- Auditing purely semantic accessibility or keyboard roving focus without visual rendering (use `keyboard-accessibility` or `screen-reader`).\n- Rapid low-fidelity prototyping where designs change hourly.\n\n---\n\n## 4. Required Context\nBefore capturing or updating visual snapshot baselines, verify:\n1. **Target Viewports & Device Matrix**: Desktop (1280x720), Tablet (768x1024), Mobile (375x667), and Device Pixel Ratio (DPR 1x vs 2x Retina).\n2. **Theme Matrix**: Light mode, Dark mode, High-contrast mode.\n3. **Dynamic Content Selectors**: Selectors for timestamps, user profile pictures, live counters, random transaction IDs, and ads.\n4. **Target Rendering Engine**: Headless Chromium \u002F WebKit running in a standardized Docker container to guarantee identical font rasterization.\n\n---\n\n## 5. Procedure\n\n### Step 1: Flakiness Mitigation & Environment Stabilization\nTo prevent false-positive visual failures:\n1. **Freeze Motion**: Inject CSS disabling all CSS transitions, animations, and smooth scrolling:\n   ```css\n   *, *::before, *::after {\n     animation-duration: 0s !important;\n     animation-delay: 0s !important;\n     transition-duration: 0s !important;\n     transition-delay: 0s !important;\n   }\n   ```\n2. **Mock Clocks & Deterministic Data**: Freeze the system time via Playwright `page.clock.setFixedTime()` and mock all API network payloads.\n3. **Await Font & Asset Readiness**: Wait explicitly for `document.fonts.ready` and all visible `\u003Cimg>` tags to complete loading prior to taking the snapshot.\n\n### Step 2: Dynamic Content Masking\n1. Identify elements with unpredictable visual variation (e.g., live clocks, fluctuating metric charts, user avatars).\n2. Pass locator masks to the snapshot capture command:\n   ```typescript\n   await expect(page).toHaveScreenshot('dashboard-view.png', {\n     mask: [page.locator('[data-testid=\"live-timestamp\"]'), page.locator('.user-avatar')],\n     maskColor: '#ff00ff',\n   });\n   ```\n\n### Step 3: Snapshot Capture & Comparison (Pixelmatch \u002F SSIM)\n1. Execute image comparison comparing the current capture against the committed golden baseline.\n2. Configure threshold boundaries:\n   - `threshold` (perceptual color delta): `0.1` to `0.2` (in CIELAB or YIQ color space).\n   - `maxDiffPixelRatio`: Max acceptable ratio of mismatched pixels (default: $\\le 0.001$, i.e. 0.1%).\n3. Automatically generate a 3-way visual artifact upon failure:\n   - **Baseline Image** (Approved Golden State).\n   - **Current Image** (Test Execution State).\n   - **Diff Image** (Mismatched pixels highlighted in high-visibility magenta `#ff00ff`).\n\n### Step 4: Baseline Triage & Update Governance\n1. If diffs represent legitimate intentional design modifications:\n   - Review the diff in PR review.\n   - Run `prumo test visual --update-snapshots` (or `npx playwright test --update-snapshots`).\n   - Commit the updated baseline images with explicit PR approval.\n2. If diffs represent unintended styling defects:\n   - Reject the CI build and remediate CSS\u002Fcomponent layout.\n\n---\n\n## 6. Decision Rules\n1. **Zero Unfrozen Animations**: A snapshot test executed without animation freezing is an invalid, flaky test that must not merge into CI.\n2. **Standardized CI Rasterization**: Baselines must be generated inside the exact same container image \u002F Linux distribution as the CI runner to prevent macOS vs. Linux FreeType antialiasing discrepancies.\n3. **No Unmasked Dynamic Timestamps**: Any test capturing a live date\u002Ftime without a mask or frozen clock is a defect.\n4. **Explicit PR Review for Baseline Mutations**: Golden image commits require visual sign-off from the design or frontend lead.\n\n---\n\n## 7. Evidence Required\n- **VRT Test Run Log**: Playwright or pixelmatch test execution log passing with 0 mismatched pixels.\n- **Diff Artifact Bundle**: When failures occur, baseline, actual, and diff PNG files published as CI artifacts.\n- **Environment Hash**: Docker container image tag or OS\u002Ffont configuration recorded with the baseline.\n\n---\n\n## 8. Output Contract\nA production visual regression deliverable must contain:\n1. Playwright test suite (`tests\u002Fvisual\u002F*.spec.ts`).\n2. Playwright VRT configuration (`playwright.config.ts`).\n3. Visual Regression Audit Report (`templates\u002Fvisual-regression-report.md`).\n4. Baseline image repository under version control.\n\n---\n\n## 9. Stop Conditions\n- 100% of defined visual snapshot test cases match baseline within tolerance.\n- Zero flaky false positives across 5 consecutive CI runs.\n- Failure artifacts generate clear 3-way image diffs.\n\n---\n\n## 10. Escalation Rules\n- Escalate to Design Lead if cross-browser rendering discrepancies (e.g. WebKit sub-pixel text rendering differences) cannot be reconciled within standard tolerance.\n- Escalate to DevOps if CI container resource constraints cause headless browser screenshot timeouts.\n","# Automated Visual Regression Testing (VRT) Contract\n\n## 1. Purpose\nDesign, execute, and govern automated pixel-level Visual Regression Testing (VRT) suites across component libraries and full-page application views. Prevent unintended layout shifts, font regressions, color mutations, and responsive breakpoint bugs by enforcing deterministic headless environments, dynamic content masking, animation freezing, and strict pixelmatch\u002FSSIM thresholds.\n\n---\n\n## 2. Use When\n- Establishing CI visual gates for component design systems (Storybook, Playwright Test).\n- Validating refactored CSS, Tailwind classes, or global design tokens against visual regressions.\n- Auditing multi-theme rendering (Light, Dark, High-Contrast) across responsive viewports.\n- Verifying cross-browser rendering parity (Chromium, WebKit, Firefox).\n\n---\n\n## 3. Do Not Use When\n- Performing functional assertion testing (DOM text, API mocks, unit state logic) where Playwright standard assertions or Jest suffice.\n- Auditing purely semantic accessibility or keyboard roving focus without visual rendering (use `keyboard-accessibility` or `screen-reader`).\n- Rapid low-fidelity prototyping where designs change hourly.\n\n---\n\n## 4. Required Context\nBefore capturing or updating visual snapshot baselines, verify:\n1. **Target Viewports & Device Matrix**: Desktop (1280x720), Tablet (768x1024), Mobile (375x667), and Device Pixel Ratio (DPR 1x vs 2x Retina).\n2. **Theme Matrix**: Light mode, Dark mode, High-contrast mode.\n3. **Dynamic Content Selectors**: Selectors for timestamps, user profile pictures, live counters, random transaction IDs, and ads.\n4. **Target Rendering Engine**: Headless Chromium \u002F WebKit running in a standardized Docker container to guarantee identical font rasterization.\n\n---\n\n## 5. Procedure\n\n### Step 1: Flakiness Mitigation & Environment Stabilization\nTo prevent false-positive visual failures:\n1. **Freeze Motion**: Inject CSS disabling all CSS transitions, animations, and smooth scrolling:\n   ```css\n   *, *::before, *::after {\n     animation-duration: 0s !important;\n     animation-delay: 0s !important;\n     transition-duration: 0s !important;\n     transition-delay: 0s !important;\n   }\n   ```\n2. **Mock Clocks & Deterministic Data**: Freeze the system time via Playwright `page.clock.setFixedTime()` and mock all API network payloads.\n3. **Await Font & Asset Readiness**: Wait explicitly for `document.fonts.ready` and all visible `\u003Cimg>` tags to complete loading prior to taking the snapshot.\n\n### Step 2: Dynamic Content Masking\n1. Identify elements with unpredictable visual variation (e.g., live clocks, fluctuating metric charts, user avatars).\n2. Pass locator masks to the snapshot capture command:\n   ```typescript\n   await expect(page).toHaveScreenshot('dashboard-view.png', {\n     mask: [page.locator('[data-testid=\"live-timestamp\"]'), page.locator('.user-avatar')],\n     maskColor: '#ff00ff',\n   });\n   ```\n\n### Step 3: Snapshot Capture & Comparison (Pixelmatch \u002F SSIM)\n1. Execute image comparison comparing the current capture against the committed golden baseline.\n2. Configure threshold boundaries:\n   - `threshold` (perceptual color delta): `0.1` to `0.2` (in CIELAB or YIQ color space).\n   - `maxDiffPixelRatio`: Max acceptable ratio of mismatched pixels (default: $\\le 0.001$, i.e. 0.1%).\n3. Automatically generate a 3-way visual artifact upon failure:\n   - **Baseline Image** (Approved Golden State).\n   - **Current Image** (Test Execution State).\n   - **Diff Image** (Mismatched pixels highlighted in high-visibility magenta `#ff00ff`).\n\n### Step 4: Baseline Triage & Update Governance\n1. If diffs represent legitimate intentional design modifications:\n   - Review the diff in PR review.\n   - Run `prumo test visual --update-snapshots` (or `npx playwright test --update-snapshots`).\n   - Commit the updated baseline images with explicit PR approval.\n2. If diffs represent unintended styling defects:\n   - Reject the CI build and remediate CSS\u002Fcomponent layout.\n\n---\n\n## 6. Decision Rules\n1. **Zero Unfrozen Animations**: A snapshot test executed without animation freezing is an invalid, flaky test that must not merge into CI.\n2. **Standardized CI Rasterization**: Baselines must be generated inside the exact same container image \u002F Linux distribution as the CI runner to prevent macOS vs. Linux FreeType antialiasing discrepancies.\n3. **No Unmasked Dynamic Timestamps**: Any test capturing a live date\u002Ftime without a mask or frozen clock is a defect.\n4. **Explicit PR Review for Baseline Mutations**: Golden image commits require visual sign-off from the design or frontend lead.\n\n---\n\n## 7. Evidence Required\n- **VRT Test Run Log**: Playwright or pixelmatch test execution log passing with 0 mismatched pixels.\n- **Diff Artifact Bundle**: When failures occur, baseline, actual, and diff PNG files published as CI artifacts.\n- **Environment Hash**: Docker container image tag or OS\u002Ffont configuration recorded with the baseline.\n\n---\n\n## 8. Output Contract\nA production visual regression deliverable must contain:\n1. Playwright test suite (`tests\u002Fvisual\u002F*.spec.ts`).\n2. Playwright VRT configuration (`playwright.config.ts`).\n3. Visual Regression Audit Report (`templates\u002Fvisual-regression-report.md`).\n4. Baseline image repository under version control.\n\n---\n\n## 9. Stop Conditions\n- 100% of defined visual snapshot test cases match baseline within tolerance.\n- Zero flaky false positives across 5 consecutive CI runs.\n- Failure artifacts generate clear 3-way image diffs.\n\n---\n\n## 10. Escalation Rules\n- Escalate to Design Lead if cross-browser rendering discrepancies (e.g. WebKit sub-pixel text rendering differences) cannot be reconciled within standard tolerance.\n- Escalate to DevOps if CI container resource constraints cause headless browser screenshot timeouts.\n",{"name":5,"description":7},"main","1cd515630b8ceb57777d466bee4970fe7c2e30e0",".agents\u002Fskills\u002Fvisual-regression",0,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride","https:\u002F\u002Fgithub.com\u002FpoppyTM","https:\u002F\u002Fpoppy.lat","Construímos linguagens de programação e ferramentas para quem lê código com o mesmo cuidado com que escreve.","2026-09-30 10:15:52",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add poppyTM\u002Foride --skill visual-regression",{"tool":39,"command":40},"bunx","bunx skills add poppyTM\u002Foride --skill visual-regression",{"tool":42,"command":43},"pnpm","pnpm dlx skills add poppyTM\u002Foride --skill visual-regression","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvisual-regression\u002FSKILL.md",true,[47,53,59,63,67,71,75],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"checks\u002Fvisual-regression-checklist.md","REFERENCE","参考文档",1711,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvisual-regression\u002Fchecks\u002Fvisual-regression-checklist.md",{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"examples\u002Fplaywright_vrt_config.js","SCRIPT","脚本",902,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvisual-regression\u002Fexamples\u002Fplaywright_vrt_config.js",{"path":60,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":61,"sourceHtmlUrl":62},"manifest.json",1748,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvisual-regression\u002Fmanifest.json",{"path":64,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fvisual-testing-strategies.md",3008,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvisual-regression\u002Freferences\u002Fvisual-testing-strategies.md",{"path":68,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":69,"sourceHtmlUrl":70},"scripts\u002Fcompare_screenshots.js",1236,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvisual-regression\u002Fscripts\u002Fcompare_screenshots.js",{"path":72,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Fverify.sh",1519,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvisual-regression\u002Fscripts\u002Fverify.sh",{"path":76,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":77,"sourceHtmlUrl":78},"templates\u002Fvisual-regression-report.md",1834,"https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvisual-regression\u002Ftemplates\u002Fvisual-regression-report.md",[80,86,92,98,105,112],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M78FHQN254KEH0DETXT5JM29","zoom-reflow","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fzoom-reflow\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M78FHP1880S695V8GQEE0RXK","wireframe-styleguide","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fwireframe-styleguide\u002FSKILL.md",[],[],{"skillNo":93,"name":5,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M78FHHYM6AN2H819FABW01DZ","Pixel-by-pixel snapshot testing, Playwright integration, dynamic content masking, deterministic font rendering, and cross-browser CI gates","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fvisual-regression\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M78FHE53D8DD0QVRY5C37DA4","ui-implementation","Component-driven UI implementation, multi-state matrix (default, hover, focus-visible, active, disabled, loading, empty, error), DTCG design tokens, responsive layout contracts, and accessibility tree mapping.","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fui-implementation\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M78FHBJ1KXFF734GFE509TBJ","tui-editor-engine","Text buffer and editing semantics for a terminal code editor — index conversion, transaction-first editing, multi-cursor invariants, undo grouping, and large-file behaviour.","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftui-editor-engine\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M78FH9X6CPJX1H61ZDWTTVW8","tree-sitter-context-indexing","https:\u002F\u002Fgithub.com\u002FpoppyTM\u002Foride\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftree-sitter-context-indexing\u002FSKILL.md",[],[]]