Provides testing best practices, strategies, and patterns for unit, integration, and end-to-end testing. Activates when discussing test approaches, test coverage, testing frameworks, mocking strategies, or test-driven development. Use for guidance on writing effective tests and achieving quality coverage.
Provides expert guidance on writing effective tests across unit, integration, and E2E levels, including mocking strategies and TDD. Activates when discussing test approaches, coverage, frameworks, or needing help writing test cases.
/plugin marketplace add elafo/hefesto/plugin install hefesto@hermesThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Provide expert guidance on software testing strategies, patterns, and best practices.
Activate when the user:
Follow the testing pyramid for balanced coverage:
╱╲ E2E Tests (10%)
╱ ╲ - User flows, critical paths
╱────╲
╱ ╲ Integration Tests (20%)
╱ ╲ - Component interaction, APIs
╱──────────╲
╱ ╲ Unit Tests (70%)
╱ ╲ - Functions, classes, modules
╱────────────────╲
describe('calculateTotal', () => {
it('should apply discount correctly', () => {
// Arrange
const items = [{ price: 100 }, { price: 50 }];
const discount = 0.1;
// Act
const total = calculateTotal(items, discount);
// Assert
expect(total).toBe(135);
});
});
Use descriptive names that explain the scenario:
should_[expected behavior]_when_[condition][method]_[scenario]_[expectedResult]describe('AuthService + SessionStore', () => {
it('should persist session after successful login', async () => {
const authService = new AuthService();
const sessionStore = new SessionStore();
await authService.login('user@example.com', 'password');
const session = sessionStore.getSession();
expect(session).toBeDefined();
expect(session.userId).toBe('user-123');
});
});
describe('API Integration', () => {
it('should create and retrieve a user', async () => {
// Create
const created = await api.post('/users', { name: 'Test' });
expect(created.status).toBe(201);
// Retrieve
const retrieved = await api.get(`/users/${created.data.id}`);
expect(retrieved.data.name).toBe('Test');
});
});
// Jest mock
jest.mock('./emailService', () => ({
sendEmail: jest.fn().mockResolvedValue({ sent: true })
}));
// Dependency injection
class UserService {
constructor(private emailService: EmailService) {}
async createUser(data) {
const user = await this.save(data);
await this.emailService.sendWelcome(user.email);
return user;
}
}
// In test:
const mockEmailService = { sendWelcome: jest.fn() };
const service = new UserService(mockEmailService);
class LoginPage {
visit() {
cy.visit('/login');
}
fillEmail(email: string) {
cy.get('[data-testid="email"]').type(email);
}
fillPassword(password: string) {
cy.get('[data-testid="password"]').type(password);
}
submit() {
cy.get('[data-testid="submit"]').click();
}
}
// In test:
const loginPage = new LoginPage();
loginPage.visit();
loginPage.fillEmail('user@example.com');
loginPage.fillPassword('password');
loginPage.submit();
When helping with testing:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.