This skill uses the test-doubles-generator plugin to automatically create mocks, stubs, spies, and fakes for unit testing. It analyzes dependencies in the code and generates appropriate test doubles based on the chosen testing framework, such as Jest, Sinon, or others. Use this skill when you need to generate test doubles, mocks, stubs, spies, or fakes to isolate units of code during testing. Trigger this skill by requesting test double generation or using the `/gen-doubles` or `/gd` command.
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.
3plugins reuse this skill
First indexed Jul 13, 2026
npx claudepluginhub dorucioclea/claude-code-plugins-plus --plugin test-doubles-generator