[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D9GFASXRNWXEYG70GMDHK9":3,"skill-same:01M7D9GFASXRNWXEYG70GMDHK9":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":57,"commitSha":58,"skillDirectory":59,"forksCount":14,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M7D9GFASXRNWXEYG70GMDHK9","Screenshot Baseline Generator",null,"Generate and maintain visual regression screenshot baselines with intelligent diffing, responsive breakpoint coverage, and dynamic content masking strategies","GrupoANDevelopment-m\u002Falberto-ai","GrupoANDevelopment-m","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257455179?v=4","01M7D69X2N2KEVN0SJF6WGM6SH","Antônio  Ndombe","01M7D69X3P5JTT8H8S904N3888",0,"MIT","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fscreenshot-baseline-generator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: Screenshot Baseline Generator\ndescription: Generate and maintain visual regression screenshot baselines with intelligent diffing, responsive breakpoint coverage, and dynamic content masking strategies\nversion: 1.0.0\nauthor: Pramod\nlicense: MIT\ntags: [visual-regression, screenshot-testing, baseline, image-diff, pixel-comparison, responsive-screenshots, visual-testing]\ntestingTypes: [visual, e2e]\nframeworks: [playwright]\nlanguages: [typescript, javascript]\ndomains: [web]\nagents: [claude-code, cursor, github-copilot, windsurf, codex, aider, continue, cline, zed, bolt, gemini-cli, amp]\n---\n\n# Screenshot Baseline Generator Skill\n\nYou are an expert QA engineer specializing in visual regression testing and screenshot baseline management. When the user asks you to create, review, or improve visual regression tests, follow these detailed instructions to generate comprehensive screenshot baselines with intelligent diffing, responsive coverage, dynamic content masking, and CI-integrated baseline update workflows.\n\n## Core Principles\n\n1. **Baselines are contracts** -- A screenshot baseline is a visual contract that says \"this is what the page should look like.\" Any deviation from this contract must be intentional and reviewed. Treat baseline updates with the same rigor as code changes.\n2. **Determinism is foundational** -- A screenshot test that produces different images on each run is worse than no test. Eliminate all sources of non-determinism before establishing baselines: animations, timestamps, random content, external images, and network-dependent resources.\n3. **Responsive coverage is not optional** -- Users access web applications at dozens of viewport sizes. A visual test that only checks desktop resolution misses layout breakages that affect the majority of users on mobile and tablet devices.\n4. **Threshold tuning is an art** -- A zero-threshold comparison flags anti-aliasing differences as failures. An overly generous threshold misses real regressions. Calibrate thresholds per component based on its visual complexity.\n5. **Dynamic content must be masked, not ignored** -- Dates, advertisements, user avatars, and randomized content change between runs. Mask these regions with deterministic placeholders rather than excluding them from comparison entirely.\n6. **Component-level baselines complement page-level baselines** -- Full-page screenshots catch layout shifts but produce large diffs for small changes. Component-level screenshots provide precise, reviewable diffs for individual UI elements.\n7. **Cross-browser baselines are separate baselines** -- Chrome and Firefox render fonts, shadows, and gradients differently. Maintain separate baselines per browser rather than using a single baseline with generous tolerance.\n8. **Baseline updates require human approval** -- Automated baseline updates bypass the purpose of visual testing. Every baseline change should be reviewed in a pull request with before\u002Fafter comparison.\n9. **Animations are the enemy of stability** -- CSS animations, transitions, skeleton loaders, and cursor blinks cause pixel-level differences between runs. Disable or wait for animations to complete before capturing screenshots.\n10. **Font loading affects every pixel** -- A screenshot captured before web fonts load looks completely different from one captured after. Wait for font loading to complete before any capture.\n\n## Project Structure\n\n```\ntests\u002F\n  visual\u002F\n    baselines\u002F\n      desktop\u002F\n        homepage.png\n        dashboard.png\n        settings.png\n      tablet\u002F\n        homepage.png\n        dashboard.png\n      mobile\u002F\n        homepage.png\n        dashboard.png\n    components\u002F\n      baselines\u002F\n        button-primary.png\n        card-product.png\n        navigation-header.png\n        modal-dialog.png\n    helpers\u002F\n      screenshot-capture.ts\n      baseline-manager.ts\n      mask-builder.ts\n      animation-disabler.ts\n      font-loader.ts\n      viewport-manager.ts\n    tests\u002F\n      homepage.visual.test.ts\n      dashboard.visual.test.ts\n      components.visual.test.ts\n      responsive.visual.test.ts\n      cross-browser.visual.test.ts\n    config\u002F\n      visual-test.config.ts\n      viewports.ts\n      masks.ts\n    reports\u002F\n      diff-reporter.ts\n      baseline-review.ts\n```\n\n## Playwright Screenshot Comparison API\n\nPlaywright provides built-in screenshot comparison through `toHaveScreenshot()`. Understanding its API is the foundation for all visual testing.\n\n### Basic Screenshot Comparison\n\n```typescript\n\u002F\u002F homepage.visual.test.ts\nimport { test, expect } from '@playwright\u002Ftest';\n\ntest.describe('Homepage Visual Regression', () => {\n  test.beforeEach(async ({ page }) => {\n    \u002F\u002F Navigate and wait for full load\n    await page.goto('\u002F', { waitUntil: 'networkidle' });\n\n    \u002F\u002F Wait for web fonts to load\n    await page.evaluate(() => document.fonts.ready);\n\n    \u002F\u002F Disable animations globally\n    await page.addStyleTag({\n      content: `\n        *, *::before, *::after {\n          animation-duration: 0s !important;\n          animation-delay: 0s !important;\n          transition-duration: 0s !important;\n          transition-delay: 0s !important;\n          scroll-behavior: auto !important;\n        }\n      `,\n    });\n  });\n\n  test('should match homepage baseline', async ({ page }) => {\n    await expect(page).toHaveScreenshot('homepage.png', {\n      fullPage: true,\n      maxDiffPixels: 100,\n    });\n  });\n\n  test('should match homepage hero section', async ({ page }) => {\n    const hero = page.locator('[data-testid=\"hero-section\"]');\n    await expect(hero).toHaveScreenshot('hero-section.png', {\n      maxDiffPixelRatio: 0.01,\n    });\n  });\n\n  test('should match homepage after scrolling to features', async ({ page }) => {\n    const features = page.locator('[data-testid=\"features-section\"]');\n    await features.scrollIntoViewIfNeeded();\n    await page.waitForTimeout(300); \u002F\u002F Wait for any scroll-triggered animations\n\n    await expect(features).toHaveScreenshot('features-section.png');\n  });\n});\n```\n\n### Advanced Screenshot Configuration\n\n```typescript\n\u002F\u002F screenshot-capture.ts\nimport { Page, Locator, expect } from '@playwright\u002Ftest';\n\ninterface ScreenshotOptions {\n  name: string;\n  fullPage?: boolean;\n  maxDiffPixels?: number;\n  maxDiffPixelRatio?: number;\n  threshold?: number;\n  mask?: Locator[];\n  maskColor?: string;\n  animations?: 'disabled' | 'allow';\n  caret?: 'hide' | 'initial';\n  scale?: 'css' | 'device';\n  timeout?: number;\n}\n\nclass ScreenshotCapture {\n  constructor(private page: Page) {}\n\n  async prepareForCapture(): Promise\u003Cvoid> {\n    \u002F\u002F 1. Wait for network to settle\n    await this.page.waitForLoadState('networkidle');\n\n    \u002F\u002F 2. Wait for all fonts to load\n    await this.page.evaluate(() => document.fonts.ready);\n\n    \u002F\u002F 3. Wait for all images to load\n    await this.page.evaluate(async () => {\n      const images = Array.from(document.querySelectorAll('img'));\n      await Promise.all(\n        images.map(img => {\n          if (img.complete) return Promise.resolve();\n          return new Promise((resolve, reject) => {\n            img.addEventListener('load', resolve);\n            img.addEventListener('error', reject);\n          });\n        })\n      );\n    });\n\n    \u002F\u002F 4. Disable all animations and transitions\n    await this.page.addStyleTag({\n      content: `\n        *, *::before, *::after {\n          animation-duration: 0s !important;\n          animation-delay: 0s !important;\n          transition-duration: 0s !important;\n          transition-delay: 0s !important;\n          caret-color: transparent !important;\n        }\n        \u002F* Disable specific problem animations *\u002F\n        .skeleton-loader { animation: none !important; opacity: 1 !important; }\n        .spinner { animation: none !important; display: none !important; }\n        video, .video-player { display: none !important; }\n      `,\n    });\n\n    \u002F\u002F 5. Wait for any remaining React\u002FVue hydration\n    await this.page.waitForTimeout(500);\n\n    \u002F\u002F 6. Scroll to top for consistent starting position\n    await this.page.evaluate(() => window.scrollTo(0, 0));\n  }\n\n  async captureFullPage(options: ScreenshotOptions): Promise\u003Cvoid> {\n    await this.prepareForCapture();\n    await expect(this.page).toHaveScreenshot(options.name, {\n      fullPage: true,\n      maxDiffPixels: options.maxDiffPixels ?? 100,\n      maxDiffPixelRatio: options.maxDiffPixelRatio,\n      threshold: options.threshold ?? 0.2,\n      mask: options.mask ?? [],\n      maskColor: options.maskColor ?? '#FF00FF',\n      animations: 'disabled',\n      caret: 'hide',\n      scale: options.scale ?? 'css',\n      timeout: options.timeout ?? 30000,\n    });\n  }\n\n  async captureElement(\n    locator: Locator,\n    options: ScreenshotOptions\n  ): Promise\u003Cvoid> {\n    await this.prepareForCapture();\n    await locator.scrollIntoViewIfNeeded();\n    await this.page.waitForTimeout(200);\n\n    await expect(locator).toHaveScreenshot(options.name, {\n      maxDiffPixels: options.maxDiffPixels ?? 50,\n      maxDiffPixelRatio: options.maxDiffPixelRatio,\n      threshold: options.threshold ?? 0.2,\n      mask: options.mask ?? [],\n      maskColor: options.maskColor ?? '#FF00FF',\n      animations: 'disabled',\n      caret: 'hide',\n      timeout: options.timeout ?? 15000,\n    });\n  }\n\n  async captureViewport(\n    viewportWidth: number,\n    viewportHeight: number,\n    options: ScreenshotOptions\n  ): Promise\u003Cvoid> {\n    await this.page.setViewportSize({\n      width: viewportWidth,\n      height: viewportHeight,\n    });\n    await this.page.waitForTimeout(500); \u002F\u002F Wait for responsive layout to settle\n    await this.captureFullPage(options);\n  }\n}\n```\n\n## Dynamic Content Masking\n\nDynamic content is the primary source of false positives in visual regression testing. Masking replaces dynamic regions with a solid color before comparison.\n\n```typescript\n\u002F\u002F mask-builder.ts\nimport { Page, Locator } from '@playwright\u002Ftest';\n\ninterface MaskDefinition {\n  selector: string;\n  reason: string;\n  maskColor?: string;\n}\n\nclass MaskBuilder {\n  private masks: MaskDefinition[] = [];\n\n  \u002F**\n   * Add common masks that apply to most pages\n   *\u002F\n  addCommonMasks(): MaskBuilder {\n    this.masks.push(\n      { selector: '[data-testid=\"current-date\"]', reason: 'Dynamic date display' },\n      { selector: '[data-testid=\"current-time\"]', reason: 'Dynamic time display' },\n      { selector: '[data-testid=\"user-avatar\"]', reason: 'User-specific avatar' },\n      { selector: '.relative-time', reason: 'Relative timestamps (e.g., \"2 hours ago\")' },\n      { selector: '[data-testid=\"notification-count\"]', reason: 'Dynamic notification badge' },\n      { selector: '.ad-container', reason: 'Advertisement content' },\n      { selector: 'iframe[src*=\"youtube\"]', reason: 'Embedded video' },\n      { selector: 'iframe[src*=\"maps\"]', reason: 'Embedded map' },\n      { selector: '.analytics-widget', reason: 'Live analytics data' },\n      { selector: '[data-testid=\"random-testimonial\"]', reason: 'Randomized content' },\n    );\n    return this;\n  }\n\n  \u002F**\n   * Add page-specific masks\n   *\u002F\n  addMask(selector: string, reason: string): MaskBuilder {\n    this.masks.push({ selector, reason });\n    return this;\n  }\n\n  \u002F**\n   * Resolve all mask definitions to Playwright Locators\n   *\u002F\n  resolve(page: Page): Locator[] {\n    return this.masks\n      .map(mask => {\n        const locator = page.locator(mask.selector);\n        return locator;\n      });\n  }\n\n  \u002F**\n   * Alternative: Replace dynamic content with deterministic placeholders\n   * This is more stable than masking because it preserves layout\n   *\u002F\n  async replaceDynamicContent(page: Page): Promise\u003Cvoid> {\n    await page.evaluate(() => {\n      \u002F\u002F Replace all relative timestamps with a fixed value\n      document.querySelectorAll('.relative-time, time[datetime]').forEach(el => {\n        el.textContent = 'Jan 1, 2024';\n      });\n\n      \u002F\u002F Replace all avatars with a placeholder\n      document.querySelectorAll\u003CHTMLImageElement>('img[data-testid=\"user-avatar\"]').forEach(img => {\n        img.src = 'data:image\u002Fsvg+xml,\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" width=\"40\" height=\"40\">\u003Crect fill=\"%23ccc\" width=\"40\" height=\"40\"\u002F>\u003C\u002Fsvg>';\n      });\n\n      \u002F\u002F Replace notification counts\n      document.querySelectorAll('[data-testid=\"notification-count\"]').forEach(el => {\n        el.textContent = '0';\n      });\n\n      \u002F\u002F Replace random content with deterministic content\n      document.querySelectorAll('[data-randomized]').forEach(el => {\n        el.textContent = 'Deterministic placeholder';\n      });\n\n      \u002F\u002F Replace live data counters\n      document.querySelectorAll('[data-testid=\"live-count\"]').forEach(el => {\n        el.textContent = '42';\n      });\n    });\n  }\n}\n\n\u002F\u002F Usage in tests\nconst masks = new MaskBuilder()\n  .addCommonMasks()\n  .addMask('[data-testid=\"carousel\"]', 'Auto-rotating carousel')\n  .addMask('.chat-widget', 'Third-party chat widget');\n```\n\n## Responsive Breakpoint Screenshot Matrix\n\nTesting across breakpoints requires a systematic approach to viewport management.\n\n```typescript\n\u002F\u002F viewports.ts\ninterface ViewportDefinition {\n  name: string;\n  width: number;\n  height: number;\n  deviceScaleFactor?: number;\n  isMobile?: boolean;\n  hasTouch?: boolean;\n}\n\nconst standardViewports: ViewportDefinition[] = [\n  { name: 'mobile-portrait', width: 375, height: 812, isMobile: true, hasTouch: true, deviceScaleFactor: 3 },\n  { name: 'mobile-landscape', width: 812, height: 375, isMobile: true, hasTouch: true, deviceScaleFactor: 3 },\n  { name: 'tablet-portrait', width: 768, height: 1024, isMobile: true, hasTouch: true, deviceScaleFactor: 2 },\n  { name: 'tablet-landscape', width: 1024, height: 768, isMobile: true, hasTouch: true, deviceScaleFactor: 2 },\n  { name: 'laptop', width: 1366, height: 768 },\n  { name: 'desktop', width: 1920, height: 1080 },\n  { name: 'ultrawide', width: 2560, height: 1440 },\n];\n\n\u002F\u002F Breakpoint-specific viewports matching CSS media queries\nconst breakpointViewports: ViewportDefinition[] = [\n  { name: 'below-sm', width: 639, height: 900 },   \u002F\u002F Just below sm (640px)\n  { name: 'at-sm', width: 640, height: 900 },       \u002F\u002F At sm breakpoint\n  { name: 'below-md', width: 767, height: 900 },    \u002F\u002F Just below md (768px)\n  { name: 'at-md', width: 768, height: 900 },       \u002F\u002F At md breakpoint\n  { name: 'below-lg', width: 1023, height: 900 },   \u002F\u002F Just below lg (1024px)\n  { name: 'at-lg', width: 1024, height: 900 },      \u002F\u002F At lg breakpoint\n  { name: 'below-xl', width: 1279, height: 900 },   \u002F\u002F Just below xl (1280px)\n  { name: 'at-xl', width: 1280, height: 900 },      \u002F\u002F At xl breakpoint\n];\n\n\u002F\u002F responsive.visual.test.ts\nimport { test, expect, devices } from '@playwright\u002Ftest';\n\nfor (const viewport of standardViewports) {\n  test.describe(`Visual regression at ${viewport.name} (${viewport.width}x${viewport.height})`, () => {\n    test.use({\n      viewport: { width: viewport.width, height: viewport.height },\n      isMobile: viewport.isMobile,\n      hasTouch: viewport.hasTouch,\n      deviceScaleFactor: viewport.deviceScaleFactor,\n    });\n\n    test('homepage matches baseline', async ({ page }) => {\n      await page.goto('\u002F', { waitUntil: 'networkidle' });\n      await page.evaluate(() => document.fonts.ready);\n\n      const capture = new ScreenshotCapture(page);\n      await capture.captureFullPage({\n        name: `homepage-${viewport.name}.png`,\n        maxDiffPixels: viewport.isMobile ? 200 : 100,\n      });\n    });\n\n    test('navigation renders correctly', async ({ page }) => {\n      await page.goto('\u002F', { waitUntil: 'networkidle' });\n      const nav = page.locator('[data-testid=\"main-navigation\"]');\n\n      \u002F\u002F On mobile, the hamburger menu should be visible\n      if (viewport.isMobile) {\n        const hamburger = page.locator('[data-testid=\"mobile-menu-button\"]');\n        await expect(hamburger).toBeVisible();\n      }\n\n      await expect(nav).toHaveScreenshot(`navigation-${viewport.name}.png`, {\n        maxDiffPixels: 50,\n      });\n    });\n  });\n}\n\n\u002F\u002F Test at exact breakpoint boundaries\nfor (const bp of breakpointViewports) {\n  test(`layout at breakpoint boundary ${bp.name} (${bp.width}px)`, async ({ page }) => {\n    await page.setViewportSize({ width: bp.width, height: bp.height });\n    await page.goto('\u002F', { waitUntil: 'networkidle' });\n    await page.evaluate(() => document.fonts.ready);\n\n    await expect(page).toHaveScreenshot(`breakpoint-${bp.name}.png`, {\n      fullPage: false,\n      maxDiffPixels: 150,\n    });\n  });\n}\n```\n\n## Component-Level Screenshots\n\nComponent screenshots provide granular visual regression coverage with smaller, more reviewable diffs.\n\n```typescript\n\u002F\u002F components.visual.test.ts\nimport { test, expect } from '@playwright\u002Ftest';\n\ntest.describe('Component Visual Regression', () => {\n  test.beforeEach(async ({ page }) => {\n    \u002F\u002F Navigate to component showcase or Storybook\n    await page.goto('\u002Fstorybook', { waitUntil: 'networkidle' });\n    await page.evaluate(() => document.fonts.ready);\n    await page.addStyleTag({\n      content: '*, *::before, *::after { animation: none !important; transition: none !important; }',\n    });\n  });\n\n  test.describe('Button components', () => {\n    test('primary button default state', async ({ page }) => {\n      const button = page.locator('[data-testid=\"button-primary\"]');\n      await expect(button).toHaveScreenshot('button-primary-default.png', {\n        maxDiffPixels: 10,\n      });\n    });\n\n    test('primary button hover state', async ({ page }) => {\n      const button = page.locator('[data-testid=\"button-primary\"]');\n      await button.hover();\n      await page.waitForTimeout(100);\n\n      await expect(button).toHaveScreenshot('button-primary-hover.png', {\n        maxDiffPixels: 10,\n      });\n    });\n\n    test('primary button disabled state', async ({ page }) => {\n      const button = page.locator('[data-testid=\"button-primary-disabled\"]');\n      await expect(button).toHaveScreenshot('button-primary-disabled.png', {\n        maxDiffPixels: 10,\n      });\n    });\n\n    test('button with long text wrapping', async ({ page }) => {\n      const button = page.locator('[data-testid=\"button-long-text\"]');\n      await expect(button).toHaveScreenshot('button-long-text.png', {\n        maxDiffPixels: 20,\n      });\n    });\n  });\n\n  test.describe('Card components', () => {\n    test('product card with image', async ({ page }) => {\n      const card = page.locator('[data-testid=\"product-card\"]').first();\n      const masks = new MaskBuilder()\n        .addMask('[data-testid=\"product-price\"]', 'Dynamic price')\n        .addMask('[data-testid=\"product-rating\"]', 'Dynamic rating');\n\n      await expect(card).toHaveScreenshot('product-card.png', {\n        maxDiffPixels: 30,\n        mask: masks.resolve(page),\n      });\n    });\n\n    test('product card skeleton loading state', async ({ page }) => {\n      \u002F\u002F Navigate to page in loading state\n      await page.route('**\u002Fapi\u002Fproducts\u002F**', route => route.abort());\n      await page.goto('\u002Fproducts', { waitUntil: 'domcontentloaded' });\n\n      const skeleton = page.locator('[data-testid=\"product-card-skeleton\"]').first();\n      await expect(skeleton).toHaveScreenshot('product-card-skeleton.png', {\n        maxDiffPixels: 50,\n      });\n    });\n  });\n\n  test.describe('Modal components', () => {\n    test('confirmation dialog', async ({ page }) => {\n      await page.locator('[data-testid=\"open-modal-button\"]').click();\n      await page.waitForSelector('[data-testid=\"modal-dialog\"]', { state: 'visible' });\n      await page.waitForTimeout(300); \u002F\u002F Wait for open animation\n\n      const modal = page.locator('[data-testid=\"modal-dialog\"]');\n      await expect(modal).toHaveScreenshot('modal-confirmation.png', {\n        maxDiffPixels: 20,\n      });\n    });\n\n    test('modal with backdrop', async ({ page }) => {\n      await page.locator('[data-testid=\"open-modal-button\"]').click();\n      await page.waitForSelector('[data-testid=\"modal-overlay\"]', { state: 'visible' });\n      await page.waitForTimeout(300);\n\n      \u002F\u002F Capture the full page to include the backdrop\n      await expect(page).toHaveScreenshot('modal-with-backdrop.png', {\n        maxDiffPixels: 100,\n      });\n    });\n  });\n});\n```\n\n## Threshold Configuration\n\nDifferent components require different comparison thresholds based on their visual complexity and rendering stability.\n\n```typescript\n\u002F\u002F visual-test.config.ts\ninterface ThresholdConfig {\n  global: {\n    maxDiffPixels: number;\n    maxDiffPixelRatio: number;\n    threshold: number; \u002F\u002F Per-pixel color threshold (0-1)\n  };\n  perComponent: Record\u003Cstring, {\n    maxDiffPixels: number;\n    maxDiffPixelRatio?: number;\n    threshold?: number;\n    reason: string;\n  }>;\n  perBrowser: Record\u003Cstring, {\n    maxDiffPixels: number;\n    reason: string;\n  }>;\n}\n\nconst thresholdConfig: ThresholdConfig = {\n  global: {\n    maxDiffPixels: 100,\n    maxDiffPixelRatio: 0.01,\n    threshold: 0.2,\n  },\n  perComponent: {\n    'icon-svg': {\n      maxDiffPixels: 5,\n      threshold: 0.1,\n      reason: 'SVG icons should be pixel-perfect',\n    },\n    'text-heavy': {\n      maxDiffPixels: 200,\n      threshold: 0.3,\n      reason: 'Text rendering varies with font hinting; needs higher tolerance',\n    },\n    'gradient-background': {\n      maxDiffPixels: 500,\n      maxDiffPixelRatio: 0.02,\n      reason: 'GPU-rendered gradients have sub-pixel variations across runs',\n    },\n    'shadow-heavy': {\n      maxDiffPixels: 300,\n      threshold: 0.25,\n      reason: 'Box shadows render differently across GPU drivers',\n    },\n    'chart-visualization': {\n      maxDiffPixels: 1000,\n      maxDiffPixelRatio: 0.05,\n      reason: 'Charts with anti-aliased lines need generous tolerance',\n    },\n    'full-page': {\n      maxDiffPixels: 500,\n      maxDiffPixelRatio: 0.01,\n      reason: 'Full page screenshots accumulate small differences across many elements',\n    },\n  },\n  perBrowser: {\n    firefox: {\n      maxDiffPixels: 300,\n      reason: 'Firefox renders fonts and sub-pixel elements differently from Chromium',\n    },\n    webkit: {\n      maxDiffPixels: 400,\n      reason: 'WebKit has distinct rendering for shadows, gradients, and text',\n    },\n  },\n};\n```\n\n## Animation and Transition Handling\n\n```typescript\n\u002F\u002F animation-disabler.ts\nimport { Page } from '@playwright\u002Ftest';\n\nclass AnimationDisabler {\n  \u002F**\n   * Inject CSS that disables all animations and transitions\n   *\u002F\n  static async disableAll(page: Page): Promise\u003Cvoid> {\n    await page.addStyleTag({\n      content: `\n        \u002F* Disable CSS animations *\u002F\n        *, *::before, *::after {\n          animation-duration: 0s !important;\n          animation-delay: 0s !important;\n          animation-iteration-count: 1 !important;\n          transition-duration: 0s !important;\n          transition-delay: 0s !important;\n        }\n\n        \u002F* Hide cursor blink *\u002F\n        * {\n          caret-color: transparent !important;\n        }\n\n        \u002F* Stop auto-playing videos and GIFs *\u002F\n        video {\n          display: none !important;\n        }\n\n        \u002F* Freeze skeleton loaders *\u002F\n        [class*=\"skeleton\"],\n        [class*=\"shimmer\"],\n        [class*=\"pulse\"] {\n          animation: none !important;\n          opacity: 1 !important;\n          background: #e0e0e0 !important;\n        }\n\n        \u002F* Freeze carousels *\u002F\n        [class*=\"carousel\"],\n        [class*=\"slider\"] {\n          animation: none !important;\n          transform: none !important;\n        }\n\n        \u002F* Disable smooth scrolling *\u002F\n        html {\n          scroll-behavior: auto !important;\n        }\n\n        \u002F* Remove blur effects that may render inconsistently *\u002F\n        [style*=\"blur\"] {\n          filter: none !important;\n        }\n      `,\n    });\n  }\n\n  \u002F**\n   * Wait for all ongoing animations to complete before capture\n   *\u002F\n  static async waitForAnimationsToComplete(page: Page): Promise\u003Cvoid> {\n    await page.evaluate(async () => {\n      \u002F\u002F Wait for Web Animations API animations\n      const animations = document.getAnimations();\n      if (animations.length > 0) {\n        await Promise.all(animations.map(a => a.finished.catch(() => {})));\n      }\n\n      \u002F\u002F Wait for CSS transitions by checking computed styles\n      await new Promise\u003Cvoid>(resolve => {\n        requestAnimationFrame(() => {\n          requestAnimationFrame(() => {\n            resolve();\n          });\n        });\n      });\n    });\n  }\n\n  \u002F**\n   * Stabilize specific known problematic elements\n   *\u002F\n  static async stabilizeElements(page: Page): Promise\u003Cvoid> {\n    await page.evaluate(() => {\n      \u002F\u002F Replace animated SVG spinners with static versions\n      document.querySelectorAll('svg.animate-spin').forEach(el => {\n        el.classList.remove('animate-spin');\n      });\n\n      \u002F\u002F Ensure lazy-loaded images have loaded or show fallback\n      document.querySelectorAll\u003CHTMLImageElement>('img[loading=\"lazy\"]').forEach(img => {\n        if (!img.complete) {\n          img.style.backgroundColor = '#f0f0f0';\n          img.style.minHeight = '100px';\n        }\n      });\n\n      \u002F\u002F Collapse any toast notifications\n      document.querySelectorAll('[role=\"alert\"], .toast, .notification').forEach(el => {\n        (el as HTMLElement).style.display = 'none';\n      });\n    });\n  }\n}\n```\n\n## CI Baseline Update Workflow\n\nManaging baselines in CI requires a disciplined process for updating, reviewing, and approving changes.\n\n```typescript\n\u002F\u002F baseline-manager.ts\nimport { execSync } from 'child_process';\nimport { existsSync, mkdirSync, copyFileSync, readdirSync } from 'fs';\nimport { join, relative } from 'path';\n\ninterface BaselineUpdateReport {\n  updatedBaselines: string[];\n  newBaselines: string[];\n  removedBaselines: string[];\n  unchangedBaselines: string[];\n  totalBaselines: number;\n}\n\nclass BaselineManager {\n  private baselineDir: string;\n  private actualDir: string;\n\n  constructor(baselineDir: string, actualDir: string) {\n    this.baselineDir = baselineDir;\n    this.actualDir = actualDir;\n  }\n\n  \u002F**\n   * Update baselines from latest test run results\n   * This should only be called explicitly, never automatically\n   *\u002F\n  updateBaselines(): BaselineUpdateReport {\n    const report: BaselineUpdateReport = {\n      updatedBaselines: [],\n      newBaselines: [],\n      removedBaselines: [],\n      unchangedBaselines: [],\n      totalBaselines: 0,\n    };\n\n    const actualFiles = this.getScreenshotFiles(this.actualDir);\n    const baselineFiles = this.getScreenshotFiles(this.baselineDir);\n\n    \u002F\u002F Process actual screenshots\n    for (const file of actualFiles) {\n      const baselinePath = join(this.baselineDir, file);\n      const actualPath = join(this.actualDir, file);\n\n      if (!existsSync(baselinePath)) {\n        \u002F\u002F New baseline\n        const dir = join(this.baselineDir, file.substring(0, file.lastIndexOf('\u002F')));\n        if (!existsSync(dir)) mkdirSync(dir, { recursive: true });\n        copyFileSync(actualPath, baselinePath);\n        report.newBaselines.push(file);\n      } else {\n        \u002F\u002F Compare and update if different\n        const isDifferent = this.filesAreDifferent(actualPath, baselinePath);\n        if (isDifferent) {\n          copyFileSync(actualPath, baselinePath);\n          report.updatedBaselines.push(file);\n        } else {\n          report.unchangedBaselines.push(file);\n        }\n      }\n    }\n\n    \u002F\u002F Find removed baselines (exist in baselines but not in actual)\n    for (const file of baselineFiles) {\n      if (!actualFiles.includes(file)) {\n        report.removedBaselines.push(file);\n      }\n    }\n\n    report.totalBaselines = actualFiles.length;\n    return report;\n  }\n\n  private getScreenshotFiles(dir: string): string[] {\n    if (!existsSync(dir)) return [];\n    const files: string[] = [];\n    const walk = (currentDir: string) => {\n      for (const entry of readdirSync(currentDir, { withFileTypes: true })) {\n        const fullPath = join(currentDir, entry.name);\n        if (entry.isDirectory()) {\n          walk(fullPath);\n        } else if (entry.name.endsWith('.png')) {\n          files.push(relative(dir, fullPath));\n        }\n      }\n    };\n    walk(dir);\n    return files;\n  }\n\n  private filesAreDifferent(file1: string, file2: string): boolean {\n    try {\n      execSync(`diff \"${file1}\" \"${file2}\"`, { stdio: 'ignore' });\n      return false;\n    } catch {\n      return true;\n    }\n  }\n}\n```\n\n### Playwright Configuration for Visual Tests\n\n```typescript\n\u002F\u002F playwright.config.ts\nimport { defineConfig, devices } from '@playwright\u002Ftest';\n\nexport default defineConfig({\n  testDir: '.\u002Ftests\u002Fvisual',\n  snapshotDir: '.\u002Ftests\u002Fvisual\u002Fbaselines',\n  snapshotPathTemplate: '{snapshotDir}\u002F{testFileDir}\u002F{testFileName}-snapshots\u002F{arg}{-projectName}{ext}',\n\n  \u002F\u002F Update baselines only when explicitly requested\n  updateSnapshots: process.env.UPDATE_BASELINES === 'true' ? 'all' : 'missing',\n\n  expect: {\n    toHaveScreenshot: {\n      maxDiffPixels: 100,\n      maxDiffPixelRatio: 0.01,\n      threshold: 0.2,\n      animations: 'disabled',\n      caret: 'hide',\n    },\n  },\n\n  projects: [\n    {\n      name: 'chromium',\n      use: {\n        ...devices['Desktop Chrome'],\n        viewport: { width: 1280, height: 720 },\n      },\n    },\n    {\n      name: 'firefox',\n      use: {\n        ...devices['Desktop Firefox'],\n        viewport: { width: 1280, height: 720 },\n      },\n    },\n    {\n      name: 'webkit',\n      use: {\n        ...devices['Desktop Safari'],\n        viewport: { width: 1280, height: 720 },\n      },\n    },\n    {\n      name: 'mobile-chrome',\n      use: {\n        ...devices['Pixel 5'],\n      },\n    },\n    {\n      name: 'mobile-safari',\n      use: {\n        ...devices['iPhone 13'],\n      },\n    },\n  ],\n\n  webServer: {\n    command: 'npm run dev',\n    port: 3000,\n    reuseExistingServer: !process.env.CI,\n  },\n});\n```\n\n## Cross-Browser Screenshot Differences\n\n```typescript\n\u002F\u002F cross-browser.visual.test.ts\nimport { test, expect } from '@playwright\u002Ftest';\n\ntest.describe('Cross-Browser Visual Consistency', () => {\n  test('homepage renders consistently across browsers', async ({ page, browserName }) => {\n    await page.goto('\u002F', { waitUntil: 'networkidle' });\n    await page.evaluate(() => document.fonts.ready);\n\n    const capture = new ScreenshotCapture(page);\n\n    \u002F\u002F Each browser gets its own baseline (via projectName in snapshot path)\n    await capture.captureFullPage({\n      name: 'homepage-cross-browser.png',\n      \u002F\u002F Higher tolerance for browsers with known rendering differences\n      maxDiffPixels: browserName === 'chromium' ? 100 : 500,\n      threshold: browserName === 'webkit' ? 0.3 : 0.2,\n    });\n  });\n\n  test('typography renders acceptably across browsers', async ({ page, browserName }) => {\n    await page.goto('\u002Ftypography-showcase', { waitUntil: 'networkidle' });\n    await page.evaluate(() => document.fonts.ready);\n\n    const textBlock = page.locator('[data-testid=\"typography-sample\"]');\n\n    await expect(textBlock).toHaveScreenshot('typography-sample.png', {\n      \u002F\u002F Font rendering varies significantly across browsers\n      maxDiffPixelRatio: browserName === 'chromium' ? 0.01 : 0.05,\n      threshold: 0.3,\n    });\n  });\n\n  test('form elements render correctly per browser', async ({ page, browserName }) => {\n    await page.goto('\u002Fform-showcase', { waitUntil: 'networkidle' });\n\n    \u002F\u002F Browser-native form elements look very different across browsers\n    \u002F\u002F Only compare custom-styled form elements\n    const customForm = page.locator('[data-testid=\"custom-styled-form\"]');\n\n    await expect(customForm).toHaveScreenshot('custom-form.png', {\n      maxDiffPixels: 200,\n      \u002F\u002F Mask browser-native select\u002Fcheckbox\u002Fradio elements\n      mask: [\n        page.locator('select:not([data-custom])'),\n        page.locator('input[type=\"checkbox\"]:not([data-custom])'),\n        page.locator('input[type=\"radio\"]:not([data-custom])'),\n      ],\n    });\n  });\n});\n```\n\n## Baseline Generation Workflow\n\n```typescript\n\u002F\u002F baseline-review.ts\n\u002F\u002F Script to generate a baseline review report for pull requests\n\ninterface BaselineDiff {\n  file: string;\n  before: string;  \u002F\u002F path to old baseline\n  after: string;   \u002F\u002F path to new screenshot\n  diff: string;    \u002F\u002F path to diff image\n  diffPixels: number;\n  diffPercentage: number;\n}\n\nfunction generateReviewReport(diffs: BaselineDiff[]): string {\n  let report = '## Visual Regression Report\\n\\n';\n  report += `**Total baselines checked:** ${diffs.length}\\n`;\n  report += `**Baselines changed:** ${diffs.filter(d => d.diffPixels > 0).length}\\n\\n`;\n\n  const changed = diffs.filter(d => d.diffPixels > 0);\n\n  if (changed.length === 0) {\n    report += 'No visual changes detected.\\n';\n    return report;\n  }\n\n  report += '### Changed Baselines\\n\\n';\n  report += '| Screenshot | Diff Pixels | Diff % | Status |\\n';\n  report += '|---|---|---|---|\\n';\n\n  for (const diff of changed) {\n    const status = diff.diffPercentage > 5 ? 'Needs Review' : 'Minor Change';\n    report += `| ${diff.file} | ${diff.diffPixels} | ${diff.diffPercentage.toFixed(2)}% | ${status} |\\n`;\n  }\n\n  report += '\\n### Before \u002F After \u002F Diff\\n\\n';\n  for (const diff of changed) {\n    report += `#### ${diff.file}\\n`;\n    report += `| Before | After | Diff |\\n`;\n    report += `|---|---|---|\\n`;\n    report += `| ![before](${diff.before}) | ![after](${diff.after}) | ![diff](${diff.diff}) |\\n\\n`;\n  }\n\n  return report;\n}\n```\n\n## Configuration\n\n```typescript\n\u002F\u002F visual-test.config.ts\ninterface VisualTestConfig {\n  baselines: {\n    directory: string;\n    updateMode: 'none' | 'missing' | 'all';\n    gitTracked: boolean;\n    storageBackend: 'filesystem' | 's3' | 'git-lfs';\n  };\n  capture: {\n    defaultTimeout: number;\n    waitForFonts: boolean;\n    waitForImages: boolean;\n    disableAnimations: boolean;\n    hideCaret: boolean;\n    networkIdleTimeout: number;\n    postLoadDelay: number;\n  };\n  comparison: {\n    defaultMaxDiffPixels: number;\n    defaultMaxDiffPixelRatio: number;\n    defaultThreshold: number;\n    diffOutputDirectory: string;\n    generateDiffImage: boolean;\n    diffHighlightColor: string;\n  };\n  viewports: ViewportDefinition[];\n  browsers: string[];\n  masks: {\n    globalMasks: MaskDefinition[];\n    pageSpecificMasks: Record\u003Cstring, MaskDefinition[]>;\n  };\n  ci: {\n    failOnNewBaselines: boolean;\n    failOnMissingBaselines: boolean;\n    generateReport: boolean;\n    reportFormat: 'markdown' | 'html' | 'json';\n    uploadArtifacts: boolean;\n    artifactRetentionDays: number;\n  };\n}\n\nconst defaultConfig: VisualTestConfig = {\n  baselines: {\n    directory: '.\u002Ftests\u002Fvisual\u002Fbaselines',\n    updateMode: 'missing',\n    gitTracked: true,\n    storageBackend: 'filesystem',\n  },\n  capture: {\n    defaultTimeout: 30000,\n    waitForFonts: true,\n    waitForImages: true,\n    disableAnimations: true,\n    hideCaret: true,\n    networkIdleTimeout: 5000,\n    postLoadDelay: 500,\n  },\n  comparison: {\n    defaultMaxDiffPixels: 100,\n    defaultMaxDiffPixelRatio: 0.01,\n    defaultThreshold: 0.2,\n    diffOutputDirectory: '.\u002Ftest-results\u002Fvisual-diffs',\n    generateDiffImage: true,\n    diffHighlightColor: '#FF00FF',\n  },\n  viewports: standardViewports,\n  browsers: ['chromium', 'firefox', 'webkit'],\n  masks: {\n    globalMasks: [\n      { selector: '[data-testid=\"timestamp\"]', reason: 'Dynamic timestamp' },\n      { selector: '[data-testid=\"avatar\"]', reason: 'User-specific avatar' },\n    ],\n    pageSpecificMasks: {},\n  },\n  ci: {\n    failOnNewBaselines: false,\n    failOnMissingBaselines: true,\n    generateReport: true,\n    reportFormat: 'markdown',\n    uploadArtifacts: true,\n    artifactRetentionDays: 30,\n  },\n};\n```\n\n## Best Practices\n\n1. **Establish baselines from a clean state** -- Generate baselines against a known-good deployment, not a development branch. The first baseline set is your visual contract, and it must represent the intended design.\n\n2. **Store baselines in version control** -- Baselines should be committed alongside the code they test. Use Git LFS for large baseline repositories to avoid bloating the repository.\n\n3. **Run visual tests after functional tests pass** -- Visual tests depend on the page being in the correct state. If functional tests fail, visual tests will produce misleading failures.\n\n4. **Use data-testid attributes for element targeting** -- CSS class names change during refactoring. Test IDs are stable selectors that survive design system updates.\n\n5. **Mask all dynamic content explicitly** -- Document every mask with a reason. Undocumented masks hide potential regressions. A mask list is a list of things you have decided not to test visually.\n\n6. **Test interactive states explicitly** -- Default, hover, focus, active, disabled, error, and loading states each need their own baseline. A button that looks correct in its default state may be invisible in its disabled state.\n\n7. **Set viewport size before navigation** -- Set the viewport before page load, not after. Pages that respond to viewport size during initial render may produce different layouts if the viewport changes after load.\n\n8. **Wait for network idle before capture** -- Lazy-loaded images, API responses, and third-party scripts affect the visual state. Wait for the network to settle before capturing.\n\n9. **Review baseline updates in pull requests** -- Add before\u002Fafter diff images to PR descriptions. Visual changes that are not reviewed are visual regressions that have been silently accepted.\n\n10. **Keep baseline file sizes manageable** -- Use PNG format for baselines (lossless). Compress with tools like optipng but do not use lossy compression. Large baselines slow down CI; consider component-level screenshots over full-page screenshots.\n\n11. **Run visual tests on consistent hardware** -- GPU differences, screen resolution, and operating system font rendering affect screenshots. Run visual tests in Docker containers or CI environments with identical configurations.\n\n12. **Separate visual test suites from functional test suites** -- Visual tests are slower and more sensitive to environment changes. Run them as a separate CI job that can be retriggered independently.\n\n13. **Maintain a threshold changelog** -- When you increase a threshold, document why. Gradually increasing thresholds to make tests pass is a sign of eroding visual quality.\n\n## Anti-Patterns to Avoid\n\n1. **Using the same threshold for all elements** -- A pixel-perfect icon needs a threshold of 5 pixels. A full-page screenshot of a data dashboard needs 500. Using a single threshold either produces false positives for simple elements or false negatives for complex ones.\n\n2. **Automatically updating baselines in CI** -- If your CI pipeline automatically accepts new baselines when tests fail, you have no visual regression testing. Every baseline change must be human-reviewed.\n\n3. **Ignoring font loading timing** -- Screenshots captured before web fonts load show system fonts. This produces massive diffs that are not real regressions. Always await `document.fonts.ready`.\n\n4. **Not disabling animations** -- An animation captured at different frames produces different screenshots. This causes flaky tests that undermine confidence in the entire visual test suite.\n\n5. **Testing only one viewport** -- A page that looks correct at 1920px may be completely broken at 375px. Test at minimum: mobile portrait, tablet, and desktop viewports.\n\n6. **Storing baselines outside version control** -- Baselines in S3 or shared drives become orphaned, outdated, and impossible to associate with specific code versions. Keep them in the repository.\n\n7. **Using percentage-based diff thresholds only** -- A 0.1% difference on a 1920x1080 screenshot is 2,073 pixels. That is enough to miss a completely wrong button. Use absolute pixel counts alongside percentage ratios.\n\n8. **Capturing screenshots during page transitions** -- A screenshot taken while a page is navigating, loading, or animating is non-deterministic. Wait for all asynchronous activity to complete.\n\n## Debugging Tips\n\n1. **Test passes locally but fails in CI** -- The most common cause is font rendering differences. CI machines may not have the same fonts installed. Use web fonts served from the application rather than relying on system fonts. Alternatively, use Docker images with identical font packages.\n\n2. **Screenshots differ by a few pixels every run** -- This is typically caused by sub-pixel anti-aliasing, GPU rendering differences, or undetected animations. Increase the threshold slightly and document the reason. If the difference is consistently in the same location, mask that specific region.\n\n3. **Full-page screenshot height varies between runs** -- Dynamic content (lazy-loaded sections, expandable elements, or API-driven lists) can change the page height. Mock API responses to return deterministic data, or use viewport screenshots instead of full-page captures.\n\n4. **Baseline images are blurry on high-DPI displays** -- Set `scale: 'css'` in the screenshot options to capture at CSS pixel resolution rather than device pixel resolution. This produces consistent images regardless of the display's pixel density.\n\n5. **Modal or tooltip screenshots are empty** -- The element may not be visible at the time of capture. Add an explicit wait for the element to become visible: `await page.waitForSelector('[data-testid=\"modal\"]', { state: 'visible' })`.\n\n6. **Carousel or slider captures show different slides** -- Disable auto-rotation before capturing. Either mock the timer, inject CSS to freeze the carousel, or programmatically navigate to a specific slide before capture.\n\n7. **Browser-specific test fails but the page looks identical visually** -- Browsers render text hinting, box shadows, and gradients differently at the sub-pixel level. Maintain separate baselines per browser (Playwright does this automatically with project names in the snapshot path).\n\n8. **Git repository grows too large from baseline images** -- Switch to Git LFS for storing PNG baselines. Run `git lfs install` and add `*.png filter=lfs diff=lfs merge=lfs -text` to `.gitattributes`. This moves large binary files to separate storage.\n\n9. **Visual test takes too long to run** -- Reduce the number of full-page screenshots. Use component-level screenshots for most checks and reserve full-page captures for critical pages only. Also ensure `waitUntil: 'networkidle'` is not waiting for long-polling connections.\n\n10. **Masks are not covering the right area** -- The element may have shifted position between the baseline capture and the current run. Use `data-testid` selectors rather than position-dependent selectors. If the element's size varies, use a parent container as the mask target.","# Screenshot Baseline Generator Skill\n\nYou are an expert QA engineer specializing in visual regression testing and screenshot baseline management. When the user asks you to create, review, or improve visual regression tests, follow these detailed instructions to generate comprehensive screenshot baselines with intelligent diffing, responsive coverage, dynamic content masking, and CI-integrated baseline update workflows.\n\n## Core Principles\n\n1. **Baselines are contracts** -- A screenshot baseline is a visual contract that says \"this is what the page should look like.\" Any deviation from this contract must be intentional and reviewed. Treat baseline updates with the same rigor as code changes.\n2. **Determinism is foundational** -- A screenshot test that produces different images on each run is worse than no test. Eliminate all sources of non-determinism before establishing baselines: animations, timestamps, random content, external images, and network-dependent resources.\n3. **Responsive coverage is not optional** -- Users access web applications at dozens of viewport sizes. A visual test that only checks desktop resolution misses layout breakages that affect the majority of users on mobile and tablet devices.\n4. **Threshold tuning is an art** -- A zero-threshold comparison flags anti-aliasing differences as failures. An overly generous threshold misses real regressions. Calibrate thresholds per component based on its visual complexity.\n5. **Dynamic content must be masked, not ignored** -- Dates, advertisements, user avatars, and randomized content change between runs. Mask these regions with deterministic placeholders rather than excluding them from comparison entirely.\n6. **Component-level baselines complement page-level baselines** -- Full-page screenshots catch layout shifts but produce large diffs for small changes. Component-level screenshots provide precise, reviewable diffs for individual UI elements.\n7. **Cross-browser baselines are separate baselines** -- Chrome and Firefox render fonts, shadows, and gradients differently. Maintain separate baselines per browser rather than using a single baseline with generous tolerance.\n8. **Baseline updates require human approval** -- Automated baseline updates bypass the purpose of visual testing. Every baseline change should be reviewed in a pull request with before\u002Fafter comparison.\n9. **Animations are the enemy of stability** -- CSS animations, transitions, skeleton loaders, and cursor blinks cause pixel-level differences between runs. Disable or wait for animations to complete before capturing screenshots.\n10. **Font loading affects every pixel** -- A screenshot captured before web fonts load looks completely different from one captured after. Wait for font loading to complete before any capture.\n\n## Project Structure\n\n```\ntests\u002F\n  visual\u002F\n    baselines\u002F\n      desktop\u002F\n        homepage.png\n        dashboard.png\n        settings.png\n      tablet\u002F\n        homepage.png\n        dashboard.png\n      mobile\u002F\n        homepage.png\n        dashboard.png\n    components\u002F\n      baselines\u002F\n        button-primary.png\n        card-product.png\n        navigation-header.png\n        modal-dialog.png\n    helpers\u002F\n      screenshot-capture.ts\n      baseline-manager.ts\n      mask-builder.ts\n      animation-disabler.ts\n      font-loader.ts\n      viewport-manager.ts\n    tests\u002F\n      homepage.visual.test.ts\n      dashboard.visual.test.ts\n      components.visual.test.ts\n      responsive.visual.test.ts\n      cross-browser.visual.test.ts\n    config\u002F\n      visual-test.config.ts\n      viewports.ts\n      masks.ts\n    reports\u002F\n      diff-reporter.ts\n      baseline-review.ts\n```\n\n## Playwright Screenshot Comparison API\n\nPlaywright provides built-in screenshot comparison through `toHaveScreenshot()`. Understanding its API is the foundation for all visual testing.\n\n### Basic Screenshot Comparison\n\n```typescript\n\u002F\u002F homepage.visual.test.ts\nimport { test, expect } from '@playwright\u002Ftest';\n\ntest.describe('Homepage Visual Regression', () => {\n  test.beforeEach(async ({ page }) => {\n    \u002F\u002F Navigate and wait for full load\n    await page.goto('\u002F', { waitUntil: 'networkidle' });\n\n    \u002F\u002F Wait for web fonts to load\n    await page.evaluate(() => document.fonts.ready);\n\n    \u002F\u002F Disable animations globally\n    await page.addStyleTag({\n      content: `\n        *, *::before, *::after {\n          animation-duration: 0s !important;\n          animation-delay: 0s !important;\n          transition-duration: 0s !important;\n          transition-delay: 0s !important;\n          scroll-behavior: auto !important;\n        }\n      `,\n    });\n  });\n\n  test('should match homepage baseline', async ({ page }) => {\n    await expect(page).toHaveScreenshot('homepage.png', {\n      fullPage: true,\n      maxDiffPixels: 100,\n    });\n  });\n\n  test('should match homepage hero section', async ({ page }) => {\n    const hero = page.locator('[data-testid=\"hero-section\"]');\n    await expect(hero).toHaveScreenshot('hero-section.png', {\n      maxDiffPixelRatio: 0.01,\n    });\n  });\n\n  test('should match homepage after scrolling to features', async ({ page }) => {\n    const features = page.locator('[data-testid=\"features-section\"]');\n    await features.scrollIntoViewIfNeeded();\n    await page.waitForTimeout(300); \u002F\u002F Wait for any scroll-triggered animations\n\n    await expect(features).toHaveScreenshot('features-section.png');\n  });\n});\n```\n\n### Advanced Screenshot Configuration\n\n```typescript\n\u002F\u002F screenshot-capture.ts\nimport { Page, Locator, expect } from '@playwright\u002Ftest';\n\ninterface ScreenshotOptions {\n  name: string;\n  fullPage?: boolean;\n  maxDiffPixels?: number;\n  maxDiffPixelRatio?: number;\n  threshold?: number;\n  mask?: Locator[];\n  maskColor?: string;\n  animations?: 'disabled' | 'allow';\n  caret?: 'hide' | 'initial';\n  scale?: 'css' | 'device';\n  timeout?: number;\n}\n\nclass ScreenshotCapture {\n  constructor(private page: Page) {}\n\n  async prepareForCapture(): Promise\u003Cvoid> {\n    \u002F\u002F 1. Wait for network to settle\n    await this.page.waitForLoadState('networkidle');\n\n    \u002F\u002F 2. Wait for all fonts to load\n    await this.page.evaluate(() => document.fonts.ready);\n\n    \u002F\u002F 3. Wait for all images to load\n    await this.page.evaluate(async () => {\n      const images = Array.from(document.querySelectorAll('img'));\n      await Promise.all(\n        images.map(img => {\n          if (img.complete) return Promise.resolve();\n          return new Promise((resolve, reject) => {\n            img.addEventListener('load', resolve);\n            img.addEventListener('error', reject);\n          });\n        })\n      );\n    });\n\n    \u002F\u002F 4. Disable all animations and transitions\n    await this.page.addStyleTag({\n      content: `\n        *, *::before, *::after {\n          animation-duration: 0s !important;\n          animation-delay: 0s !important;\n          transition-duration: 0s !important;\n          transition-delay: 0s !important;\n          caret-color: transparent !important;\n        }\n        \u002F* Disable specific problem animations *\u002F\n        .skeleton-loader { animation: none !important; opacity: 1 !important; }\n        .spinner { animation: none !important; display: none !important; }\n        video, .video-player { display: none !important; }\n      `,\n    });\n\n    \u002F\u002F 5. Wait for any remaining React\u002FVue hydration\n    await this.page.waitForTimeout(500);\n\n    \u002F\u002F 6. Scroll to top for consistent starting position\n    await this.page.evaluate(() => window.scrollTo(0, 0));\n  }\n\n  async captureFullPage(options: ScreenshotOptions): Promise\u003Cvoid> {\n    await this.prepareForCapture();\n    await expect(this.page).toHaveScreenshot(options.name, {\n      fullPage: true,\n      maxDiffPixels: options.maxDiffPixels ?? 100,\n      maxDiffPixelRatio: options.maxDiffPixelRatio,\n      threshold: options.threshold ?? 0.2,\n      mask: options.mask ?? [],\n      maskColor: options.maskColor ?? '#FF00FF',\n      animations: 'disabled',\n      caret: 'hide',\n      scale: options.scale ?? 'css',\n      timeout: options.timeout ?? 30000,\n    });\n  }\n\n  async captureElement(\n    locator: Locator,\n    options: ScreenshotOptions\n  ): Promise\u003Cvoid> {\n    await this.prepareForCapture();\n    await locator.scrollIntoViewIfNeeded();\n    await this.page.waitForTimeout(200);\n\n    await expect(locator).toHaveScreenshot(options.name, {\n      maxDiffPixels: options.maxDiffPixels ?? 50,\n      maxDiffPixelRatio: options.maxDiffPixelRatio,\n      threshold: options.threshold ?? 0.2,\n      mask: options.mask ?? [],\n      maskColor: options.maskColor ?? '#FF00FF',\n      animations: 'disabled',\n      caret: 'hide',\n      timeout: options.timeout ?? 15000,\n    });\n  }\n\n  async captureViewport(\n    viewportWidth: number,\n    viewportHeight: number,\n    options: ScreenshotOptions\n  ): Promise\u003Cvoid> {\n    await this.page.setViewportSize({\n      width: viewportWidth,\n      height: viewportHeight,\n    });\n    await this.page.waitForTimeout(500); \u002F\u002F Wait for responsive layout to settle\n    await this.captureFullPage(options);\n  }\n}\n```\n\n## Dynamic Content Masking\n\nDynamic content is the primary source of false positives in visual regression testing. Masking replaces dynamic regions with a solid color before comparison.\n\n```typescript\n\u002F\u002F mask-builder.ts\nimport { Page, Locator } from '@playwright\u002Ftest';\n\ninterface MaskDefinition {\n  selector: string;\n  reason: string;\n  maskColor?: string;\n}\n\nclass MaskBuilder {\n  private masks: MaskDefinition[] = [];\n\n  \u002F**\n   * Add common masks that apply to most pages\n   *\u002F\n  addCommonMasks(): MaskBuilder {\n    this.masks.push(\n      { selector: '[data-testid=\"current-date\"]', reason: 'Dynamic date display' },\n      { selector: '[data-testid=\"current-time\"]', reason: 'Dynamic time display' },\n      { selector: '[data-testid=\"user-avatar\"]', reason: 'User-specific avatar' },\n      { selector: '.relative-time', reason: 'Relative timestamps (e.g., \"2 hours ago\")' },\n      { selector: '[data-testid=\"notification-count\"]', reason: 'Dynamic notification badge' },\n      { selector: '.ad-container', reason: 'Advertisement content' },\n      { selector: 'iframe[src*=\"youtube\"]', reason: 'Embedded video' },\n      { selector: 'iframe[src*=\"maps\"]', reason: 'Embedded map' },\n      { selector: '.analytics-widget', reason: 'Live analytics data' },\n      { selector: '[data-testid=\"random-testimonial\"]', reason: 'Randomized content' },\n    );\n    return this;\n  }\n\n  \u002F**\n   * Add page-specific masks\n   *\u002F\n  addMask(selector: string, reason: string): MaskBuilder {\n    this.masks.push({ selector, reason });\n    return this;\n  }\n\n  \u002F**\n   * Resolve all mask definitions to Playwright Locators\n   *\u002F\n  resolve(page: Page): Locator[] {\n    return this.masks\n      .map(mask => {\n        const locator = page.locator(mask.selector);\n        return locator;\n      });\n  }\n\n  \u002F**\n   * Alternative: Replace dynamic content with deterministic placeholders\n   * This is more stable than masking because it preserves layout\n   *\u002F\n  async replaceDynamicContent(page: Page): Promise\u003Cvoid> {\n    await page.evaluate(() => {\n      \u002F\u002F Replace all relative timestamps with a fixed value\n      document.querySelectorAll('.relative-time, time[datetime]').forEach(el => {\n        el.textContent = 'Jan 1, 2024';\n      });\n\n      \u002F\u002F Replace all avatars with a placeholder\n      document.querySelectorAll\u003CHTMLImageElement>('img[data-testid=\"user-avatar\"]').forEach(img => {\n        img.src = 'data:image\u002Fsvg+xml,\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" width=\"40\" height=\"40\">\u003Crect fill=\"%23ccc\" width=\"40\" height=\"40\"\u002F>\u003C\u002Fsvg>';\n      });\n\n      \u002F\u002F Replace notification counts\n      document.querySelectorAll('[data-testid=\"notification-count\"]').forEach(el => {\n        el.textContent = '0';\n      });\n\n      \u002F\u002F Replace random content with deterministic content\n      document.querySelectorAll('[data-randomized]').forEach(el => {\n        el.textContent = 'Deterministic placeholder';\n      });\n\n      \u002F\u002F Replace live data counters\n      document.querySelectorAll('[data-testid=\"live-count\"]').forEach(el => {\n        el.textContent = '42';\n      });\n    });\n  }\n}\n\n\u002F\u002F Usage in tests\nconst masks = new MaskBuilder()\n  .addCommonMasks()\n  .addMask('[data-testid=\"carousel\"]', 'Auto-rotating carousel')\n  .addMask('.chat-widget', 'Third-party chat widget');\n```\n\n## Responsive Breakpoint Screenshot Matrix\n\nTesting across breakpoints requires a systematic approach to viewport management.\n\n```typescript\n\u002F\u002F viewports.ts\ninterface ViewportDefinition {\n  name: string;\n  width: number;\n  height: number;\n  deviceScaleFactor?: number;\n  isMobile?: boolean;\n  hasTouch?: boolean;\n}\n\nconst standardViewports: ViewportDefinition[] = [\n  { name: 'mobile-portrait', width: 375, height: 812, isMobile: true, hasTouch: true, deviceScaleFactor: 3 },\n  { name: 'mobile-landscape', width: 812, height: 375, isMobile: true, hasTouch: true, deviceScaleFactor: 3 },\n  { name: 'tablet-portrait', width: 768, height: 1024, isMobile: true, hasTouch: true, deviceScaleFactor: 2 },\n  { name: 'tablet-landscape', width: 1024, height: 768, isMobile: true, hasTouch: true, deviceScaleFactor: 2 },\n  { name: 'laptop', width: 1366, height: 768 },\n  { name: 'desktop', width: 1920, height: 1080 },\n  { name: 'ultrawide', width: 2560, height: 1440 },\n];\n\n\u002F\u002F Breakpoint-specific viewports matching CSS media queries\nconst breakpointViewports: ViewportDefinition[] = [\n  { name: 'below-sm', width: 639, height: 900 },   \u002F\u002F Just below sm (640px)\n  { name: 'at-sm', width: 640, height: 900 },       \u002F\u002F At sm breakpoint\n  { name: 'below-md', width: 767, height: 900 },    \u002F\u002F Just below md (768px)\n  { name: 'at-md', width: 768, height: 900 },       \u002F\u002F At md breakpoint\n  { name: 'below-lg', width: 1023, height: 900 },   \u002F\u002F Just below lg (1024px)\n  { name: 'at-lg', width: 1024, height: 900 },      \u002F\u002F At lg breakpoint\n  { name: 'below-xl', width: 1279, height: 900 },   \u002F\u002F Just below xl (1280px)\n  { name: 'at-xl', width: 1280, height: 900 },      \u002F\u002F At xl breakpoint\n];\n\n\u002F\u002F responsive.visual.test.ts\nimport { test, expect, devices } from '@playwright\u002Ftest';\n\nfor (const viewport of standardViewports) {\n  test.describe(`Visual regression at ${viewport.name} (${viewport.width}x${viewport.height})`, () => {\n    test.use({\n      viewport: { width: viewport.width, height: viewport.height },\n      isMobile: viewport.isMobile,\n      hasTouch: viewport.hasTouch,\n      deviceScaleFactor: viewport.deviceScaleFactor,\n    });\n\n    test('homepage matches baseline', async ({ page }) => {\n      await page.goto('\u002F', { waitUntil: 'networkidle' });\n      await page.evaluate(() => document.fonts.ready);\n\n      const capture = new ScreenshotCapture(page);\n      await capture.captureFullPage({\n        name: `homepage-${viewport.name}.png`,\n        maxDiffPixels: viewport.isMobile ? 200 : 100,\n      });\n    });\n\n    test('navigation renders correctly', async ({ page }) => {\n      await page.goto('\u002F', { waitUntil: 'networkidle' });\n      const nav = page.locator('[data-testid=\"main-navigation\"]');\n\n      \u002F\u002F On mobile, the hamburger menu should be visible\n      if (viewport.isMobile) {\n        const hamburger = page.locator('[data-testid=\"mobile-menu-button\"]');\n        await expect(hamburger).toBeVisible();\n      }\n\n      await expect(nav).toHaveScreenshot(`navigation-${viewport.name}.png`, {\n        maxDiffPixels: 50,\n      });\n    });\n  });\n}\n\n\u002F\u002F Test at exact breakpoint boundaries\nfor (const bp of breakpointViewports) {\n  test(`layout at breakpoint boundary ${bp.name} (${bp.width}px)`, async ({ page }) => {\n    await page.setViewportSize({ width: bp.width, height: bp.height });\n    await page.goto('\u002F', { waitUntil: 'networkidle' });\n    await page.evaluate(() => document.fonts.ready);\n\n    await expect(page).toHaveScreenshot(`breakpoint-${bp.name}.png`, {\n      fullPage: false,\n      maxDiffPixels: 150,\n    });\n  });\n}\n```\n\n## Component-Level Screenshots\n\nComponent screenshots provide granular visual regression coverage with smaller, more reviewable diffs.\n\n```typescript\n\u002F\u002F components.visual.test.ts\nimport { test, expect } from '@playwright\u002Ftest';\n\ntest.describe('Component Visual Regression', () => {\n  test.beforeEach(async ({ page }) => {\n    \u002F\u002F Navigate to component showcase or Storybook\n    await page.goto('\u002Fstorybook', { waitUntil: 'networkidle' });\n    await page.evaluate(() => document.fonts.ready);\n    await page.addStyleTag({\n      content: '*, *::before, *::after { animation: none !important; transition: none !important; }',\n    });\n  });\n\n  test.describe('Button components', () => {\n    test('primary button default state', async ({ page }) => {\n      const button = page.locator('[data-testid=\"button-primary\"]');\n      await expect(button).toHaveScreenshot('button-primary-default.png', {\n        maxDiffPixels: 10,\n      });\n    });\n\n    test('primary button hover state', async ({ page }) => {\n      const button = page.locator('[data-testid=\"button-primary\"]');\n      await button.hover();\n      await page.waitForTimeout(100);\n\n      await expect(button).toHaveScreenshot('button-primary-hover.png', {\n        maxDiffPixels: 10,\n      });\n    });\n\n    test('primary button disabled state', async ({ page }) => {\n      const button = page.locator('[data-testid=\"button-primary-disabled\"]');\n      await expect(button).toHaveScreenshot('button-primary-disabled.png', {\n        maxDiffPixels: 10,\n      });\n    });\n\n    test('button with long text wrapping', async ({ page }) => {\n      const button = page.locator('[data-testid=\"button-long-text\"]');\n      await expect(button).toHaveScreenshot('button-long-text.png', {\n        maxDiffPixels: 20,\n      });\n    });\n  });\n\n  test.describe('Card components', () => {\n    test('product card with image', async ({ page }) => {\n      const card = page.locator('[data-testid=\"product-card\"]').first();\n      const masks = new MaskBuilder()\n        .addMask('[data-testid=\"product-price\"]', 'Dynamic price')\n        .addMask('[data-testid=\"product-rating\"]', 'Dynamic rating');\n\n      await expect(card).toHaveScreenshot('product-card.png', {\n        maxDiffPixels: 30,\n        mask: masks.resolve(page),\n      });\n    });\n\n    test('product card skeleton loading state', async ({ page }) => {\n      \u002F\u002F Navigate to page in loading state\n      await page.route('**\u002Fapi\u002Fproducts\u002F**', route => route.abort());\n      await page.goto('\u002Fproducts', { waitUntil: 'domcontentloaded' });\n\n      const skeleton = page.locator('[data-testid=\"product-card-skeleton\"]').first();\n      await expect(skeleton).toHaveScreenshot('product-card-skeleton.png', {\n        maxDiffPixels: 50,\n      });\n    });\n  });\n\n  test.describe('Modal components', () => {\n    test('confirmation dialog', async ({ page }) => {\n      await page.locator('[data-testid=\"open-modal-button\"]').click();\n      await page.waitForSelector('[data-testid=\"modal-dialog\"]', { state: 'visible' });\n      await page.waitForTimeout(300); \u002F\u002F Wait for open animation\n\n      const modal = page.locator('[data-testid=\"modal-dialog\"]');\n      await expect(modal).toHaveScreenshot('modal-confirmation.png', {\n        maxDiffPixels: 20,\n      });\n    });\n\n    test('modal with backdrop', async ({ page }) => {\n      await page.locator('[data-testid=\"open-modal-button\"]').click();\n      await page.waitForSelector('[data-testid=\"modal-overlay\"]', { state: 'visible' });\n      await page.waitForTimeout(300);\n\n      \u002F\u002F Capture the full page to include the backdrop\n      await expect(page).toHaveScreenshot('modal-with-backdrop.png', {\n        maxDiffPixels: 100,\n      });\n    });\n  });\n});\n```\n\n## Threshold Configuration\n\nDifferent components require different comparison thresholds based on their visual complexity and rendering stability.\n\n```typescript\n\u002F\u002F visual-test.config.ts\ninterface ThresholdConfig {\n  global: {\n    maxDiffPixels: number;\n    maxDiffPixelRatio: number;\n    threshold: number; \u002F\u002F Per-pixel color threshold (0-1)\n  };\n  perComponent: Record\u003Cstring, {\n    maxDiffPixels: number;\n    maxDiffPixelRatio?: number;\n    threshold?: number;\n    reason: string;\n  }>;\n  perBrowser: Record\u003Cstring, {\n    maxDiffPixels: number;\n    reason: string;\n  }>;\n}\n\nconst thresholdConfig: ThresholdConfig = {\n  global: {\n    maxDiffPixels: 100,\n    maxDiffPixelRatio: 0.01,\n    threshold: 0.2,\n  },\n  perComponent: {\n    'icon-svg': {\n      maxDiffPixels: 5,\n      threshold: 0.1,\n      reason: 'SVG icons should be pixel-perfect',\n    },\n    'text-heavy': {\n      maxDiffPixels: 200,\n      threshold: 0.3,\n      reason: 'Text rendering varies with font hinting; needs higher tolerance',\n    },\n    'gradient-background': {\n      maxDiffPixels: 500,\n      maxDiffPixelRatio: 0.02,\n      reason: 'GPU-rendered gradients have sub-pixel variations across runs',\n    },\n    'shadow-heavy': {\n      maxDiffPixels: 300,\n      threshold: 0.25,\n      reason: 'Box shadows render differently across GPU drivers',\n    },\n    'chart-visualization': {\n      maxDiffPixels: 1000,\n      maxDiffPixelRatio: 0.05,\n      reason: 'Charts with anti-aliased lines need generous tolerance',\n    },\n    'full-page': {\n      maxDiffPixels: 500,\n      maxDiffPixelRatio: 0.01,\n      reason: 'Full page screenshots accumulate small differences across many elements',\n    },\n  },\n  perBrowser: {\n    firefox: {\n      maxDiffPixels: 300,\n      reason: 'Firefox renders fonts and sub-pixel elements differently from Chromium',\n    },\n    webkit: {\n      maxDiffPixels: 400,\n      reason: 'WebKit has distinct rendering for shadows, gradients, and text',\n    },\n  },\n};\n```\n\n## Animation and Transition Handling\n\n```typescript\n\u002F\u002F animation-disabler.ts\nimport { Page } from '@playwright\u002Ftest';\n\nclass AnimationDisabler {\n  \u002F**\n   * Inject CSS that disables all animations and transitions\n   *\u002F\n  static async disableAll(page: Page): Promise\u003Cvoid> {\n    await page.addStyleTag({\n      content: `\n        \u002F* Disable CSS animations *\u002F\n        *, *::before, *::after {\n          animation-duration: 0s !important;\n          animation-delay: 0s !important;\n          animation-iteration-count: 1 !important;\n          transition-duration: 0s !important;\n          transition-delay: 0s !important;\n        }\n\n        \u002F* Hide cursor blink *\u002F\n        * {\n          caret-color: transparent !important;\n        }\n\n        \u002F* Stop auto-playing videos and GIFs *\u002F\n        video {\n          display: none !important;\n        }\n\n        \u002F* Freeze skeleton loaders *\u002F\n        [class*=\"skeleton\"],\n        [class*=\"shimmer\"],\n        [class*=\"pulse\"] {\n          animation: none !important;\n          opacity: 1 !important;\n          background: #e0e0e0 !important;\n        }\n\n        \u002F* Freeze carousels *\u002F\n        [class*=\"carousel\"],\n        [class*=\"slider\"] {\n          animation: none !important;\n          transform: none !important;\n        }\n\n        \u002F* Disable smooth scrolling *\u002F\n        html {\n          scroll-behavior: auto !important;\n        }\n\n        \u002F* Remove blur effects that may render inconsistently *\u002F\n        [style*=\"blur\"] {\n          filter: none !important;\n        }\n      `,\n    });\n  }\n\n  \u002F**\n   * Wait for all ongoing animations to complete before capture\n   *\u002F\n  static async waitForAnimationsToComplete(page: Page): Promise\u003Cvoid> {\n    await page.evaluate(async () => {\n      \u002F\u002F Wait for Web Animations API animations\n      const animations = document.getAnimations();\n      if (animations.length > 0) {\n        await Promise.all(animations.map(a => a.finished.catch(() => {})));\n      }\n\n      \u002F\u002F Wait for CSS transitions by checking computed styles\n      await new Promise\u003Cvoid>(resolve => {\n        requestAnimationFrame(() => {\n          requestAnimationFrame(() => {\n            resolve();\n          });\n        });\n      });\n    });\n  }\n\n  \u002F**\n   * Stabilize specific known problematic elements\n   *\u002F\n  static async stabilizeElements(page: Page): Promise\u003Cvoid> {\n    await page.evaluate(() => {\n      \u002F\u002F Replace animated SVG spinners with static versions\n      document.querySelectorAll('svg.animate-spin').forEach(el => {\n        el.classList.remove('animate-spin');\n      });\n\n      \u002F\u002F Ensure lazy-loaded images have loaded or show fallback\n      document.querySelectorAll\u003CHTMLImageElement>('img[loading=\"lazy\"]').forEach(img => {\n        if (!img.complete) {\n          img.style.backgroundColor = '#f0f0f0';\n          img.style.minHeight = '100px';\n        }\n      });\n\n      \u002F\u002F Collapse any toast notifications\n      document.querySelectorAll('[role=\"alert\"], .toast, .notification').forEach(el => {\n        (el as HTMLElement).style.display = 'none';\n      });\n    });\n  }\n}\n```\n\n## CI Baseline Update Workflow\n\nManaging baselines in CI requires a disciplined process for updating, reviewing, and approving changes.\n\n```typescript\n\u002F\u002F baseline-manager.ts\nimport { execSync } from 'child_process';\nimport { existsSync, mkdirSync, copyFileSync, readdirSync } from 'fs';\nimport { join, relative } from 'path';\n\ninterface BaselineUpdateReport {\n  updatedBaselines: string[];\n  newBaselines: string[];\n  removedBaselines: string[];\n  unchangedBaselines: string[];\n  totalBaselines: number;\n}\n\nclass BaselineManager {\n  private baselineDir: string;\n  private actualDir: string;\n\n  constructor(baselineDir: string, actualDir: string) {\n    this.baselineDir = baselineDir;\n    this.actualDir = actualDir;\n  }\n\n  \u002F**\n   * Update baselines from latest test run results\n   * This should only be called explicitly, never automatically\n   *\u002F\n  updateBaselines(): BaselineUpdateReport {\n    const report: BaselineUpdateReport = {\n      updatedBaselines: [],\n      newBaselines: [],\n      removedBaselines: [],\n      unchangedBaselines: [],\n      totalBaselines: 0,\n    };\n\n    const actualFiles = this.getScreenshotFiles(this.actualDir);\n    const baselineFiles = this.getScreenshotFiles(this.baselineDir);\n\n    \u002F\u002F Process actual screenshots\n    for (const file of actualFiles) {\n      const baselinePath = join(this.baselineDir, file);\n      const actualPath = join(this.actualDir, file);\n\n      if (!existsSync(baselinePath)) {\n        \u002F\u002F New baseline\n        const dir = join(this.baselineDir, file.substring(0, file.lastIndexOf('\u002F')));\n        if (!existsSync(dir)) mkdirSync(dir, { recursive: true });\n        copyFileSync(actualPath, baselinePath);\n        report.newBaselines.push(file);\n      } else {\n        \u002F\u002F Compare and update if different\n        const isDifferent = this.filesAreDifferent(actualPath, baselinePath);\n        if (isDifferent) {\n          copyFileSync(actualPath, baselinePath);\n          report.updatedBaselines.push(file);\n        } else {\n          report.unchangedBaselines.push(file);\n        }\n      }\n    }\n\n    \u002F\u002F Find removed baselines (exist in baselines but not in actual)\n    for (const file of baselineFiles) {\n      if (!actualFiles.includes(file)) {\n        report.removedBaselines.push(file);\n      }\n    }\n\n    report.totalBaselines = actualFiles.length;\n    return report;\n  }\n\n  private getScreenshotFiles(dir: string): string[] {\n    if (!existsSync(dir)) return [];\n    const files: string[] = [];\n    const walk = (currentDir: string) => {\n      for (const entry of readdirSync(currentDir, { withFileTypes: true })) {\n        const fullPath = join(currentDir, entry.name);\n        if (entry.isDirectory()) {\n          walk(fullPath);\n        } else if (entry.name.endsWith('.png')) {\n          files.push(relative(dir, fullPath));\n        }\n      }\n    };\n    walk(dir);\n    return files;\n  }\n\n  private filesAreDifferent(file1: string, file2: string): boolean {\n    try {\n      execSync(`diff \"${file1}\" \"${file2}\"`, { stdio: 'ignore' });\n      return false;\n    } catch {\n      return true;\n    }\n  }\n}\n```\n\n### Playwright Configuration for Visual Tests\n\n```typescript\n\u002F\u002F playwright.config.ts\nimport { defineConfig, devices } from '@playwright\u002Ftest';\n\nexport default defineConfig({\n  testDir: '.\u002Ftests\u002Fvisual',\n  snapshotDir: '.\u002Ftests\u002Fvisual\u002Fbaselines',\n  snapshotPathTemplate: '{snapshotDir}\u002F{testFileDir}\u002F{testFileName}-snapshots\u002F{arg}{-projectName}{ext}',\n\n  \u002F\u002F Update baselines only when explicitly requested\n  updateSnapshots: process.env.UPDATE_BASELINES === 'true' ? 'all' : 'missing',\n\n  expect: {\n    toHaveScreenshot: {\n      maxDiffPixels: 100,\n      maxDiffPixelRatio: 0.01,\n      threshold: 0.2,\n      animations: 'disabled',\n      caret: 'hide',\n    },\n  },\n\n  projects: [\n    {\n      name: 'chromium',\n      use: {\n        ...devices['Desktop Chrome'],\n        viewport: { width: 1280, height: 720 },\n      },\n    },\n    {\n      name: 'firefox',\n      use: {\n        ...devices['Desktop Firefox'],\n        viewport: { width: 1280, height: 720 },\n      },\n    },\n    {\n      name: 'webkit',\n      use: {\n        ...devices['Desktop Safari'],\n        viewport: { width: 1280, height: 720 },\n      },\n    },\n    {\n      name: 'mobile-chrome',\n      use: {\n        ...devices['Pixel 5'],\n      },\n    },\n    {\n      name: 'mobile-safari',\n      use: {\n        ...devices['iPhone 13'],\n      },\n    },\n  ],\n\n  webServer: {\n    command: 'npm run dev',\n    port: 3000,\n    reuseExistingServer: !process.env.CI,\n  },\n});\n```\n\n## Cross-Browser Screenshot Differences\n\n```typescript\n\u002F\u002F cross-browser.visual.test.ts\nimport { test, expect } from '@playwright\u002Ftest';\n\ntest.describe('Cross-Browser Visual Consistency', () => {\n  test('homepage renders consistently across browsers', async ({ page, browserName }) => {\n    await page.goto('\u002F', { waitUntil: 'networkidle' });\n    await page.evaluate(() => document.fonts.ready);\n\n    const capture = new ScreenshotCapture(page);\n\n    \u002F\u002F Each browser gets its own baseline (via projectName in snapshot path)\n    await capture.captureFullPage({\n      name: 'homepage-cross-browser.png',\n      \u002F\u002F Higher tolerance for browsers with known rendering differences\n      maxDiffPixels: browserName === 'chromium' ? 100 : 500,\n      threshold: browserName === 'webkit' ? 0.3 : 0.2,\n    });\n  });\n\n  test('typography renders acceptably across browsers', async ({ page, browserName }) => {\n    await page.goto('\u002Ftypography-showcase', { waitUntil: 'networkidle' });\n    await page.evaluate(() => document.fonts.ready);\n\n    const textBlock = page.locator('[data-testid=\"typography-sample\"]');\n\n    await expect(textBlock).toHaveScreenshot('typography-sample.png', {\n      \u002F\u002F Font rendering varies significantly across browsers\n      maxDiffPixelRatio: browserName === 'chromium' ? 0.01 : 0.05,\n      threshold: 0.3,\n    });\n  });\n\n  test('form elements render correctly per browser', async ({ page, browserName }) => {\n    await page.goto('\u002Fform-showcase', { waitUntil: 'networkidle' });\n\n    \u002F\u002F Browser-native form elements look very different across browsers\n    \u002F\u002F Only compare custom-styled form elements\n    const customForm = page.locator('[data-testid=\"custom-styled-form\"]');\n\n    await expect(customForm).toHaveScreenshot('custom-form.png', {\n      maxDiffPixels: 200,\n      \u002F\u002F Mask browser-native select\u002Fcheckbox\u002Fradio elements\n      mask: [\n        page.locator('select:not([data-custom])'),\n        page.locator('input[type=\"checkbox\"]:not([data-custom])'),\n        page.locator('input[type=\"radio\"]:not([data-custom])'),\n      ],\n    });\n  });\n});\n```\n\n## Baseline Generation Workflow\n\n```typescript\n\u002F\u002F baseline-review.ts\n\u002F\u002F Script to generate a baseline review report for pull requests\n\ninterface BaselineDiff {\n  file: string;\n  before: string;  \u002F\u002F path to old baseline\n  after: string;   \u002F\u002F path to new screenshot\n  diff: string;    \u002F\u002F path to diff image\n  diffPixels: number;\n  diffPercentage: number;\n}\n\nfunction generateReviewReport(diffs: BaselineDiff[]): string {\n  let report = '## Visual Regression Report\\n\\n';\n  report += `**Total baselines checked:** ${diffs.length}\\n`;\n  report += `**Baselines changed:** ${diffs.filter(d => d.diffPixels > 0).length}\\n\\n`;\n\n  const changed = diffs.filter(d => d.diffPixels > 0);\n\n  if (changed.length === 0) {\n    report += 'No visual changes detected.\\n';\n    return report;\n  }\n\n  report += '### Changed Baselines\\n\\n';\n  report += '| Screenshot | Diff Pixels | Diff % | Status |\\n';\n  report += '|---|---|---|---|\\n';\n\n  for (const diff of changed) {\n    const status = diff.diffPercentage > 5 ? 'Needs Review' : 'Minor Change';\n    report += `| ${diff.file} | ${diff.diffPixels} | ${diff.diffPercentage.toFixed(2)}% | ${status} |\\n`;\n  }\n\n  report += '\\n### Before \u002F After \u002F Diff\\n\\n';\n  for (const diff of changed) {\n    report += `#### ${diff.file}\\n`;\n    report += `| Before | After | Diff |\\n`;\n    report += `|---|---|---|\\n`;\n    report += `| ![before](${diff.before}) | ![after](${diff.after}) | ![diff](${diff.diff}) |\\n\\n`;\n  }\n\n  return report;\n}\n```\n\n## Configuration\n\n```typescript\n\u002F\u002F visual-test.config.ts\ninterface VisualTestConfig {\n  baselines: {\n    directory: string;\n    updateMode: 'none' | 'missing' | 'all';\n    gitTracked: boolean;\n    storageBackend: 'filesystem' | 's3' | 'git-lfs';\n  };\n  capture: {\n    defaultTimeout: number;\n    waitForFonts: boolean;\n    waitForImages: boolean;\n    disableAnimations: boolean;\n    hideCaret: boolean;\n    networkIdleTimeout: number;\n    postLoadDelay: number;\n  };\n  comparison: {\n    defaultMaxDiffPixels: number;\n    defaultMaxDiffPixelRatio: number;\n    defaultThreshold: number;\n    diffOutputDirectory: string;\n    generateDiffImage: boolean;\n    diffHighlightColor: string;\n  };\n  viewports: ViewportDefinition[];\n  browsers: string[];\n  masks: {\n    globalMasks: MaskDefinition[];\n    pageSpecificMasks: Record\u003Cstring, MaskDefinition[]>;\n  };\n  ci: {\n    failOnNewBaselines: boolean;\n    failOnMissingBaselines: boolean;\n    generateReport: boolean;\n    reportFormat: 'markdown' | 'html' | 'json';\n    uploadArtifacts: boolean;\n    artifactRetentionDays: number;\n  };\n}\n\nconst defaultConfig: VisualTestConfig = {\n  baselines: {\n    directory: '.\u002Ftests\u002Fvisual\u002Fbaselines',\n    updateMode: 'missing',\n    gitTracked: true,\n    storageBackend: 'filesystem',\n  },\n  capture: {\n    defaultTimeout: 30000,\n    waitForFonts: true,\n    waitForImages: true,\n    disableAnimations: true,\n    hideCaret: true,\n    networkIdleTimeout: 5000,\n    postLoadDelay: 500,\n  },\n  comparison: {\n    defaultMaxDiffPixels: 100,\n    defaultMaxDiffPixelRatio: 0.01,\n    defaultThreshold: 0.2,\n    diffOutputDirectory: '.\u002Ftest-results\u002Fvisual-diffs',\n    generateDiffImage: true,\n    diffHighlightColor: '#FF00FF',\n  },\n  viewports: standardViewports,\n  browsers: ['chromium', 'firefox', 'webkit'],\n  masks: {\n    globalMasks: [\n      { selector: '[data-testid=\"timestamp\"]', reason: 'Dynamic timestamp' },\n      { selector: '[data-testid=\"avatar\"]', reason: 'User-specific avatar' },\n    ],\n    pageSpecificMasks: {},\n  },\n  ci: {\n    failOnNewBaselines: false,\n    failOnMissingBaselines: true,\n    generateReport: true,\n    reportFormat: 'markdown',\n    uploadArtifacts: true,\n    artifactRetentionDays: 30,\n  },\n};\n```\n\n## Best Practices\n\n1. **Establish baselines from a clean state** -- Generate baselines against a known-good deployment, not a development branch. The first baseline set is your visual contract, and it must represent the intended design.\n\n2. **Store baselines in version control** -- Baselines should be committed alongside the code they test. Use Git LFS for large baseline repositories to avoid bloating the repository.\n\n3. **Run visual tests after functional tests pass** -- Visual tests depend on the page being in the correct state. If functional tests fail, visual tests will produce misleading failures.\n\n4. **Use data-testid attributes for element targeting** -- CSS class names change during refactoring. Test IDs are stable selectors that survive design system updates.\n\n5. **Mask all dynamic content explicitly** -- Document every mask with a reason. Undocumented masks hide potential regressions. A mask list is a list of things you have decided not to test visually.\n\n6. **Test interactive states explicitly** -- Default, hover, focus, active, disabled, error, and loading states each need their own baseline. A button that looks correct in its default state may be invisible in its disabled state.\n\n7. **Set viewport size before navigation** -- Set the viewport before page load, not after. Pages that respond to viewport size during initial render may produce different layouts if the viewport changes after load.\n\n8. **Wait for network idle before capture** -- Lazy-loaded images, API responses, and third-party scripts affect the visual state. Wait for the network to settle before capturing.\n\n9. **Review baseline updates in pull requests** -- Add before\u002Fafter diff images to PR descriptions. Visual changes that are not reviewed are visual regressions that have been silently accepted.\n\n10. **Keep baseline file sizes manageable** -- Use PNG format for baselines (lossless). Compress with tools like optipng but do not use lossy compression. Large baselines slow down CI; consider component-level screenshots over full-page screenshots.\n\n11. **Run visual tests on consistent hardware** -- GPU differences, screen resolution, and operating system font rendering affect screenshots. Run visual tests in Docker containers or CI environments with identical configurations.\n\n12. **Separate visual test suites from functional test suites** -- Visual tests are slower and more sensitive to environment changes. Run them as a separate CI job that can be retriggered independently.\n\n13. **Maintain a threshold changelog** -- When you increase a threshold, document why. Gradually increasing thresholds to make tests pass is a sign of eroding visual quality.\n\n## Anti-Patterns to Avoid\n\n1. **Using the same threshold for all elements** -- A pixel-perfect icon needs a threshold of 5 pixels. A full-page screenshot of a data dashboard needs 500. Using a single threshold either produces false positives for simple elements or false negatives for complex ones.\n\n2. **Automatically updating baselines in CI** -- If your CI pipeline automatically accepts new baselines when tests fail, you have no visual regression testing. Every baseline change must be human-reviewed.\n\n3. **Ignoring font loading timing** -- Screenshots captured before web fonts load show system fonts. This produces massive diffs that are not real regressions. Always await `document.fonts.ready`.\n\n4. **Not disabling animations** -- An animation captured at different frames produces different screenshots. This causes flaky tests that undermine confidence in the entire visual test suite.\n\n5. **Testing only one viewport** -- A page that looks correct at 1920px may be completely broken at 375px. Test at minimum: mobile portrait, tablet, and desktop viewports.\n\n6. **Storing baselines outside version control** -- Baselines in S3 or shared drives become orphaned, outdated, and impossible to associate with specific code versions. Keep them in the repository.\n\n7. **Using percentage-based diff thresholds only** -- A 0.1% difference on a 1920x1080 screenshot is 2,073 pixels. That is enough to miss a completely wrong button. Use absolute pixel counts alongside percentage ratios.\n\n8. **Capturing screenshots during page transitions** -- A screenshot taken while a page is navigating, loading, or animating is non-deterministic. Wait for all asynchronous activity to complete.\n\n## Debugging Tips\n\n1. **Test passes locally but fails in CI** -- The most common cause is font rendering differences. CI machines may not have the same fonts installed. Use web fonts served from the application rather than relying on system fonts. Alternatively, use Docker images with identical font packages.\n\n2. **Screenshots differ by a few pixels every run** -- This is typically caused by sub-pixel anti-aliasing, GPU rendering differences, or undetected animations. Increase the threshold slightly and document the reason. If the difference is consistently in the same location, mask that specific region.\n\n3. **Full-page screenshot height varies between runs** -- Dynamic content (lazy-loaded sections, expandable elements, or API-driven lists) can change the page height. Mock API responses to return deterministic data, or use viewport screenshots instead of full-page captures.\n\n4. **Baseline images are blurry on high-DPI displays** -- Set `scale: 'css'` in the screenshot options to capture at CSS pixel resolution rather than device pixel resolution. This produces consistent images regardless of the display's pixel density.\n\n5. **Modal or tooltip screenshots are empty** -- The element may not be visible at the time of capture. Add an explicit wait for the element to become visible: `await page.waitForSelector('[data-testid=\"modal\"]', { state: 'visible' })`.\n\n6. **Carousel or slider captures show different slides** -- Disable auto-rotation before capturing. Either mock the timer, inject CSS to freeze the carousel, or programmatically navigate to a specific slide before capture.\n\n7. **Browser-specific test fails but the page looks identical visually** -- Browsers render text hinting, box shadows, and gradients differently at the sub-pixel level. Maintain separate baselines per browser (Playwright does this automatically with project names in the snapshot path).\n\n8. **Git repository grows too large from baseline images** -- Switch to Git LFS for storing PNG baselines. Run `git lfs install` and add `*.png filter=lfs diff=lfs merge=lfs -text` to `.gitattributes`. This moves large binary files to separate storage.\n\n9. **Visual test takes too long to run** -- Reduce the number of full-page screenshots. Use component-level screenshots for most checks and reserve full-page captures for critical pages only. Also ensure `waitUntil: 'networkidle'` is not waiting for long-polling connections.\n\n10. **Masks are not covering the right area** -- The element may have shifted position between the baseline capture and the current run. Use `data-testid` selectors rather than position-dependent selectors. If the element's size varies, use a parent container as the mask target.",{"name":5,"tags":24,"agents":32,"author":45,"domains":46,"license":15,"version":48,"languages":49,"frameworks":52,"description":7,"testingTypes":54},[25,26,27,28,29,30,31],"visual-regression","screenshot-testing","baseline","image-diff","pixel-comparison","responsive-screenshots","visual-testing",[33,34,35,36,37,38,39,40,41,42,43,44],"claude-code","cursor","github-copilot","windsurf","codex","aider","continue","cline","zed","bolt","gemini-cli","amp","Pramod",[47],"web","1.0.0",[50,51],"typescript","javascript",[53],"playwright",[55,56],"visual","e2e","main","eac438ea9216a7cb8a570cab803eb01eeafc6793","skills\u002Fqa\u002Fscreenshot-baseline-generator","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m","https:\u002F\u002Fid-preview--d5bef06d-6c9e-4563-a3d4-a855b9d61610.lovable.app\u002F","Eu sou Antonio B. B. Ndombe \r\nEu sou um Pesquisador e desenvolvedor de sistema autonomia cognitivos, fundador de sistemas ODCs ( organismos digital conscientes)","2026-11-04 06:53:39",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Screenshot Baseline Generator\"",{"tool":71,"command":72},"bunx","bunx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Screenshot Baseline Generator\"",{"tool":74,"command":75},"pnpm","pnpm dlx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Screenshot Baseline Generator\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fscreenshot-baseline-generator\u002FSKILL.md",true,[],[80,88,95,102,109,116],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7DASC6FSCJP49JZBSK0NY1Z","nemoclaw-user-reference","Describes the NemoClaw integration layer and blueprint architecture and how they orchestrate compatible agent sandboxes. Use when looking up architecture, agent integration, plugin structure, or blueprint design. Trigger keywords - nemoclaw architecture, nemoclaw agent architecture, nemoclaw plugin blueprint structure, nemoclaw vs openshell, which cli, nemoclaw cli, openshell cli, sandbox commands, nemoclaw cli commands, nemoclaw command reference, nemoclaw network policy, sandbox egress control operator approval, nemoclaw troubleshooting, nemoclaw debug sandbox issues.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-reference\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7DAS5S79VK33XFGVAM2TFWF","nemoclaw-user-overview","Explains how OpenClaw, OpenShell, and NemoClaw form the ecosystem, NemoClaw's position in the stack, what NemoClaw adds beyond the community sandbox, and when to prefer NemoClaw versus integrating OpenShell and OpenClaw directly. Use when users ask about the relationship between OpenClaw, OpenShell, and NemoClaw, or when to use NemoClaw versus OpenShell. Trigger keywords - nemoclaw ecosystem, openclaw openshell, nemoclaw vs openshell, sandboxed openclaw, how nemoclaw works, nemoclaw sandbox lifecycle blueprint, nemoclaw overview, openclaw always-on assistants, nvidia openshell, nvidia nemotron, nemoclaw release notes, nemoclaw changelog.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-overview\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7DAS0PQEMET5MNGZ1ABSZVS","nemoclaw-user-monitor-sandbox","Inspects sandbox health, traces agent behavior, and diagnoses problems. Use when monitoring a running sandbox, debugging agent issues, or checking sandbox logs. Trigger keywords - monitor nemoclaw sandbox, debug nemoclaw agent issues.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-monitor-sandbox\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M7DARQYGF7E9A69VH6S3CGN9","nemoclaw-user-manage-sandboxes","Explains operational tasks after the quickstart: listing sandboxes, status and health checks, logs, diagnostics, port forwards, multiple sandboxes, credential reset, rebuilds, network presets, upgrades, and uninstall. Trigger keywords - manage nemoclaw sandboxes, nemoclaw status, nemoclaw list, nemoclaw dashboard port, nemoclaw rebuild, nemoclaw upgrade sandboxes, nemoclaw uninstall, sandbox mutability, sandbox runtime configuration, sandbox rebuild, nemoclaw backup, nemoclaw restore, workspace backup, openshell sandbox download upload, nemoclaw messaging channels, nemoclaw telegram, nemoclaw discord, nemoclaw slack, nemoclaw wechat, nemoclaw whatsapp, openshell channel messaging, nemoclaw workspace files, soul.md, user.md, identity.md, agents.md, sandbox persistence.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-sandboxes\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":19},"01M7DARH8BRTG51TRCAB7YWDJ4","nemoclaw-user-manage-policy","Adds, removes, or modifies allowed endpoints in the sandbox policy. Use when customizing network policy, changing egress rules, or configuring sandbox endpoint access. Trigger keywords - customize nemoclaw network policy, sandbox egress policy configuration, nemoclaw integration policy examples, post-install policy setup, openshell approval workflow, policy preset, nemoclaw approve network requests, sandbox egress approval tui.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-policy\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":19},"01M7DARAT62M2VR37590VCZ5NS","nemoclaw-user-get-started","Installs NemoClaw, launches a sandbox, and runs the first agent prompt. Use when onboarding, installing, or launching a NemoClaw sandbox for the first time. Trigger keywords - nemoclaw quickstart, install nemoclaw openclaw sandbox, nemohermes quickstart, hermes agent nemoclaw, run hermes openshell sandbox, nemoclaw prerequisites, nemoclaw supported platforms, nemoclaw hardware software, nemoclaw windows wsl2 setup, nemoclaw install windows docker desktop.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-get-started\u002FSKILL.md",[],[]]