[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M753959VZJ7AS3FTTFKJMMAA":3,"skill-same:01M753959VZJ7AS3FTTFKJMMAA":67},{"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":29,"commitSha":30,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M753959VZJ7AS3FTTFKJMMAA","managing-snapshot-tests",null,"Create and validate component snapshots for UI regression testing.\nUse when performing specialized testing.\nTrigger with phrases like \"update snapshots\", \"test UI snapshots\", or \"validate component snapshots\".","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fmanaging-snapshot-tests\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: managing-snapshot-tests\ndescription: |\n  Create and validate component snapshots for UI regression testing.\n  Use when performing specialized testing.\n  Trigger with phrases like \"update snapshots\", \"test UI snapshots\", or \"validate component snapshots\".\n\nallowed-tools: Read, Write, Edit, Grep, Glob, Bash(test:snapshot-*)\nversion: 1.0.0\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\nlicense: MIT\ncompatible-with: claude-code, codex, openclaw\n---\n# Snapshot Test Manager\n\n## Overview\n\nCreate, update, and maintain snapshot tests for UI components and data structures using Jest, Vitest, or pytest snapshot plugins. Manages serialized output snapshots (HTML, JSON, component trees) to detect unexpected changes in rendered output.\n\n## Prerequisites\n\n- Jest or Vitest with built-in snapshot support, or `pytest-snapshot`\u002F`syrupy` for Python\n- React Testing Library, Vue Test Utils, or equivalent for component rendering\n- Snapshot files committed to version control (`.snap` files or `__snapshots__\u002F` directory)\n- Component library with stable prop interfaces\n- Code review process that includes snapshot diff review\n\n## Instructions\n\n1. Identify components and data structures suitable for snapshot testing:\n   - UI components with complex rendered output (navigation bars, forms, cards).\n   - API response transformers producing structured JSON.\n   - Configuration generators outputting YAML or TOML.\n   - Avoid snapshots for highly dynamic content (timestamps, random IDs).\n2. Write snapshot tests for each target:\n   - Render the component with representative props.\n   - Call `expect(result).toMatchSnapshot()` or `toMatchInlineSnapshot()`.\n   - Create separate snapshots for each meaningful prop combination.\n   - Use inline snapshots for small outputs (under 20 lines) for better readability.\n3. Organize snapshot files:\n   - Group snapshots by component in `__snapshots__\u002FComponentName.test.ts.snap`.\n   - Name each snapshot descriptively: `\"renders with error state\"`, `\"displays loading skeleton\"`.\n   - Keep snapshot files in the same directory as the test file.\n4. Review and update snapshots when intentional changes occur:\n   - Run `jest --updateSnapshot` or `vitest --update` after verifying changes are correct.\n   - Review every line of the snapshot diff in pull requests -- do not blindly update.\n   - Add a comment in the PR explaining why snapshots changed.\n5. Clean up obsolete snapshots:\n   - Run `jest --ci` to detect obsolete snapshots that no longer match any test.\n   - Delete orphaned `.snap` files for removed components.\n   - Periodically run snapshot cleanup to prevent stale data.\n6. Set up CI to fail on snapshot mismatches without auto-updating:\n   - Use `--ci` flag which treats missing snapshots as failures.\n   - Upload snapshot diff output as a CI artifact for review.\n7. Consider property-based snapshot alternatives for large components:\n   - Use `toMatchObject` for partial structure matching.\n   - Use custom serializers to exclude volatile fields.\n\n## Output\n\n- Snapshot test files (`*.test.ts` or `*.test.tsx`) with `toMatchSnapshot()` assertions\n- Snapshot data files (`__snapshots__\u002F*.snap`)\n- Snapshot update report listing changed, added, and removed snapshots\n- CI configuration preventing accidental snapshot updates in automated runs\n- Custom serializer modules for filtering dynamic content\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| Snapshot mismatch on unrelated change | Component depends on a shared style or context provider | Isolate components with wrapper providers; mock global styles |\n| Snapshot file is enormous (>1000 lines) | Entire page DOM serialized instead of target component | Narrow the snapshot scope to the specific component subtree; use `container.querySelector` |\n| Obsolete snapshot warning | Test was renamed or deleted but `.snap` file remains | Run `jest --updateSnapshot` to remove orphaned entries; delete unused `.snap` files |\n| Snapshot differs between local and CI | Different Node.js version or OS renders slightly different output | Pin Node.js version in CI; use `toMatchInlineSnapshot` for exact control |\n| Non-deterministic snapshot | Component includes random keys, timestamps, or Math.random() | Mock `Date.now()` and `Math.random()`; use `expect.any(String)` for volatile fields |\n\n## Examples\n\n**React component snapshot test (Jest):**\n```tsx\nimport { render } from '@testing-library\u002Freact';\nimport { Alert } from '.\u002FAlert';\n\ndescribe('Alert', () => {\n  it('renders success variant', () => {\n    const { container } = render(\n      \u003CAlert variant=\"success\" message=\"Operation completed\" \u002F>\n    );\n    expect(container.firstChild).toMatchSnapshot();\n  });\n\n  it('renders error with inline snapshot', () => {\n    const { container } = render(\n      \u003CAlert variant=\"error\" message=\"Something failed\" \u002F>\n    );\n    expect(container.firstChild).toMatchInlineSnapshot(`\n      \u003Cdiv class=\"alert alert-error\" role=\"alert\">\n        \u003Cspan>Something failed\u003C\u002Fspan>\n      \u003C\u002Fdiv>\n    `);\n  });\n});\n```\n\n**Custom serializer to exclude dynamic IDs:**\n```typescript\n\u002F\u002F jest.config.ts\nexport default {\n  snapshotSerializers: ['.\u002Ftest\u002Fserializers\u002Fstrip-ids.ts'],\n};\n\n\u002F\u002F test\u002Fserializers\u002Fstrip-ids.ts\nexport const serialize = (val: string) =>\n  val.replace(\u002Fid=\"[a-z0-9-]+\"\u002Fg, 'id=\"[dynamic]\"');\nexport const test = (val: unknown) => typeof val === 'string' && val.includes('id=');\n```\n\n## Resources\n\n- Jest snapshot testing: https:\u002F\u002Fjestjs.io\u002Fdocs\u002Fsnapshot-testing\n- Vitest snapshots: https:\u002F\u002Fvitest.dev\u002Fguide\u002Fsnapshot\n- React Testing Library: https:\u002F\u002Ftesting-library.com\u002Fdocs\u002Freact-testing-library\u002Fintro\u002F\n- Syrupy (pytest snapshots): https:\u002F\u002Fgithub.com\u002Ftoptal\u002Fsyrupy\n- Effective Snapshot Testing: https:\u002F\u002Fkentcdodds.com\u002Fblog\u002Feffective-snapshot-testing","# Snapshot Test Manager\n\n## Overview\n\nCreate, update, and maintain snapshot tests for UI components and data structures using Jest, Vitest, or pytest snapshot plugins. Manages serialized output snapshots (HTML, JSON, component trees) to detect unexpected changes in rendered output.\n\n## Prerequisites\n\n- Jest or Vitest with built-in snapshot support, or `pytest-snapshot`\u002F`syrupy` for Python\n- React Testing Library, Vue Test Utils, or equivalent for component rendering\n- Snapshot files committed to version control (`.snap` files or `__snapshots__\u002F` directory)\n- Component library with stable prop interfaces\n- Code review process that includes snapshot diff review\n\n## Instructions\n\n1. Identify components and data structures suitable for snapshot testing:\n   - UI components with complex rendered output (navigation bars, forms, cards).\n   - API response transformers producing structured JSON.\n   - Configuration generators outputting YAML or TOML.\n   - Avoid snapshots for highly dynamic content (timestamps, random IDs).\n2. Write snapshot tests for each target:\n   - Render the component with representative props.\n   - Call `expect(result).toMatchSnapshot()` or `toMatchInlineSnapshot()`.\n   - Create separate snapshots for each meaningful prop combination.\n   - Use inline snapshots for small outputs (under 20 lines) for better readability.\n3. Organize snapshot files:\n   - Group snapshots by component in `__snapshots__\u002FComponentName.test.ts.snap`.\n   - Name each snapshot descriptively: `\"renders with error state\"`, `\"displays loading skeleton\"`.\n   - Keep snapshot files in the same directory as the test file.\n4. Review and update snapshots when intentional changes occur:\n   - Run `jest --updateSnapshot` or `vitest --update` after verifying changes are correct.\n   - Review every line of the snapshot diff in pull requests -- do not blindly update.\n   - Add a comment in the PR explaining why snapshots changed.\n5. Clean up obsolete snapshots:\n   - Run `jest --ci` to detect obsolete snapshots that no longer match any test.\n   - Delete orphaned `.snap` files for removed components.\n   - Periodically run snapshot cleanup to prevent stale data.\n6. Set up CI to fail on snapshot mismatches without auto-updating:\n   - Use `--ci` flag which treats missing snapshots as failures.\n   - Upload snapshot diff output as a CI artifact for review.\n7. Consider property-based snapshot alternatives for large components:\n   - Use `toMatchObject` for partial structure matching.\n   - Use custom serializers to exclude volatile fields.\n\n## Output\n\n- Snapshot test files (`*.test.ts` or `*.test.tsx`) with `toMatchSnapshot()` assertions\n- Snapshot data files (`__snapshots__\u002F*.snap`)\n- Snapshot update report listing changed, added, and removed snapshots\n- CI configuration preventing accidental snapshot updates in automated runs\n- Custom serializer modules for filtering dynamic content\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| Snapshot mismatch on unrelated change | Component depends on a shared style or context provider | Isolate components with wrapper providers; mock global styles |\n| Snapshot file is enormous (>1000 lines) | Entire page DOM serialized instead of target component | Narrow the snapshot scope to the specific component subtree; use `container.querySelector` |\n| Obsolete snapshot warning | Test was renamed or deleted but `.snap` file remains | Run `jest --updateSnapshot` to remove orphaned entries; delete unused `.snap` files |\n| Snapshot differs between local and CI | Different Node.js version or OS renders slightly different output | Pin Node.js version in CI; use `toMatchInlineSnapshot` for exact control |\n| Non-deterministic snapshot | Component includes random keys, timestamps, or Math.random() | Mock `Date.now()` and `Math.random()`; use `expect.any(String)` for volatile fields |\n\n## Examples\n\n**React component snapshot test (Jest):**\n```tsx\nimport { render } from '@testing-library\u002Freact';\nimport { Alert } from '.\u002FAlert';\n\ndescribe('Alert', () => {\n  it('renders success variant', () => {\n    const { container } = render(\n      \u003CAlert variant=\"success\" message=\"Operation completed\" \u002F>\n    );\n    expect(container.firstChild).toMatchSnapshot();\n  });\n\n  it('renders error with inline snapshot', () => {\n    const { container } = render(\n      \u003CAlert variant=\"error\" message=\"Something failed\" \u002F>\n    );\n    expect(container.firstChild).toMatchInlineSnapshot(`\n      \u003Cdiv class=\"alert alert-error\" role=\"alert\">\n        \u003Cspan>Something failed\u003C\u002Fspan>\n      \u003C\u002Fdiv>\n    `);\n  });\n});\n```\n\n**Custom serializer to exclude dynamic IDs:**\n```typescript\n\u002F\u002F jest.config.ts\nexport default {\n  snapshotSerializers: ['.\u002Ftest\u002Fserializers\u002Fstrip-ids.ts'],\n};\n\n\u002F\u002F test\u002Fserializers\u002Fstrip-ids.ts\nexport const serialize = (val: string) =>\n  val.replace(\u002Fid=\"[a-z0-9-]+\"\u002Fg, 'id=\"[dynamic]\"');\nexport const test = (val: unknown) => typeof val === 'string' && val.includes('id=');\n```\n\n## Resources\n\n- Jest snapshot testing: https:\u002F\u002Fjestjs.io\u002Fdocs\u002Fsnapshot-testing\n- Vitest snapshots: https:\u002F\u002Fvitest.dev\u002Fguide\u002Fsnapshot\n- React Testing Library: https:\u002F\u002Ftesting-library.com\u002Fdocs\u002Freact-testing-library\u002Fintro\u002F\n- Syrupy (pytest snapshots): https:\u002F\u002Fgithub.com\u002Ftoptal\u002Fsyrupy\n- Effective Snapshot Testing: https:\u002F\u002Fkentcdodds.com\u002Fblog\u002Feffective-snapshot-testing",{"name":5,"author":24,"license":15,"version":25,"description":26,"allowed-tools":27,"compatible-with":28},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Create and validate component snapshots for UI regression testing.\nUse when performing specialized testing.\nTrigger with phrases like \"update snapshots\", \"test UI snapshots\", or \"validate component snapshots\".\n","Read, Write, Edit, Grep, Glob, Bash(test:snapshot-*)","claude-code, codex, openclaw","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill managing-snapshot-tests",{"tool":41,"command":42},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill managing-snapshot-tests",{"tool":44,"command":45},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill managing-snapshot-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fmanaging-snapshot-tests\u002FSKILL.md",true,[49,55,61],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"assets\u002FREADME.md","ASSET","资产文件",260,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fmanaging-snapshot-tests\u002Fassets\u002FREADME.md",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002FREADME.md","REFERENCE","参考文档",65,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fmanaging-snapshot-tests\u002Freferences\u002FREADME.md",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"scripts\u002FREADME.md","SCRIPT","脚本",344,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fmanaging-snapshot-tests\u002Fscripts\u002FREADME.md",[68,75,82,89,96,104],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":100,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]