Skip to content
Development
Skill

/test-generator

Generates test cases for functions and components. Use when writing tests or creating test suites.

From plugin
gsd-skill-creator
70102 skills61 agents26 commands1 MCP
Install
$ npx -y skills add Tibsfox/gsd-skill-creator --skill test-generator --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/test-generator

Context preview

The summary Claude sees to decide when to auto-load this skill.

Generates test cases for functions and components. Use when writing tests or creating test suites.

SKILL.md

test-generator.SKILL.md
name: test-generator
description: Generates test cases for functions and components. Use when writing tests or creating test suites.
version: 1.0.0
format: 2025-10-02
triggers:
  - writing tests or creating test suites
updated: 2026-04-25
status: ACTIVE

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 |

Ships withgsd-skill-creator

An adaptive learning and coprocessor architecture for Claude Code, built as an extension to GSD (open-gsd)

Get the whole plugin

Other skills on gsd-skill-creator.