[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M799GMKEW7VZW77AC2CMK7QN":3,"skill-same:01M799GMKEW7VZW77AC2CMK7QN":55},{"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":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":38,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M799GMKEW7VZW77AC2CMK7QN","generating-test-doubles",null,"Generate mocks, stubs, spies, and fakes for dependency isolation.\nUse when creating mocks, stubs, or test isolation fixtures.\nTrigger with phrases like \"generate mocks\", \"create test doubles\", or \"setup stubs\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftesting--test-doubles-generator--generating-test-doubles\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: generating-test-doubles\ndescription: |\n  Generate mocks, stubs, spies, and fakes for dependency isolation.\n  Use when creating mocks, stubs, or test isolation fixtures.\n  Trigger with phrases like \"generate mocks\", \"create test doubles\", or \"setup stubs\".\n\nallowed-tools: Read, Write, Edit, Grep, Glob, Bash(test:doubles-*)\nversion: 1.0.0\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\nlicense: MIT\ncompatible-with: claude-code, codex, openclaw\ntags: [testing, test-doubles]\n---\n# Test Doubles Generator\n\n## Overview\n\nGenerate mocks, stubs, spies, and fakes to isolate units under test from external dependencies. Supports Jest mocks, Sinon.js stubs, Python unittest.mock, Go interfaces, and testdouble.js patterns.\n\n## Prerequisites\n\n- Testing framework installed (Jest, Vitest, Mocha, pytest, JUnit 5, or Go testing)\n- Mocking library available (Sinon.js, testdouble.js, unittest.mock, Mockito, or gomock)\n- TypeScript `strict` mode enabled for type-safe mocks (if applicable)\n- Source code with clear interface or class boundaries for dependency injection\n\n## Instructions\n\n1. Scan the codebase with Glob and Grep to identify modules with external dependencies (database clients, HTTP clients, file system access, third-party SDKs).\n2. Read each module under test and catalog its dependency interfaces -- list every method signature, return type, and side effect.\n3. Determine the appropriate test double type for each dependency:\n   - **Stub**: Returns canned data, no behavior verification (use for database queries returning fixed datasets).\n   - **Mock**: Verifies interactions -- call count, argument matching, call order (use for email senders, event emitters).\n   - **Spy**: Wraps real implementation while recording calls (use when partial behavior is needed).\n   - **Fake**: Lightweight working implementation (use for in-memory repositories replacing real databases).\n4. Generate test double files following the project's existing test directory structure (e.g., `__mocks__\u002F`, `test\u002Fdoubles\u002F`, `testutil\u002F`).\n5. For each test double, implement:\n   - Factory function or class matching the dependency interface exactly.\n   - Configurable return values via builder pattern or method chaining.\n   - Call recording for assertion (arguments, call count, call order).\n   - Reset\u002Frestore mechanism for cleanup between tests.\n6. Wire test doubles into existing test files using the framework's dependency injection pattern (`jest.mock()`, `@patch`, constructor injection, or Go interface substitution).\n7. Validate all test doubles compile and pass type checks by running `tsc --noEmit` or equivalent.\n\n## Output\n\n- Test double source files (one per dependency) placed in the project's mock directory\n- Factory functions with TypeScript generics or equivalent type safety\n- Jest `__mocks__` auto-mock modules where applicable\n- Updated test files wired to use generated doubles instead of real dependencies\n- Summary listing each double, its type (mock\u002Fstub\u002Fspy\u002Ffake), and the interface it replaces\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| `TypeError: X is not a function` | Mock missing a method from the real interface | Regenerate the double from the current interface definition; add the missing method |\n| Mock leaking between tests | Shared mock state not reset in `afterEach` | Add `jest.restoreAllMocks()` or `sinon.restore()` in teardown hooks |\n| Type mismatch on mock return value | Return type does not match interface contract | Use `as ReturnType\u003Ctypeof fn>` or update the mock factory to return the correct type |\n| Spy not recording calls | Spy created after the function was already bound | Create spies before the module under test imports the dependency |\n| Over-mocking hides real bugs | Too many layers replaced with fakes | Limit mocks to true external boundaries (I\u002FO, network); let pure logic run unmocked |\n\n## Examples\n\n**Jest mock factory for a UserRepository:**\n```typescript\n\u002F\u002F __mocks__\u002FuserRepository.ts\nexport const createMockUserRepo = () => ({\n  findById: jest.fn().mockResolvedValue({ id: '1', name: 'Test User' }),\n  save: jest.fn().mockResolvedValue(undefined),\n  delete: jest.fn().mockResolvedValue(true),\n});\n```\n\n**Python unittest.mock patch for an HTTP client:**\n```python\nfrom unittest.mock import patch, MagicMock\n\n@patch('myapp.client.requests.get')\ndef test_fetch_data(mock_get):\n    mock_get.return_value = MagicMock(status_code=200, json=lambda: {\"key\": \"value\"})  # HTTP 200 OK\n    result = fetch_data(\"https:\u002F\u002Fapi.example.com\u002Fdata\")\n    assert result == {\"key\": \"value\"}\n    mock_get.assert_called_once()\n```\n\n**Go interface-based fake:**\n```go\ntype FakeStore struct {\n    data map[string]string\n}\nfunc (f *FakeStore) Get(key string) (string, error) {\n    v, ok := f.data[key]\n    if !ok { return \"\", ErrNotFound }\n    return v, nil\n}\n```\n\n## Resources\n\n- Jest Manual Mocks: https:\u002F\u002Fjestjs.io\u002Fdocs\u002Fmanual-mocks\n- Sinon.js Stubs, Mocks, Spies: https:\u002F\u002Fsinonjs.org\u002F\n- Python unittest.mock: https:\u002F\u002Fdocs.python.org\u002F3\u002Flibrary\u002Funittest.mock.html\n- Mockito (Java): https:\u002F\u002Fsite.mockito.org\u002F\n- gomock (Go): https:\u002F\u002Fgithub.com\u002Fuber-go\u002Fmock\n- Martin Fowler, \"Mocks Aren't Stubs\": https:\u002F\u002Fmartinfowler.com\u002Farticles\u002FmocksArentStubs.html","# Test Doubles Generator\n\n## Overview\n\nGenerate mocks, stubs, spies, and fakes to isolate units under test from external dependencies. Supports Jest mocks, Sinon.js stubs, Python unittest.mock, Go interfaces, and testdouble.js patterns.\n\n## Prerequisites\n\n- Testing framework installed (Jest, Vitest, Mocha, pytest, JUnit 5, or Go testing)\n- Mocking library available (Sinon.js, testdouble.js, unittest.mock, Mockito, or gomock)\n- TypeScript `strict` mode enabled for type-safe mocks (if applicable)\n- Source code with clear interface or class boundaries for dependency injection\n\n## Instructions\n\n1. Scan the codebase with Glob and Grep to identify modules with external dependencies (database clients, HTTP clients, file system access, third-party SDKs).\n2. Read each module under test and catalog its dependency interfaces -- list every method signature, return type, and side effect.\n3. Determine the appropriate test double type for each dependency:\n   - **Stub**: Returns canned data, no behavior verification (use for database queries returning fixed datasets).\n   - **Mock**: Verifies interactions -- call count, argument matching, call order (use for email senders, event emitters).\n   - **Spy**: Wraps real implementation while recording calls (use when partial behavior is needed).\n   - **Fake**: Lightweight working implementation (use for in-memory repositories replacing real databases).\n4. Generate test double files following the project's existing test directory structure (e.g., `__mocks__\u002F`, `test\u002Fdoubles\u002F`, `testutil\u002F`).\n5. For each test double, implement:\n   - Factory function or class matching the dependency interface exactly.\n   - Configurable return values via builder pattern or method chaining.\n   - Call recording for assertion (arguments, call count, call order).\n   - Reset\u002Frestore mechanism for cleanup between tests.\n6. Wire test doubles into existing test files using the framework's dependency injection pattern (`jest.mock()`, `@patch`, constructor injection, or Go interface substitution).\n7. Validate all test doubles compile and pass type checks by running `tsc --noEmit` or equivalent.\n\n## Output\n\n- Test double source files (one per dependency) placed in the project's mock directory\n- Factory functions with TypeScript generics or equivalent type safety\n- Jest `__mocks__` auto-mock modules where applicable\n- Updated test files wired to use generated doubles instead of real dependencies\n- Summary listing each double, its type (mock\u002Fstub\u002Fspy\u002Ffake), and the interface it replaces\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| `TypeError: X is not a function` | Mock missing a method from the real interface | Regenerate the double from the current interface definition; add the missing method |\n| Mock leaking between tests | Shared mock state not reset in `afterEach` | Add `jest.restoreAllMocks()` or `sinon.restore()` in teardown hooks |\n| Type mismatch on mock return value | Return type does not match interface contract | Use `as ReturnType\u003Ctypeof fn>` or update the mock factory to return the correct type |\n| Spy not recording calls | Spy created after the function was already bound | Create spies before the module under test imports the dependency |\n| Over-mocking hides real bugs | Too many layers replaced with fakes | Limit mocks to true external boundaries (I\u002FO, network); let pure logic run unmocked |\n\n## Examples\n\n**Jest mock factory for a UserRepository:**\n```typescript\n\u002F\u002F __mocks__\u002FuserRepository.ts\nexport const createMockUserRepo = () => ({\n  findById: jest.fn().mockResolvedValue({ id: '1', name: 'Test User' }),\n  save: jest.fn().mockResolvedValue(undefined),\n  delete: jest.fn().mockResolvedValue(true),\n});\n```\n\n**Python unittest.mock patch for an HTTP client:**\n```python\nfrom unittest.mock import patch, MagicMock\n\n@patch('myapp.client.requests.get')\ndef test_fetch_data(mock_get):\n    mock_get.return_value = MagicMock(status_code=200, json=lambda: {\"key\": \"value\"})  # HTTP 200 OK\n    result = fetch_data(\"https:\u002F\u002Fapi.example.com\u002Fdata\")\n    assert result == {\"key\": \"value\"}\n    mock_get.assert_called_once()\n```\n\n**Go interface-based fake:**\n```go\ntype FakeStore struct {\n    data map[string]string\n}\nfunc (f *FakeStore) Get(key string) (string, error) {\n    v, ok := f.data[key]\n    if !ok { return \"\", ErrNotFound }\n    return v, nil\n}\n```\n\n## Resources\n\n- Jest Manual Mocks: https:\u002F\u002Fjestjs.io\u002Fdocs\u002Fmanual-mocks\n- Sinon.js Stubs, Mocks, Spies: https:\u002F\u002Fsinonjs.org\u002F\n- Python unittest.mock: https:\u002F\u002Fdocs.python.org\u002F3\u002Flibrary\u002Funittest.mock.html\n- Mockito (Java): https:\u002F\u002Fsite.mockito.org\u002F\n- gomock (Go): https:\u002F\u002Fgithub.com\u002Fuber-go\u002Fmock\n- Martin Fowler, \"Mocks Aren't Stubs\": https:\u002F\u002Fmartinfowler.com\u002Farticles\u002FmocksArentStubs.html",{"name":5,"tags":24,"author":27,"license":15,"version":28,"description":29,"allowed-tools":30,"compatible-with":31},[25,26],"testing","test-doubles","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Generate mocks, stubs, spies, and fakes for dependency isolation.\nUse when creating mocks, stubs, or test isolation fixtures.\nTrigger with phrases like \"generate mocks\", \"create test doubles\", or \"setup stubs\".\n","Read, Write, Edit, Grep, Glob, Bash(test:doubles-*)","claude-code, codex, openclaw","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Ftesting--test-doubles-generator--generating-test-doubles",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill generating-test-doubles",{"tool":47,"command":48},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill generating-test-doubles",{"tool":50,"command":51},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill generating-test-doubles","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftesting--test-doubles-generator--generating-test-doubles\u002FSKILL.md",true,[],[56,63,70,77,84,92],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"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":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"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":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]