[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ESZXCTDHGXQPPBTBYHR4S4":3,"skill-same:01M6ESZXCTDHGXQPPBTBYHR4S4":76},{"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":26,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6ESZXCTDHGXQPPBTBYHR4S4","tdd-workflow",null,"Test-Driven Development methodology for Node.js\u002FTypeScript projects.","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\u002Faiskillstore\u002Fmarketplace\u002Fdoubleslashse\u002Ftdd-workflow\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37],"tdd","workflow","tdd workflow","typescript","test","development","methodology","js","projects","node","driven","2026-11-10 10:12:30",false,"---\nname: tdd-workflow\ndescription: Test-Driven Development methodology for Node.js\u002FTypeScript projects.\n---\n\n# TDD Workflow Skill\n\n## Overview\nTest-Driven Development methodology for Node.js\u002FTypeScript projects.\n\n## The RED-GREEN-REFACTOR Cycle\n\n### RED Phase: Design Failing Tests\n\nWrite tests BEFORE implementation:\n\n1. **Identify Behavior**: What should the code do?\n2. **Design Test Cases**: Cover all scenarios\n3. **Write Tests**: Use AAA pattern\n4. **Run Tests**: Confirm they FAIL\n5. **Verify Failure**: Tests fail for the RIGHT reason\n\n### GREEN Phase: Minimal Implementation\n\nMake tests pass with minimal code:\n\n1. **Focus**: One failing test at a time\n2. **Implement**: Just enough to pass\n3. **Verify**: Run tests, confirm GREEN\n4. **Iterate**: Next failing test\n5. **Complete**: All tests passing\n\n### REFACTOR Phase: Improve Design\n\nImprove code while keeping tests green:\n\n1. **Review**: Identify code smells\n2. **Plan**: Choose refactoring\n3. **Apply**: Make the change\n4. **Verify**: Tests still GREEN\n5. **Repeat**: Until quality gates met\n\n## AAA Pattern\n\n```typescript\ndescribe('Calculator', () => {\n  it('should add two numbers correctly', () => {\n    \u002F\u002F Arrange - Set up test conditions\n    const calculator = createCalculator();\n\n    \u002F\u002F Act - Execute the behavior\n    const result = calculator.add(2, 3);\n\n    \u002F\u002F Assert - Verify the outcome\n    expect(result).toBe(5);\n  });\n});\n```\n\n## Test Naming Convention\n\nFormat: `should {expectedBehavior} when {scenario}`\n\nExamples:\n```typescript\nit('should return empty array when input is empty', ...);\nit('should throw ValidationError when email is invalid', ...);\nit('should emit event when state changes', ...);\n```\n\n## Test Categories\n\n### Unit Tests\n- Test pure functions and logic\n- No I\u002FO, no side effects\n- Fast execution\n- High isolation\n\n```typescript\ndescribe('validateEmail', () => {\n  it('should return true for valid email', () => {\n    expect(validateEmail('user@example.com')).toBe(true);\n  });\n});\n```\n\n### Integration Tests\n- Test module boundaries\n- Include I\u002FO operations\n- Test with real (or fake) dependencies\n\n```typescript\ndescribe('UserService', () => {\n  it('should persist user to database', async () => {\n    const db = createTestDatabase();\n    const service = createUserService({ db });\n\n    await service.createUser({ email: 'test@example.com' });\n\n    const user = await db.users.findFirst();\n    expect(user.email).toBe('test@example.com');\n  });\n});\n```\n\n### Contract Tests\n- Verify API contracts\n- Type safety at boundaries\n- Response shape validation\n\n```typescript\ndescribe('API Contract', () => {\n  it('should return user with expected shape', async () => {\n    const response = await api.getUser('1');\n\n    expect(response).toMatchObject({\n      id: expect.any(String),\n      email: expect.any(String),\n      createdAt: expect.any(Date),\n    });\n  });\n});\n```\n\n## Test Doubles\n\n### Stub\nReturns canned data:\n```typescript\nconst stubApi = {\n  getUser: () => Promise.resolve({ id: '1', name: 'Test' }),\n};\n```\n\n### Mock\nVerifies interactions:\n```typescript\nconst mockLogger = {\n  info: jest.fn(),\n  error: jest.fn(),\n};\n\u002F\u002F Later: expect(mockLogger.info).toHaveBeenCalledWith('message');\n```\n\n### Fake\nWorking implementation:\n```typescript\nconst createFakeDatabase = () => {\n  const store = new Map();\n  return {\n    save: (entity) => store.set(entity.id, entity),\n    findById: (id) => store.get(id),\n  };\n};\n```\n\n### Spy\nRecords calls:\n```typescript\nconst spy = jest.spyOn(service, 'notify');\nawait service.process();\nexpect(spy).toHaveBeenCalledTimes(1);\n```\n\n## Test Organization\n\n```\nsrc\u002F\n  services\u002F\n    user-service.ts\n    user-service.test.ts      # Co-located unit tests\n  api\u002F\n    handlers.ts\n    handlers.test.ts\ntests\u002F\n  integration\u002F                 # Integration tests\n    user-flow.test.ts\n  fixtures\u002F                    # Shared test data\n    users.ts\n  helpers\u002F                     # Test utilities\n    test-context.ts\n```\n\n## Anti-Patterns\n\n### Testing Implementation Details\n```typescript\n\u002F\u002F Bad - testing internal state\nexpect(service._cache.size).toBe(1);\n\n\u002F\u002F Good - testing behavior\nexpect(service.getCachedValue('key')).toBe('value');\n```\n\n### Overly Specific Assertions\n```typescript\n\u002F\u002F Bad - brittle\nexpect(result).toEqual({\n  id: '123',\n  name: 'Test',\n  createdAt: new Date('2024-01-01'),\n  updatedAt: new Date('2024-01-01'),\n});\n\n\u002F\u002F Good - flexible\nexpect(result).toMatchObject({\n  id: expect.any(String),\n  name: 'Test',\n});\n```\n\n### Test Interdependence\n```typescript\n\u002F\u002F Bad - tests depend on order\nlet user;\nit('should create user', () => { user = createUser(); });\nit('should update user', () => { updateUser(user); }); \u002F\u002F Depends on previous\n\n\u002F\u002F Good - independent tests\nit('should update user', () => {\n  const user = createUser();\n  updateUser(user);\n});\n```\n","# TDD Workflow Skill\n\n## Overview\nTest-Driven Development methodology for Node.js\u002FTypeScript projects.\n\n## The RED-GREEN-REFACTOR Cycle\n\n### RED Phase: Design Failing Tests\n\nWrite tests BEFORE implementation:\n\n1. **Identify Behavior**: What should the code do?\n2. **Design Test Cases**: Cover all scenarios\n3. **Write Tests**: Use AAA pattern\n4. **Run Tests**: Confirm they FAIL\n5. **Verify Failure**: Tests fail for the RIGHT reason\n\n### GREEN Phase: Minimal Implementation\n\nMake tests pass with minimal code:\n\n1. **Focus**: One failing test at a time\n2. **Implement**: Just enough to pass\n3. **Verify**: Run tests, confirm GREEN\n4. **Iterate**: Next failing test\n5. **Complete**: All tests passing\n\n### REFACTOR Phase: Improve Design\n\nImprove code while keeping tests green:\n\n1. **Review**: Identify code smells\n2. **Plan**: Choose refactoring\n3. **Apply**: Make the change\n4. **Verify**: Tests still GREEN\n5. **Repeat**: Until quality gates met\n\n## AAA Pattern\n\n```typescript\ndescribe('Calculator', () => {\n  it('should add two numbers correctly', () => {\n    \u002F\u002F Arrange - Set up test conditions\n    const calculator = createCalculator();\n\n    \u002F\u002F Act - Execute the behavior\n    const result = calculator.add(2, 3);\n\n    \u002F\u002F Assert - Verify the outcome\n    expect(result).toBe(5);\n  });\n});\n```\n\n## Test Naming Convention\n\nFormat: `should {expectedBehavior} when {scenario}`\n\nExamples:\n```typescript\nit('should return empty array when input is empty', ...);\nit('should throw ValidationError when email is invalid', ...);\nit('should emit event when state changes', ...);\n```\n\n## Test Categories\n\n### Unit Tests\n- Test pure functions and logic\n- No I\u002FO, no side effects\n- Fast execution\n- High isolation\n\n```typescript\ndescribe('validateEmail', () => {\n  it('should return true for valid email', () => {\n    expect(validateEmail('user@example.com')).toBe(true);\n  });\n});\n```\n\n### Integration Tests\n- Test module boundaries\n- Include I\u002FO operations\n- Test with real (or fake) dependencies\n\n```typescript\ndescribe('UserService', () => {\n  it('should persist user to database', async () => {\n    const db = createTestDatabase();\n    const service = createUserService({ db });\n\n    await service.createUser({ email: 'test@example.com' });\n\n    const user = await db.users.findFirst();\n    expect(user.email).toBe('test@example.com');\n  });\n});\n```\n\n### Contract Tests\n- Verify API contracts\n- Type safety at boundaries\n- Response shape validation\n\n```typescript\ndescribe('API Contract', () => {\n  it('should return user with expected shape', async () => {\n    const response = await api.getUser('1');\n\n    expect(response).toMatchObject({\n      id: expect.any(String),\n      email: expect.any(String),\n      createdAt: expect.any(Date),\n    });\n  });\n});\n```\n\n## Test Doubles\n\n### Stub\nReturns canned data:\n```typescript\nconst stubApi = {\n  getUser: () => Promise.resolve({ id: '1', name: 'Test' }),\n};\n```\n\n### Mock\nVerifies interactions:\n```typescript\nconst mockLogger = {\n  info: jest.fn(),\n  error: jest.fn(),\n};\n\u002F\u002F Later: expect(mockLogger.info).toHaveBeenCalledWith('message');\n```\n\n### Fake\nWorking implementation:\n```typescript\nconst createFakeDatabase = () => {\n  const store = new Map();\n  return {\n    save: (entity) => store.set(entity.id, entity),\n    findById: (id) => store.get(id),\n  };\n};\n```\n\n### Spy\nRecords calls:\n```typescript\nconst spy = jest.spyOn(service, 'notify');\nawait service.process();\nexpect(spy).toHaveBeenCalledTimes(1);\n```\n\n## Test Organization\n\n```\nsrc\u002F\n  services\u002F\n    user-service.ts\n    user-service.test.ts      # Co-located unit tests\n  api\u002F\n    handlers.ts\n    handlers.test.ts\ntests\u002F\n  integration\u002F                 # Integration tests\n    user-flow.test.ts\n  fixtures\u002F                    # Shared test data\n    users.ts\n  helpers\u002F                     # Test utilities\n    test-context.ts\n```\n\n## Anti-Patterns\n\n### Testing Implementation Details\n```typescript\n\u002F\u002F Bad - testing internal state\nexpect(service._cache.size).toBe(1);\n\n\u002F\u002F Good - testing behavior\nexpect(service.getCachedValue('key')).toBe('value');\n```\n\n### Overly Specific Assertions\n```typescript\n\u002F\u002F Bad - brittle\nexpect(result).toEqual({\n  id: '123',\n  name: 'Test',\n  createdAt: new Date('2024-01-01'),\n  updatedAt: new Date('2024-01-01'),\n});\n\n\u002F\u002F Good - flexible\nexpect(result).toMatchObject({\n  id: expect.any(String),\n  name: 'Test',\n});\n```\n\n### Test Interdependence\n```typescript\n\u002F\u002F Bad - tests depend on order\nlet user;\nit('should create user', () => { user = createUser(); });\nit('should update user', () => { updateUser(user); }); \u002F\u002F Depends on previous\n\n\u002F\u002F Good - independent tests\nit('should update user', () => {\n  const user = createUser();\n  updateUser(user);\n});\n```\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fdoubleslashse\u002Ftdd-workflow",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":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill tdd-workflow",{"tool":58,"command":59},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill tdd-workflow",{"tool":61,"command":62},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill tdd-workflow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdoubleslashse\u002Ftdd-workflow\u002FSKILL.md",true,[66,72],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"patterns.md","REFERENCE","参考文档",6304,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdoubleslashse\u002Ftdd-workflow\u002Fpatterns.md",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"skill-report.json",13508,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdoubleslashse\u002Ftdd-workflow\u002Fskill-report.json",[77,87,97,106,112,119],{"skillNo":78,"name":79,"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":80,"categories":81,"keywords":83,"publishedAt":38},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[82],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[84,85,86],"model","model hierarchy","model hierarchy skill",{"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":93,"publishedAt":38},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[92],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[94,95,96],"MCP","zoom","zoom mcp",{"skillNo":98,"name":99,"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":100,"categories":101,"keywords":102,"publishedAt":38},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[103,104,105,95],"sdk","zoom apps sdk","apps",{"skillNo":107,"name":108,"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":109,"categories":110,"keywords":111,"publishedAt":38},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[108],{"skillNo":113,"name":114,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":118,"publishedAt":38},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[117],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[114],{"skillNo":120,"name":121,"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":122,"categories":123,"keywords":124,"publishedAt":38},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[121]]