test-generator

Installation
SKILL.md

Test Generator

Before generating any output, read config/defaults.md and adapt all patterns, imports, and code examples to the user's configured stack.

Process

  1. Read the source file to understand its exports, dependencies, and behavior.
  2. Identify the source type: API route, utility function, React component, or hook.
  3. Generate test cases covering: happy path, edge cases, error handling, boundary values.
  4. Write the test file using Vitest syntax (fall back to Jest if the project uses it).
  5. Include proper mocking, setup/teardown, and descriptive test names.

File Naming and Placement

  • Place test file adjacent to source: foo.tsfoo.test.ts, Foo.tsxFoo.test.tsx.
  • If the project uses a __tests__/ directory convention, follow that instead.
  • For API route tests: app/api/users/route.tsapp/api/users/route.test.ts.

Testing API Routes

Related skills
Installs
3
GitHub Stars
3
First Seen
Feb 25, 2026