[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FGPDE9W2FQRJHW56DNVPRH":3,"skill-same:01M6FGPDE9W2FQRJHW56DNVPRH":68},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6FGPDE9W2FQRJHW56DNVPRH","mutation-testing",null,"Validate test effectiveness with mutation testing using Stryker (TypeScript\u002FJavaScript with Vitest or bun test via @hughescr\u002Fstryker-bun-runner) and mutmut (Python). Find weak tests that pass despite code mutations. Use to improve test quality.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fmutation-testing\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"mutation","mutation testing","testing","write","with","stryker","tests","runner","mutations","use","edit","read","improve","vitest","Bash","code","test","javascript","python","typescript","2026-11-10 10:12:30",false,"---\nname: mutation-testing\ndescription: Validate test effectiveness with mutation testing using Stryker (TypeScript\u002FJavaScript with Vitest or bun test via @hughescr\u002Fstryker-bun-runner) and mutmut (Python). Find weak tests that pass despite code mutations. Use to improve test quality.\nallowed-tools: Bash, Read, Edit, Write, Grep, Glob, TodoWrite\nlicense: MIT\n---\n\n# Mutation Testing\n\nExpert knowledge for mutation testing - validating that your tests actually catch bugs by introducing deliberate code mutations.\n\n## Core Concept\n\n- **Mutants**: Small code changes introduced automatically\n- **Killed**: Test fails with mutation (good - test caught the bug)\n- **Survived**: Test passes with mutation (bad - weak test)\n- **Score**: Percentage of mutants killed (aim for 80%+)\n\n## TypeScript\u002FJavaScript (Stryker)\n\n### Vitest Runner\n\n#### Installation\n\n```bash\n# Using Bun\nbun add -d @stryker-mutator\u002Fcore @stryker-mutator\u002Fvitest-runner\n\n# Using npm\nnpm install -D @stryker-mutator\u002Fcore @stryker-mutator\u002Fvitest-runner\n```\n\n#### Configuration\n\n```typescript\n\u002F\u002F stryker.config.mjs\nexport default {\n  packageManager: 'bun',\n  reporters: ['html', 'clear-text', 'progress'],\n  testRunner: 'vitest',\n  coverageAnalysis: 'perTest',\n  mutate: ['src\u002F**\u002F*.ts', '!src\u002F**\u002F*.test.ts'],\n  thresholds: { high: 80, low: 60, break: 60 },\n  incremental: true,\n}\n```\n\n### Bun Native Runner (`bun test`)\n\nUse when projects use `bun test` directly (not Vitest).\n\n#### Requirements\n\n- Bun **>= 1.3.7** (needs TestReporter WebSocket events from Bun PR #25986)\n- `@stryker-mutator\u002Fcore ^9.0.0`\n\n#### Installation\n\n```bash\nbun add -D @hughescr\u002Fstryker-bun-runner @stryker-mutator\u002Fcore\n```\n\n#### Configuration\n\n```javascript\n\u002F\u002F stryker.conf.mjs\nexport default {\n  testRunner: 'bun',\n  coverageAnalysis: 'perTest',\n  mutate: ['src\u002F**\u002F*.ts', '!src\u002F**\u002F*.test.ts'],\n  thresholds: { high: 80, low: 60, break: 60 },\n  incremental: true,\n  bun: {\n    inspectorTimeout: 5000,  \u002F\u002F WebSocket Inspector connection timeout (ms)\n    \u002F\u002F bunPath: '\u002Fpath\u002Fto\u002Fbun',  \u002F\u002F only if custom Bun install\n    \u002F\u002F timeout: 30000,           \u002F\u002F test timeout (ms)\n    \u002F\u002F env: { DEBUG: 'true' },\n    \u002F\u002F bunArgs: ['--bail'],\n  },\n}\n```\n\n#### Key Behaviors\n\n- **Sequential execution**: Runs tests with `--concurrency=1` for accurate per-test coverage. Slower than parallel but required for correct test-to-mutant correlation.\n- **Concurrent test patching**: Automatically patches `describe.concurrent()`, `test.concurrent()`, `it.concurrent()` to run sequentially during mutation testing — no code changes needed.\n- **Inspector Protocol**: Uses Bun's WebSocket Inspector API to discover tests and correlate coverage.\n\n### Running Stryker\n\n```bash\n# Run mutation testing\nbunx stryker run\n\n# Incremental mode (only changed files)\nbunx stryker run --incremental\n\n# Specific files\nbunx stryker run --mutate \"src\u002Futils\u002F**\u002F*.ts\"\n\n# Open HTML report\nopen reports\u002Fmutation\u002Fhtml\u002Findex.html\n```\n\n### Example: Weak Test\n\n```typescript\n\u002F\u002F Source code\nfunction calculateDiscount(price: number, percentage: number): number {\n  return price - (price * percentage \u002F 100)\n}\n\n\u002F\u002F ❌ WEAK: Test passes even if we mutate calculation\ntest('applies discount', () => {\n  expect(calculateDiscount(100, 10)).toBeDefined() \u002F\u002F Too weak!\n})\n\n\u002F\u002F ✅ STRONG: Test catches mutation\ntest('applies discount correctly', () => {\n  expect(calculateDiscount(100, 10)).toBe(90)\n  expect(calculateDiscount(100, 20)).toBe(80)\n  expect(calculateDiscount(50, 10)).toBe(45)\n})\n```\n\n## Python (mutmut)\n\n### Installation\n\n```bash\nuv add --dev mutmut\n```\n\n### Running mutmut\n\n```bash\n# Run mutation testing\nuv run mutmut run\n\n# Show results\nuv run mutmut results\n\n# Show specific mutant\nuv run mutmut show 1\n\n# Generate HTML report\nuv run mutmut html\nopen html\u002Findex.html\n```\n\n## Common Mutation Types\n\n```typescript\n\u002F\u002F Arithmetic Operator\n\u002F\u002F Original: a + b → a - b, a * b, a \u002F b\n\n\u002F\u002F Relational Operator\n\u002F\u002F Original: a > b → a >= b, a \u003C b, a \u003C= b\n\n\u002F\u002F Logical Operator\n\u002F\u002F Original: a && b → a || b\n\n\u002F\u002F Boolean Literal\n\u002F\u002F Original: true → false\n```\n\n## Mutation Score Targets\n\n| Score | Quality | Action |\n|-------|---------|--------|\n| 90%+ | Excellent | Maintain quality |\n| 80-89% | Good | Small improvements |\n| 70-79% | Acceptable | Focus on weak areas |\n| \u003C 60% | Poor | Major improvements needed |\n\n## Improving Weak Tests\n\n### Pattern: Insufficient Assertions\n\n```typescript\n\u002F\u002F Before: Mutation survives\ntest('calculates sum', () => {\n  expect(sum([1, 2, 3])).toBeGreaterThan(0) \u002F\u002F Weak!\n})\n\n\u002F\u002F After: Mutation killed\ntest('calculates sum correctly', () => {\n  expect(sum([1, 2, 3])).toBe(6)\n  expect(sum([0, 0, 0])).toBe(0)\n  expect(sum([])).toBe(0)\n})\n```\n\n### Pattern: Boundary Conditions\n\n```typescript\n\u002F\u002F After: Tests boundaries\ntest('validates age boundaries', () => {\n  expect(isValidAge(18)).toBe(true)   \u002F\u002F Min valid\n  expect(isValidAge(17)).toBe(false)  \u002F\u002F Just below\n  expect(isValidAge(100)).toBe(true)  \u002F\u002F Max valid\n  expect(isValidAge(101)).toBe(false) \u002F\u002F Just above\n})\n```\n\n## Best Practices\n\n- Start with core business logic modules\n- Ensure 80%+ coverage before mutation testing\n- Run incrementally (only changed files)\n- Focus on important files first\n- Don't expect 100% mutation score (equivalent mutants exist)\n\n## Workflow\n\n```bash\n# 1. Ensure good coverage first\nbun test --coverage\n# Target: 80%+ coverage\n\n# 2. Run mutation testing\nbunx stryker run\n\n# 3. Check report\nopen reports\u002Fmutation\u002Fhtml\u002Findex.html\n\n# 4. Fix survived mutants\n# 5. Re-run incrementally\nbunx stryker run --incremental\n# or: npx stryker run --incremental\n```\n\n## See Also\n\n- `vitest-testing` - Unit testing framework\n- `test-quality-analysis` - Detecting test smells\n","# Mutation Testing\n\nExpert knowledge for mutation testing - validating that your tests actually catch bugs by introducing deliberate code mutations.\n\n## Core Concept\n\n- **Mutants**: Small code changes introduced automatically\n- **Killed**: Test fails with mutation (good - test caught the bug)\n- **Survived**: Test passes with mutation (bad - weak test)\n- **Score**: Percentage of mutants killed (aim for 80%+)\n\n## TypeScript\u002FJavaScript (Stryker)\n\n### Vitest Runner\n\n#### Installation\n\n```bash\n# Using Bun\nbun add -d @stryker-mutator\u002Fcore @stryker-mutator\u002Fvitest-runner\n\n# Using npm\nnpm install -D @stryker-mutator\u002Fcore @stryker-mutator\u002Fvitest-runner\n```\n\n#### Configuration\n\n```typescript\n\u002F\u002F stryker.config.mjs\nexport default {\n  packageManager: 'bun',\n  reporters: ['html', 'clear-text', 'progress'],\n  testRunner: 'vitest',\n  coverageAnalysis: 'perTest',\n  mutate: ['src\u002F**\u002F*.ts', '!src\u002F**\u002F*.test.ts'],\n  thresholds: { high: 80, low: 60, break: 60 },\n  incremental: true,\n}\n```\n\n### Bun Native Runner (`bun test`)\n\nUse when projects use `bun test` directly (not Vitest).\n\n#### Requirements\n\n- Bun **>= 1.3.7** (needs TestReporter WebSocket events from Bun PR #25986)\n- `@stryker-mutator\u002Fcore ^9.0.0`\n\n#### Installation\n\n```bash\nbun add -D @hughescr\u002Fstryker-bun-runner @stryker-mutator\u002Fcore\n```\n\n#### Configuration\n\n```javascript\n\u002F\u002F stryker.conf.mjs\nexport default {\n  testRunner: 'bun',\n  coverageAnalysis: 'perTest',\n  mutate: ['src\u002F**\u002F*.ts', '!src\u002F**\u002F*.test.ts'],\n  thresholds: { high: 80, low: 60, break: 60 },\n  incremental: true,\n  bun: {\n    inspectorTimeout: 5000,  \u002F\u002F WebSocket Inspector connection timeout (ms)\n    \u002F\u002F bunPath: '\u002Fpath\u002Fto\u002Fbun',  \u002F\u002F only if custom Bun install\n    \u002F\u002F timeout: 30000,           \u002F\u002F test timeout (ms)\n    \u002F\u002F env: { DEBUG: 'true' },\n    \u002F\u002F bunArgs: ['--bail'],\n  },\n}\n```\n\n#### Key Behaviors\n\n- **Sequential execution**: Runs tests with `--concurrency=1` for accurate per-test coverage. Slower than parallel but required for correct test-to-mutant correlation.\n- **Concurrent test patching**: Automatically patches `describe.concurrent()`, `test.concurrent()`, `it.concurrent()` to run sequentially during mutation testing — no code changes needed.\n- **Inspector Protocol**: Uses Bun's WebSocket Inspector API to discover tests and correlate coverage.\n\n### Running Stryker\n\n```bash\n# Run mutation testing\nbunx stryker run\n\n# Incremental mode (only changed files)\nbunx stryker run --incremental\n\n# Specific files\nbunx stryker run --mutate \"src\u002Futils\u002F**\u002F*.ts\"\n\n# Open HTML report\nopen reports\u002Fmutation\u002Fhtml\u002Findex.html\n```\n\n### Example: Weak Test\n\n```typescript\n\u002F\u002F Source code\nfunction calculateDiscount(price: number, percentage: number): number {\n  return price - (price * percentage \u002F 100)\n}\n\n\u002F\u002F ❌ WEAK: Test passes even if we mutate calculation\ntest('applies discount', () => {\n  expect(calculateDiscount(100, 10)).toBeDefined() \u002F\u002F Too weak!\n})\n\n\u002F\u002F ✅ STRONG: Test catches mutation\ntest('applies discount correctly', () => {\n  expect(calculateDiscount(100, 10)).toBe(90)\n  expect(calculateDiscount(100, 20)).toBe(80)\n  expect(calculateDiscount(50, 10)).toBe(45)\n})\n```\n\n## Python (mutmut)\n\n### Installation\n\n```bash\nuv add --dev mutmut\n```\n\n### Running mutmut\n\n```bash\n# Run mutation testing\nuv run mutmut run\n\n# Show results\nuv run mutmut results\n\n# Show specific mutant\nuv run mutmut show 1\n\n# Generate HTML report\nuv run mutmut html\nopen html\u002Findex.html\n```\n\n## Common Mutation Types\n\n```typescript\n\u002F\u002F Arithmetic Operator\n\u002F\u002F Original: a + b → a - b, a * b, a \u002F b\n\n\u002F\u002F Relational Operator\n\u002F\u002F Original: a > b → a >= b, a \u003C b, a \u003C= b\n\n\u002F\u002F Logical Operator\n\u002F\u002F Original: a && b → a || b\n\n\u002F\u002F Boolean Literal\n\u002F\u002F Original: true → false\n```\n\n## Mutation Score Targets\n\n| Score | Quality | Action |\n|-------|---------|--------|\n| 90%+ | Excellent | Maintain quality |\n| 80-89% | Good | Small improvements |\n| 70-79% | Acceptable | Focus on weak areas |\n| \u003C 60% | Poor | Major improvements needed |\n\n## Improving Weak Tests\n\n### Pattern: Insufficient Assertions\n\n```typescript\n\u002F\u002F Before: Mutation survives\ntest('calculates sum', () => {\n  expect(sum([1, 2, 3])).toBeGreaterThan(0) \u002F\u002F Weak!\n})\n\n\u002F\u002F After: Mutation killed\ntest('calculates sum correctly', () => {\n  expect(sum([1, 2, 3])).toBe(6)\n  expect(sum([0, 0, 0])).toBe(0)\n  expect(sum([])).toBe(0)\n})\n```\n\n### Pattern: Boundary Conditions\n\n```typescript\n\u002F\u002F After: Tests boundaries\ntest('validates age boundaries', () => {\n  expect(isValidAge(18)).toBe(true)   \u002F\u002F Min valid\n  expect(isValidAge(17)).toBe(false)  \u002F\u002F Just below\n  expect(isValidAge(100)).toBe(true)  \u002F\u002F Max valid\n  expect(isValidAge(101)).toBe(false) \u002F\u002F Just above\n})\n```\n\n## Best Practices\n\n- Start with core business logic modules\n- Ensure 80%+ coverage before mutation testing\n- Run incrementally (only changed files)\n- Focus on important files first\n- Don't expect 100% mutation score (equivalent mutants exist)\n\n## Workflow\n\n```bash\n# 1. Ensure good coverage first\nbun test --coverage\n# Target: 80%+ coverage\n\n# 2. Run mutation testing\nbunx stryker run\n\n# 3. Check report\nopen reports\u002Fmutation\u002Fhtml\u002Findex.html\n\n# 4. Fix survived mutants\n# 5. Re-run incrementally\nbunx stryker run --incremental\n# or: npx stryker run --incremental\n```\n\n## See Also\n\n- `vitest-testing` - Unit testing framework\n- `test-quality-analysis` - Detecting test smells\n",{"name":5,"license":15,"description":7,"allowed-tools":44},"Bash, Read, Edit, Write, Grep, Glob, TodoWrite","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fsecondsky\u002Fclaude-skills\u002Fmutation-testing",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill mutation-testing",{"tool":60,"command":61},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill mutation-testing",{"tool":63,"command":64},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill mutation-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Fmutation-testing\u002FSKILL.md",true,[],[69,78,87,96,102,108],{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[75,76,77],"model","model hierarchy","model hierarchy skill",{"skillNo":79,"name":80,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[84,85,86],"MCP","zoom","zoom mcp",{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[93,94,95,85],"sdk","zoom apps sdk","apps",{"skillNo":97,"name":98,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[98],{"skillNo":103,"name":104,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[104],{"skillNo":109,"name":110,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[110]]