[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FH05KMP2JEDGN97V8V0PSM":3,"skill-same:01M6FH05KMP2JEDGN97V8V0PSM":65},{"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":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6FH05KMP2JEDGN97V8V0PSM","test-quality-analysis",null,"Detect test smells, overmocking, flaky tests, and coverage issues. Analyze test effectiveness, maintainability, and reliability. Use when reviewing tests or improving 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\u002Ftest-quality-analysis\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"analysis","quality","test quality analysis","test","write","detect","tests","maintainability","reliability","use","coverage","edit","read","grep","analyze","Bash","issues","2026-11-10 10:12:30",false,"---\nname: test-quality-analysis\ndescription: Detect test smells, overmocking, flaky tests, and coverage issues. Analyze test effectiveness, maintainability, and reliability. Use when reviewing tests or improving test quality.\nallowed-tools: Bash, Read, Edit, Write, Grep, Glob, TodoWrite\nlicense: MIT\n---\n\n# Test Quality Analysis\n\nExpert knowledge for analyzing and improving test quality - detecting test smells, overmocking, insufficient coverage, and testing anti-patterns.\n\n## Core Dimensions\n\n- **Correctness**: Tests verify the right behavior\n- **Reliability**: Tests are deterministic, not flaky\n- **Maintainability**: Tests are easy to understand\n- **Performance**: Tests run quickly\n- **Coverage**: Tests cover critical code paths\n- **Isolation**: Tests don't depend on external state\n\n## Test Smells\n\n### Overmocking\n\n**Problem**: Mocking too many dependencies makes tests fragile.\n\n```typescript\n\u002F\u002F ❌ BAD: Overmocked\ntest('calculate total', () => {\n  const mockAdd = vi.fn(() => 10)\n  const mockMultiply = vi.fn(() => 20)\n  \u002F\u002F Testing implementation, not behavior\n})\n\n\u002F\u002F ✅ GOOD: Mock only external dependencies\ntest('calculate order total', () => {\n  const mockPricingAPI = vi.fn(() => ({ tax: 0.1 }))\n  const total = calculateTotal(order, mockPricingAPI)\n  expect(total).toBe(38)\n})\n```\n\n**Detection**: More than 3-4 mocks, mocking pure functions, complex mock setup.\n\n**Fix**: Mock only I\u002FO boundaries (APIs, databases, filesystem).\n\n### Fragile Tests\n\n**Problem**: Tests break with unrelated code changes.\n\n```typescript\n\u002F\u002F ❌ BAD: Tests implementation details\nawait page.locator('.form-container > div:nth-child(2) > button').click()\n\n\u002F\u002F ✅ GOOD: Semantic selector\nawait page.getByRole('button', { name: 'Submit' }).click()\n```\n\n### Flaky Tests\n\n**Problem**: Tests pass or fail non-deterministically.\n\n```typescript\n\u002F\u002F ❌ BAD: Race condition\ntest('loads data', async () => {\n  fetchData()\n  await new Promise(resolve => setTimeout(resolve, 1000))\n  expect(data).toBeDefined()\n})\n\n\u002F\u002F ✅ GOOD: Proper async handling\ntest('loads data', async () => {\n  const data = await fetchData()\n  expect(data).toBeDefined()\n})\n```\n\n### Poor Assertions\n\n```typescript\n\u002F\u002F ❌ BAD: Weak assertion\ntest('returns users', async () => {\n  const users = await getUsers()\n  expect(users).toBeDefined() \u002F\u002F Too vague!\n})\n\n\u002F\u002F ✅ GOOD: Strong, specific assertions\ntest('creates user with correct attributes', async () => {\n  const user = await createUser({ name: 'John' })\n  expect(user).toMatchObject({\n    id: expect.any(Number),\n    name: 'John',\n  })\n})\n```\n\n## Analysis Tools\n\n```bash\n# Vitest coverage (prefer bun)\nbun test --coverage\nopen coverage\u002Findex.html\n\n# Check thresholds\nbun test --coverage --coverage.thresholds.lines=80\n\n# pytest-cov (Python)\nuv run pytest --cov --cov-report=html\nopen htmlcov\u002Findex.html\n```\n\n## Best Practices Checklist\n\n### Unit Test Quality (FIRST)\n- [ ] **Fast**: Tests run in milliseconds\n- [ ] **Isolated**: No dependencies between tests\n- [ ] **Repeatable**: Same results every time\n- [ ] **Self-validating**: Clear pass\u002Ffail\n- [ ] **Timely**: Written alongside code\n\n### Mock Guidelines\n- [ ] Mock only external dependencies\n- [ ] Don't mock business logic or pure functions\n- [ ] Use real implementations when possible\n- [ ] Limit to 3-4 mocks per test maximum\n\n### Coverage Goals\n- [ ] 80%+ line coverage for business logic\n- [ ] 100% for critical paths (auth, payment)\n- [ ] All error paths tested\n- [ ] Boundary conditions tested\n\n### Test Structure (AAA Pattern)\n\n```typescript\ntest('user registration', async () => {\n  \u002F\u002F Arrange\n  const userData = { email: 'user@example.com' }\n\n  \u002F\u002F Act\n  const user = await registerUser(userData)\n\n  \u002F\u002F Assert\n  expect(user.email).toBe('user@example.com')\n})\n```\n\n## Code Review Checklist\n\n- [ ] Tests verify behavior, not implementation\n- [ ] Assertions are specific and meaningful\n- [ ] No flaky tests (timing, ordering issues)\n- [ ] Proper async\u002Fawait usage\n- [ ] Test names clearly describe behavior\n- [ ] Minimal code duplication\n- [ ] Critical paths have tests\n- [ ] Both happy path and error cases covered\n\n## Common Anti-Patterns\n\n### Testing Implementation Details\n\n```typescript\n\u002F\u002F ❌ BAD\nconst spy = vi.spyOn(Math, 'sqrt')\ncalculateDistance()\nexpect(spy).toHaveBeenCalled() \u002F\u002F Testing how, not what\n\n\u002F\u002F ✅ GOOD\nconst distance = calculateDistance({ x: 0, y: 0 }, { x: 3, y: 4 })\nexpect(distance).toBe(5) \u002F\u002F Testing output\n```\n\n### Mocking Too Much\n\n```typescript\n\u002F\u002F ❌ BAD\nconst mockAdd = vi.fn((a, b) => a + b)\n\n\u002F\u002F ✅ GOOD: Use real implementations\nimport { add } from '.\u002Futils'\n\u002F\u002F Only mock external services\nconst mockPaymentGateway = vi.fn()\n```\n\n## See Also\n\n- `vitest-testing` - TypeScript\u002FJavaScript testing\n- `playwright-testing` - E2E testing\n- `mutation-testing` - Validate test effectiveness\n","# Test Quality Analysis\n\nExpert knowledge for analyzing and improving test quality - detecting test smells, overmocking, insufficient coverage, and testing anti-patterns.\n\n## Core Dimensions\n\n- **Correctness**: Tests verify the right behavior\n- **Reliability**: Tests are deterministic, not flaky\n- **Maintainability**: Tests are easy to understand\n- **Performance**: Tests run quickly\n- **Coverage**: Tests cover critical code paths\n- **Isolation**: Tests don't depend on external state\n\n## Test Smells\n\n### Overmocking\n\n**Problem**: Mocking too many dependencies makes tests fragile.\n\n```typescript\n\u002F\u002F ❌ BAD: Overmocked\ntest('calculate total', () => {\n  const mockAdd = vi.fn(() => 10)\n  const mockMultiply = vi.fn(() => 20)\n  \u002F\u002F Testing implementation, not behavior\n})\n\n\u002F\u002F ✅ GOOD: Mock only external dependencies\ntest('calculate order total', () => {\n  const mockPricingAPI = vi.fn(() => ({ tax: 0.1 }))\n  const total = calculateTotal(order, mockPricingAPI)\n  expect(total).toBe(38)\n})\n```\n\n**Detection**: More than 3-4 mocks, mocking pure functions, complex mock setup.\n\n**Fix**: Mock only I\u002FO boundaries (APIs, databases, filesystem).\n\n### Fragile Tests\n\n**Problem**: Tests break with unrelated code changes.\n\n```typescript\n\u002F\u002F ❌ BAD: Tests implementation details\nawait page.locator('.form-container > div:nth-child(2) > button').click()\n\n\u002F\u002F ✅ GOOD: Semantic selector\nawait page.getByRole('button', { name: 'Submit' }).click()\n```\n\n### Flaky Tests\n\n**Problem**: Tests pass or fail non-deterministically.\n\n```typescript\n\u002F\u002F ❌ BAD: Race condition\ntest('loads data', async () => {\n  fetchData()\n  await new Promise(resolve => setTimeout(resolve, 1000))\n  expect(data).toBeDefined()\n})\n\n\u002F\u002F ✅ GOOD: Proper async handling\ntest('loads data', async () => {\n  const data = await fetchData()\n  expect(data).toBeDefined()\n})\n```\n\n### Poor Assertions\n\n```typescript\n\u002F\u002F ❌ BAD: Weak assertion\ntest('returns users', async () => {\n  const users = await getUsers()\n  expect(users).toBeDefined() \u002F\u002F Too vague!\n})\n\n\u002F\u002F ✅ GOOD: Strong, specific assertions\ntest('creates user with correct attributes', async () => {\n  const user = await createUser({ name: 'John' })\n  expect(user).toMatchObject({\n    id: expect.any(Number),\n    name: 'John',\n  })\n})\n```\n\n## Analysis Tools\n\n```bash\n# Vitest coverage (prefer bun)\nbun test --coverage\nopen coverage\u002Findex.html\n\n# Check thresholds\nbun test --coverage --coverage.thresholds.lines=80\n\n# pytest-cov (Python)\nuv run pytest --cov --cov-report=html\nopen htmlcov\u002Findex.html\n```\n\n## Best Practices Checklist\n\n### Unit Test Quality (FIRST)\n- [ ] **Fast**: Tests run in milliseconds\n- [ ] **Isolated**: No dependencies between tests\n- [ ] **Repeatable**: Same results every time\n- [ ] **Self-validating**: Clear pass\u002Ffail\n- [ ] **Timely**: Written alongside code\n\n### Mock Guidelines\n- [ ] Mock only external dependencies\n- [ ] Don't mock business logic or pure functions\n- [ ] Use real implementations when possible\n- [ ] Limit to 3-4 mocks per test maximum\n\n### Coverage Goals\n- [ ] 80%+ line coverage for business logic\n- [ ] 100% for critical paths (auth, payment)\n- [ ] All error paths tested\n- [ ] Boundary conditions tested\n\n### Test Structure (AAA Pattern)\n\n```typescript\ntest('user registration', async () => {\n  \u002F\u002F Arrange\n  const userData = { email: 'user@example.com' }\n\n  \u002F\u002F Act\n  const user = await registerUser(userData)\n\n  \u002F\u002F Assert\n  expect(user.email).toBe('user@example.com')\n})\n```\n\n## Code Review Checklist\n\n- [ ] Tests verify behavior, not implementation\n- [ ] Assertions are specific and meaningful\n- [ ] No flaky tests (timing, ordering issues)\n- [ ] Proper async\u002Fawait usage\n- [ ] Test names clearly describe behavior\n- [ ] Minimal code duplication\n- [ ] Critical paths have tests\n- [ ] Both happy path and error cases covered\n\n## Common Anti-Patterns\n\n### Testing Implementation Details\n\n```typescript\n\u002F\u002F ❌ BAD\nconst spy = vi.spyOn(Math, 'sqrt')\ncalculateDistance()\nexpect(spy).toHaveBeenCalled() \u002F\u002F Testing how, not what\n\n\u002F\u002F ✅ GOOD\nconst distance = calculateDistance({ x: 0, y: 0 }, { x: 3, y: 4 })\nexpect(distance).toBe(5) \u002F\u002F Testing output\n```\n\n### Mocking Too Much\n\n```typescript\n\u002F\u002F ❌ BAD\nconst mockAdd = vi.fn((a, b) => a + b)\n\n\u002F\u002F ✅ GOOD: Use real implementations\nimport { add } from '.\u002Futils'\n\u002F\u002F Only mock external services\nconst mockPaymentGateway = vi.fn()\n```\n\n## See Also\n\n- `vitest-testing` - TypeScript\u002FJavaScript testing\n- `playwright-testing` - E2E testing\n- `mutation-testing` - Validate test effectiveness\n",{"name":5,"license":15,"description":7,"allowed-tools":41},"Bash, Read, Edit, Write, Grep, Glob, TodoWrite","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fsecondsky\u002Fclaude-skills\u002Ftest-quality-analysis",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":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill test-quality-analysis",{"tool":57,"command":58},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill test-quality-analysis",{"tool":60,"command":61},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill test-quality-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fsecondsky\u002Fclaude-skills\u002Ftest-quality-analysis\u002FSKILL.md",true,[],[66,75,84,93,99,105],{"skillNo":67,"name":68,"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":69,"categories":70,"keywords":71,"publishedAt":36},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[72,73,74],"model","model hierarchy","model hierarchy skill",{"skillNo":76,"name":77,"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":78,"categories":79,"keywords":80,"publishedAt":36},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[81,82,83],"MCP","zoom","zoom mcp",{"skillNo":85,"name":86,"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":87,"categories":88,"keywords":89,"publishedAt":36},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[90,91,92,82],"sdk","zoom apps sdk","apps",{"skillNo":94,"name":95,"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":96,"categories":97,"keywords":98,"publishedAt":36},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[95],{"skillNo":100,"name":101,"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":102,"categories":103,"keywords":104,"publishedAt":36},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[101],{"skillNo":106,"name":107,"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":108,"categories":109,"keywords":110,"publishedAt":36},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[107]]