test-generator

Generate Vitest unit and Playwright end-to-end tests from code diffs.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/mqzkim/trading --skill test-generator-mqzkim
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-generator
Source: https://github.com/mqzkim/trading/tree/main/.agents/skills/test-generator
Command: npx skills add https://github.com/mqzkim/trading --skill test-generator-mqzkim

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the generation of unit and end-to-end tests for code changes, improving code quality and reducing manual testing effort.

Core Features & Use Cases

  • Automated Test Generation: Creates unit tests using Vitest and E2E tests with Playwright based on code analysis.
  • Edge Case Detection: Identifies and includes tests for edge cases like boundary values, null inputs, and concurrency issues.
  • Coverage Analysis: Analyzes test coverage and highlights areas that are not tested.
  • Use Case: After making changes to a critical function, use this Skill to automatically generate a comprehensive suite of tests that cover normal operation and potential failure points.

Quick Start

Use the test-generator skill to create unit tests for the file 'src/utils.js'.

Frequently Asked Questions about test-generator

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

FAQPage Schema
How do I auto-generate Vitest unit tests for code modifications?

You can auto-generate Vitest unit tests by providing file paths or diffs as input. The test-generator analyzes the code changes and creates a comprehensive suite of tests covering normal operations and potential failure points.

Does this tool generate Playwright E2E tests automatically?

Yes, it automatically generates Playwright E2E tests alongside Vitest unit tests. It analyzes your code modifications to create end-to-end test suites that ensure your application functions correctly after changes.

Can automated test generation detect edge cases like null inputs and concurrency issues?

Automated test generation identifies and includes tests for edge cases such as boundary values, null inputs, and concurrency issues. This ensures your code modifications are validated against potential failure points.

What is the best way to analyze test coverage for newly generated tests?

The best way to analyze test coverage is to use the built-in coverage analysis feature. It evaluates the generated Vitest and Playwright tests, highlighting specific areas of your code modifications that remain untested.

How do I generate tests using a git diff instead of a file path?

You can generate tests using a git diff by providing the diff as input instead of a file path. The test-generator supports both file paths and diffs, reading and grepping the changes to write corresponding test files.

When should I not use automated test generation for my project?

You should avoid automated test generation if your project does not utilize Vitest or Playwright. Since it specifically generates tests for these frameworks, it may not suit projects using other testing libraries.