/test-generator
Generates test cases for functions and components. Use when writing tests or creating test suites.
$ npx -y skills add Tibsfox/gsd-skill-creator --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/test-generator
Context preview
What this command does when you run it.
Generates test cases for functions and components. Use when writing tests or creating test suites.
Command definition
test-generator.mdname: test-generator description: Generates test cases for functions and components. Use when writing tests or creating test suites.
Test Generation
Structure (AAA Pattern)
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 |
An adaptive learning and coprocessor architecture for Claude Code, built as an extension to GSD (open-gsd)
Repo: Tibsfox/gsd-skill-creator
Other commands on gsd-skill-creator.
- /api-design
REST API design best practices. Use when designing APIs, choosing status codes, or creating endpoints.
Open command - /code-review
Reviews code for bugs, style, and best practices. Use when reviewing PRs or checking code quality.
Open command - /context-handoff
Creates context handoff documents for session continuity. Use when ending sessions, switching tasks, or handing off work.
Open command - /decision-framework
Thinking frameworks for decisions and problem analysis. Use when evaluating options, root causes, or prioritizing.
Open command - /env-setup
Environment configuration and secrets management. Use when setting up .env files, managing secrets, or configuring environments.
Open command - /file-operation-patterns
Safe file operation patterns. Use when performing bulk file operations or writing deployment scripts.
Open command

