Automatically generates mocks, stubs, spies, and fakes for unit testing by analyzing code dependencies. Supports Jest, Sinon, and other frameworks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/test-doubles-generator:test-doubles-generatorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill empowers Claude to streamline unit testing by automatically generating test doubles (mocks, stubs, spies, and fakes). It analyzes the code under test, identifies dependencies, and creates the necessary test doubles, significantly reducing the time and effort required to write effective unit tests.
This skill empowers Claude to streamline unit testing by automatically generating test doubles (mocks, stubs, spies, and fakes). It analyzes the code under test, identifies dependencies, and creates the necessary test doubles, significantly reducing the time and effort required to write effective unit tests.
This skill activates when you need to:
User request: "Generate mocks for the fetchData function in dataService.js using Jest."
The skill will:
dataService.js file to identify the fetchData function and its dependencies.fetchData, allowing you to simulate API responses.User request: "Create stubs for the NotificationService in userService.js using Sinon."
The skill will:
userService.js and identify the NotificationService dependency.NotificationService, enabling you to control its behavior during testing of userService.js.This skill integrates directly with your codebase by providing generated test double code snippets that can be easily copied and pasted into your unit tests. It supports popular testing frameworks and enhances the overall testing workflow.
Guides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
npx claudepluginhub danielmiessler/claude-code-plugins-plus --plugin test-doubles-generator