[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EJGSGSFDSW6H5FTVTK4NYT":3,"skill-same:01M6EJGSGSFDSW6H5FTVTK4NYT":93},{"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":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6EJGSGSFDSW6H5FTVTK4NYT","backend-test-writer",null,"Use when generating tests for backend code (Express routes, MongoDB models, Node services) - analyzes file type, detects test framework from package.json, generates comprehensive tests with setup\u002Fteardown and edge case coverage","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\u002F9tykeshav\u002Fbackend-test-writer\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"backend test writer","writer","test writer","backend","test","coverage","case","type","tests","express","teardown","use","node","mongodb","services","edge","file","package","framework","code","2026-11-10 10:12:30",false,"---\nname: backend-test-writer\ndescription: Use when generating tests for backend code (Express routes, MongoDB models, Node services) - analyzes file type, detects test framework from package.json, generates comprehensive tests with setup\u002Fteardown and edge case coverage\n---\n\n# Backend Test Writer\n\nGenerate comprehensive backend tests for MERN stack code. Analyzes file type, detects project conventions, produces tests that actually run.\n\n**Philosophy:** Smart defaults, zero config. Detect everything from project.\n\n\u003Cworkflow>\n\n## Workflow\n\nCopy and track progress:\n\n- [ ] Phase 0: Infrastructure check\n- [ ] Phase 1: Analyze target files\n- [ ] Phase 2: Generate tests\n- [ ] Phase 3: Report summary\n\n### Phase 0: Infrastructure Check\n\nBefore generating tests, verify setup:\n\n1. Check `package.json` for test framework (Jest\u002FVitest\u002FMocha)\n2. If none → prompt: \"Set up Jest + Supertest?\"\n3. Check for `mongodb-memory-server` (needed for integration tests)\n4. Detect test file convention (colocated vs `__tests__\u002F` vs `tests\u002F`)\n\n**Stop if:** No test framework and user declines setup.\n\n### Phase 1: Analyze Target Files\n\n| Pattern | Type | Test Approach |\n|---------|------|---------------|\n| `routes\u002F`, `*.routes.js` | Route | Integration (Supertest + real DB) |\n| `controllers\u002F` | Controller | Integration |\n| `services\u002F` | Service | Unit (mocked deps) |\n| `models\u002F`, `*.model.js` | Model | Unit (validation tests) |\n| `middleware\u002F` | Middleware | Unit (mock req\u002Fres\u002Fnext) |\n| `utils\u002F`, `helpers\u002F` | Utility | Unit (pure functions) |\n\n**Override:** User can specify `--unit` or `--integration`.\n\n### Phase 2: Generate Tests\n\nProcess files sequentially with progress. User can stop anytime.\n\n**Each test includes:**\n- Proper imports for detected framework\n- Setup\u002Fteardown (DB connection, cleanup)\n- Comprehensive coverage:\n  - Success cases (happy path)\n  - Validation errors (400)\n  - Not found (404)\n  - Auth failures (401\u002F403) if protected\n  - Edge cases (duplicates, empty, null)\n\n**Reference:** See [test-patterns.md](reference\u002Ftest-patterns.md) for complete code examples.\n\n### Phase 3: Report\n\n```\nGenerated: X test files\nCoverage: Y test cases total\nNext: Run `npm test` to verify\n```\n\n\u003C\u002Fworkflow>\n\n\u003Cquick-reference>\n\n## Quick Reference\n\n| File Type | Imports | DB Setup |\n|-----------|---------|----------|\n| Route | `supertest`, `mongodb-memory-server` | Real (in-memory) |\n| Service | `jest` | Mocked |\n| Model | `mongoose` | Mocked |\n| Middleware | `jest` | None |\n\n## Test Structure Pattern\n\n```javascript\ndescribe('[Resource] [Method]', () => {\n  describe('success cases', () => {\n    it('should [expected behavior]', async () => {});\n  });\n  describe('validation errors', () => {\n    it('should return 400 for [invalid case]', async () => {});\n  });\n  describe('edge cases', () => {\n    it('should handle [edge case]', async () => {});\n  });\n});\n```\n\n\u003C\u002Fquick-reference>\n\n\u003Cchecklists>\n\n## Checklists\n\n### Infrastructure (Check First)\n- [ ] Test framework in `package.json`\n- [ ] Test script defined (`\"test\": \"jest\"`)\n- [ ] Supertest installed (integration tests)\n- [ ] mongodb-memory-server installed (DB tests)\n\n### Per-File Generation\n- [ ] Check for existing tests first (gap analysis if found)\n- [ ] Correct imports for file type\n- [ ] Setup\u002Fteardown included\n- [ ] Happy path tested\n- [ ] Error cases tested (400, 404, 401)\n- [ ] Edge cases tested (domain-specific: date→DST\u002Ftimezone, money→precision, etc.)\n- [ ] No secrets in assertions\n- [ ] Async\u002Fawait handled properly\n- [ ] Priority assigned to each test (P0=critical, P1=important, P2=nice-to-have)\n- [ ] Test helper factories suggested for complex inputs\n\n\u003C\u002Fchecklists>\n\n\u003Ccommon-mistakes>\n\n## Common Mistakes\n\n| Mistake | Fix |\n|---------|-----|\n| Starting server in tests | Import app, let Supertest handle it |\n| No DB cleanup | Add `afterEach` with `deleteMany({})` |\n| Testing implementation | Test behavior through HTTP interface |\n| Missing async\u002Fawait | Await async operations |\n| Mocking in integration tests | Use real DB for integration |\n\n\u003C\u002Fcommon-mistakes>\n\n\u003Cguidelines>\n\n## Guidelines\n\n- Don't generate tests for unread code\n- Don't skip infrastructure check\n- Don't generate only happy paths\n- Don't forget cleanup between tests\n\n\u003C\u002Fguidelines>\n\n\u003Creferences>\n\n## Reference Files\n\nLoad when implementing specific patterns:\n\n| When | Reference |\n|------|-----------|\n| Writing any test | [test-patterns.md](reference\u002Ftest-patterns.md) |\n| Setting up test infrastructure | [test-setup.md](reference\u002Ftest-setup.md) |\n\n\u003C\u002Freferences>\n","# Backend Test Writer\n\nGenerate comprehensive backend tests for MERN stack code. Analyzes file type, detects project conventions, produces tests that actually run.\n\n**Philosophy:** Smart defaults, zero config. Detect everything from project.\n\n\u003Cworkflow>\n\n## Workflow\n\nCopy and track progress:\n\n- [ ] Phase 0: Infrastructure check\n- [ ] Phase 1: Analyze target files\n- [ ] Phase 2: Generate tests\n- [ ] Phase 3: Report summary\n\n### Phase 0: Infrastructure Check\n\nBefore generating tests, verify setup:\n\n1. Check `package.json` for test framework (Jest\u002FVitest\u002FMocha)\n2. If none → prompt: \"Set up Jest + Supertest?\"\n3. Check for `mongodb-memory-server` (needed for integration tests)\n4. Detect test file convention (colocated vs `__tests__\u002F` vs `tests\u002F`)\n\n**Stop if:** No test framework and user declines setup.\n\n### Phase 1: Analyze Target Files\n\n| Pattern | Type | Test Approach |\n|---------|------|---------------|\n| `routes\u002F`, `*.routes.js` | Route | Integration (Supertest + real DB) |\n| `controllers\u002F` | Controller | Integration |\n| `services\u002F` | Service | Unit (mocked deps) |\n| `models\u002F`, `*.model.js` | Model | Unit (validation tests) |\n| `middleware\u002F` | Middleware | Unit (mock req\u002Fres\u002Fnext) |\n| `utils\u002F`, `helpers\u002F` | Utility | Unit (pure functions) |\n\n**Override:** User can specify `--unit` or `--integration`.\n\n### Phase 2: Generate Tests\n\nProcess files sequentially with progress. User can stop anytime.\n\n**Each test includes:**\n- Proper imports for detected framework\n- Setup\u002Fteardown (DB connection, cleanup)\n- Comprehensive coverage:\n  - Success cases (happy path)\n  - Validation errors (400)\n  - Not found (404)\n  - Auth failures (401\u002F403) if protected\n  - Edge cases (duplicates, empty, null)\n\n**Reference:** See [test-patterns.md](reference\u002Ftest-patterns.md) for complete code examples.\n\n### Phase 3: Report\n\n```\nGenerated: X test files\nCoverage: Y test cases total\nNext: Run `npm test` to verify\n```\n\n\u003C\u002Fworkflow>\n\n\u003Cquick-reference>\n\n## Quick Reference\n\n| File Type | Imports | DB Setup |\n|-----------|---------|----------|\n| Route | `supertest`, `mongodb-memory-server` | Real (in-memory) |\n| Service | `jest` | Mocked |\n| Model | `mongoose` | Mocked |\n| Middleware | `jest` | None |\n\n## Test Structure Pattern\n\n```javascript\ndescribe('[Resource] [Method]', () => {\n  describe('success cases', () => {\n    it('should [expected behavior]', async () => {});\n  });\n  describe('validation errors', () => {\n    it('should return 400 for [invalid case]', async () => {});\n  });\n  describe('edge cases', () => {\n    it('should handle [edge case]', async () => {});\n  });\n});\n```\n\n\u003C\u002Fquick-reference>\n\n\u003Cchecklists>\n\n## Checklists\n\n### Infrastructure (Check First)\n- [ ] Test framework in `package.json`\n- [ ] Test script defined (`\"test\": \"jest\"`)\n- [ ] Supertest installed (integration tests)\n- [ ] mongodb-memory-server installed (DB tests)\n\n### Per-File Generation\n- [ ] Check for existing tests first (gap analysis if found)\n- [ ] Correct imports for file type\n- [ ] Setup\u002Fteardown included\n- [ ] Happy path tested\n- [ ] Error cases tested (400, 404, 401)\n- [ ] Edge cases tested (domain-specific: date→DST\u002Ftimezone, money→precision, etc.)\n- [ ] No secrets in assertions\n- [ ] Async\u002Fawait handled properly\n- [ ] Priority assigned to each test (P0=critical, P1=important, P2=nice-to-have)\n- [ ] Test helper factories suggested for complex inputs\n\n\u003C\u002Fchecklists>\n\n\u003Ccommon-mistakes>\n\n## Common Mistakes\n\n| Mistake | Fix |\n|---------|-----|\n| Starting server in tests | Import app, let Supertest handle it |\n| No DB cleanup | Add `afterEach` with `deleteMany({})` |\n| Testing implementation | Test behavior through HTTP interface |\n| Missing async\u002Fawait | Await async operations |\n| Mocking in integration tests | Use real DB for integration |\n\n\u003C\u002Fcommon-mistakes>\n\n\u003Cguidelines>\n\n## Guidelines\n\n- Don't generate tests for unread code\n- Don't skip infrastructure check\n- Don't generate only happy paths\n- Don't forget cleanup between tests\n\n\u003C\u002Fguidelines>\n\n\u003Creferences>\n\n## Reference Files\n\nLoad when implementing specific patterns:\n\n| When | Reference |\n|------|-----------|\n| Writing any test | [test-patterns.md](reference\u002Ftest-patterns.md) |\n| Setting up test infrastructure | [test-setup.md](reference\u002Ftest-setup.md) |\n\n\u003C\u002Freferences>\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002F9tykeshav\u002Fbackend-test-writer",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":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill backend-test-writer",{"tool":59,"command":60},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill backend-test-writer",{"tool":62,"command":63},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill backend-test-writer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002F9tykeshav\u002Fbackend-test-writer\u002FSKILL.md",true,[67,73,77,81,85,89],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"reference\u002Ftest-patterns.md","REFERENCE","参考文档",8704,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002F9tykeshav\u002Fbackend-test-writer\u002Freference\u002Ftest-patterns.md",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"reference\u002Ftest-setup.md",2427,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002F9tykeshav\u002Fbackend-test-writer\u002Freference\u002Ftest-setup.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fcontext-file-template.md",3294,"https:\u002F\u002Fgithub.com\u002FTorchiaHub\u002FSkills\u002Fblob\u002Fmaster\u002F01-Inbox\u002Fdownloads\u002Fgithub-awesome-copilot\u002F20260429T110232Z\u002Fsource\u002Fskills\u002Freact18-legacy-context\u002Freferences\u002Fcontext-file-template.md",{"path":82,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fmulti-context.md",5770,"https:\u002F\u002Fgithub.com\u002FTorchiaHub\u002FSkills\u002Fblob\u002Fmaster\u002F01-Inbox\u002Fdownloads\u002Fgithub-awesome-copilot\u002F20260429T110232Z\u002Fsource\u002Fskills\u002Freact18-legacy-context\u002Freferences\u002Fmulti-context.md",{"path":86,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fsingle-context.md",5205,"https:\u002F\u002Fgithub.com\u002FTorchiaHub\u002FSkills\u002Fblob\u002Fmaster\u002F01-Inbox\u002Fdownloads\u002Fgithub-awesome-copilot\u002F20260429T110232Z\u002Fsource\u002Fskills\u002Freact18-legacy-context\u002Freferences\u002Fsingle-context.md",{"path":90,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":91,"sourceHtmlUrl":92},"skill-report.json",9512,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002F9tykeshav\u002Fbackend-test-writer\u002Fskill-report.json",[94,103,112,121,127,133],{"skillNo":95,"name":96,"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":97,"categories":98,"keywords":99,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[100,101,102],"model","model hierarchy","model hierarchy skill",{"skillNo":104,"name":105,"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":106,"categories":107,"keywords":108,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[109,110,111],"MCP","zoom","zoom mcp",{"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":117,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[118,119,120,110],"sdk","zoom apps sdk","apps",{"skillNo":122,"name":123,"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":124,"categories":125,"keywords":126,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[123],{"skillNo":128,"name":129,"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":130,"categories":131,"keywords":132,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[129],{"skillNo":134,"name":135,"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":136,"categories":137,"keywords":138,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[135]]