test-gen

Generates deterministic unit tests and scenario matrices covering edge cases, error paths, and state transitions.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Simon-YHKim/eject-button --skill test-gen-simon-yhkim
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-gen
Source: https://github.com/Simon-YHKim/eject-button/tree/main/.claude/skills/test-gen
Command: npx skills add https://github.com/Simon-YHKim/eject-button --skill test-gen-simon-yhkim

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing meaningful tests is hard: developers often produce shallow tests that mirror implementation, miss edge cases, or skip concurrency and permission scenarios entirely. This Skill produces behavior-focused tests and exhaustive scenario matrices so real bugs get caught before production. ## Core Features & Use Cases - Deterministic Unit Test Generation: Discovers the project's test framework, matches existing style, and writes Arrange-Act-Assert tests covering happy paths, edge cases, error paths, and boundary conditions. - 7-Category Scenario Matrix: Brainstorms Happy, Sad, Bad, Race, Boundary, Permission, and State scenarios for integration and E2E coverage, with prioritization tiers (Critical, Important, Nice-to-have). - TDD Integration: Feeds scenario matrices into RED-GREEN-REFACTOR cycles when paired with a TDD workflow. - Use Case: Ask for exhaustive test scenarios for a payment checkout flow and receive a prioritized matrix covering idempotency races, SQL injection inputs, expired-card boundaries, and invalid state transitions, mapped to unit, integration, or E2E levels. ## Quick Start Ask the assistant to write tests for a function or to generate exhaustive test scenarios for a feature such as a payment checkout flow.

Frequently Asked Questions about test-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write unit tests that catch real bugs?

Focus on behavior rather than implementation: cover the happy path, edge cases like empty or null inputs, error paths, and boundary conditions. Use Arrange-Act-Assert structure, descriptive test names, and keep tests deterministic with no real time, randomness, or network calls.

How to generate exhaustive test scenarios for a feature?

Brainstorm across seven categories: Happy, Sad, Bad, Race, Boundary, Permission, and State transitions. Build a matrix of input times state times permission, then prioritize Critical scenarios first and map each scenario to unit, integration, or E2E level.

What test scenarios should a payment checkout flow cover?

Cover successful payment, insufficient funds, adversarial inputs like negative amounts or SQL injection, idempotency against duplicate charges, card expiration boundaries, non-logged-in users, and valid versus blocked state transitions such as paid back to cart.

Does this work with my existing test framework?

Yes. The workflow first discovers the project's framework by inspecting files like package.json, pyproject.toml, Cargo.toml, or go.mod, then matches the existing test style, naming conventions, fixtures, and the project's runner command.

Why are my tests flaky and how do I avoid it?

Flaky tests usually come from real time, randomness, network calls, shared state, or sleeping to wait for async behavior. Make tests deterministic by mocking time and randomness, isolating state, and using proper synchronization primitives instead of sleeps.

When should I use unit tests versus integration or E2E tests?

Use unit tests for single-function inputs and edge cases, integration tests for module interactions, concurrency, and permission checks, and E2E tests for core user journeys. Follow the pyramid: many fast unit tests, fewer integration tests, and five to ten critical E2E scenarios.