<< All versions
Skill v1.0.1
currentAutomated scan100/100florianbruniaux/claude-code-ultimate-guide/generate-tests
+3 new
──Details
PublishedNovember 5, 2026 at 05:53 AM
Content Hashsha256:643a1b7824790301...
Git SHAccf9e0f7bd81
Bump Typepatch
──Files
Files (1 file, 2.0 KB)
SKILL.md2.0 KBactive
SKILL.md · 100 lines · 2.0 KB
name: generate-tests description: Generate comprehensive tests for specified code argument-hint: "<file_or_module> [--framework jest|vitest|pytest]" effort: medium when_to_use: "Use when adding test coverage for a function, module, or feature." disable-model-invocation: true metadata: version: "1.0.1"
Generate tests
Generate comprehensive tests for specified code.
Instructions
- Read the target file(s)
- Identify testable units (functions, classes, methods)
- Generate tests following project conventions
- Ensure high coverage of edge cases
Test generation process
1. Analyze target
- Identify public interfaces
- Understand dependencies
- Note edge cases and boundaries
2. Detect test framework
Check for:
jest.config.js→ Jestvitest.config.ts→ Vitestpytest.ini→ pytestmochain package.json → Mocha
3. Generate tests
Follow the detected framework conventions.
Test categories
Happy path
Normal expected behavior with valid input.
Edge cases
- Empty inputs
- Null/undefined values
- Boundary values (0, -1, MAX_INT)
- Single item vs multiple items
Error cases
- Invalid input types
- Missing required parameters
- Network/IO failures
- Timeout scenarios
Integration points
- Database interactions
- External API calls
- File system operations
Output format
typescript
describe('[ComponentName]', () => {describe('[methodName]', () => {// Happy pathit('should [expected behavior] when [condition]', () => {// Arrange// Act// Assert});// Edge casesit('should handle empty input', () => {});it('should handle null values', () => {});// Error casesit('should throw when [invalid condition]', () => {});});});
Conventions
- One assertion per test (when practical)
- Descriptive test names
- AAA pattern (Arrange-Act-Assert)
- No test interdependence
- Mock external dependencies
Usage
/generate-tests src/utils/calculator.ts/generate-tests src/services/
$ARGUMENTS