ab-test-analysis
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes for conversion optimization and…
Create and manage mocks, stubs, spies, and test doubles for isolating unit tests from external dependencies. Use for mock, stub, spy, test double, Mockito, Jest mocks, and dependency isolation.
Claude Code
$ npx -y skills add aj-geddes/useful-ai-prompts --skill mocking-stubbing --agent claude-code
Codex
$ npx skills add aj-geddes/useful-ai-prompts --skill mocking-stubbing -a codex -y
Cursor
$ npx skills add aj-geddes/useful-ai-prompts --skill mocking-stubbing -a cursor -y
Gemini CLI
$ npx skills add aj-geddes/useful-ai-prompts --skill mocking-stubbing -a gemini-cli -y
GitHub Copilot
$ npx skills add aj-geddes/useful-ai-prompts --skill mocking-stubbing -a github-copilot -y
OpenCode
$ npx skills add aj-geddes/useful-ai-prompts --skill mocking-stubbing -a opencode -y
Windsurf
$ npx skills add aj-geddes/useful-ai-prompts --skill mocking-stubbing -a windsurf -y
name: mocking-stubbing description: > Create and manage mocks, stubs, spies, and test doubles for isolating unit tests from external dependencies. Use for mock, stub, spy, test double, Mockito, Jest mocks, and dependency isolation.
Mocking and stubbing are essential techniques for isolating units of code during testing by replacing dependencies with controlled test doubles. This enables fast, reliable, and focused unit tests that don't depend on external systems like databases, APIs, or file systems.
Minimal working example:
// services/UserService.ts
import { UserRepository } from "./UserRepository";
import { EmailService } from "./EmailService";
export class UserService {
constructor(
private userRepository: UserRepository,
private emailService: EmailService,
) {}
async createUser(userData: CreateUserDto) {
const user = await this.userRepository.create(userData);
await this.emailService.sendWelcomeEmail(user.email, user.name);
return user;
}
async getUserStats(userId: string) {
const user = await this.userRepository.findById(userId);
if (!user) throw new Error("User not found");
const orderCount = await this.userRepository.getOrderCount(userId);
return { ...user, orderCount };
}
}
// ... (see reference guides for full implementation)Detailed implementations in the `references/` directory:
| Guide | Contents | |---|---| | [Jest Mocking (JavaScript/TypeScript)](references/jest-mocking-javascripttypescript.md) | Jest Mocking (JavaScript/TypeScript) | | [Python Mocking with unittest.mock](references/python-mocking-with-unittestmock.md) | Python Mocking with unittest.mock | | [Mockito for Java](references/mockito-for-java.md) | Mockito for Java | | [Advanced Mocking Patterns](references/advanced-mocking-patterns.md) | Advanced Mocking Patterns |
488 production-ready AI prompts, all following a standardized template with validated quality gates. Transform ChatGPT, Claude, and other AI assistants into expert consultants.
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes for conversion optimization and…
Implement Role-Based Access Control (RBAC), permissions management, and authorization policies. Use when building secure access…
Implement WCAG 2.1/2.2 accessibility standards, screen reader compatibility, keyboard navigation, and a11y testing. Use when…
Test web applications for WCAG compliance and ensure usability for users with disabilities. Use for accessibility test, a11y,…
Plan and execute effective sprints using Agile methodologies. Define sprint goals, estimate user stories, manage sprint backlog,…
Implement comprehensive alert management with PagerDuty, escalation policies, and incident coordination. Use when setting up…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…
Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…