Tibsfox/gsd-skill-creator / examples/skills/dev/test-generator
test-generator
VerifiedGenerates test cases for functions and components. Use when writing tests or creating test suites.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.2 KB |
SKILL.md
View on GitHub---
name: test-generator
description: Generates test cases for functions and components. Use when writing tests or creating test suites.
type: skill
category: dev
status: stable
origin: tibsfox
modified: false
first_seen: 2026-01-31
first_path: examples/test-generator/SKILL.md
superseded_by: null
---
# Test Generation
## Structure (AAA Pattern)
```typescript
it('should [expected] when [condition]', () => {
// Arrange — set up data
// Act — perform operation
// Assert — verify outcome
});
```
## Test Categories
| Category | Test For |
|----------|----------|
| Happy path | Valid input → expected output |
| Edge cases | Empty, null, boundary values |
| Error cases | Invalid input, failures |
| Side effects | State changes, calls made |
| Async | Resolve/reject paths |
## Naming
Pattern: `should [behavior] when [condition]`
## Organization
- Group with `describe` by function/method
- Reset state in `beforeEach`
- One concept per test
## Anti-Patterns
| Don't | Do |
|-------|------|
| Test implementation | Test behavior |
| Share mutable state | Reset in beforeEach |
| Many assertions per test | One concept per test |
| Test private methods | Test through public API |
| Snapshot overuse | Assert specific values |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |