Back to Skills

test-generator

Automatically suggest tests for new functions and components. Use when new code is written, functions added, or user mentions testing. Creates test scaffolding with Jest, Vitest, Pytest patterns. Triggers on new functions, components, test requests, testing mentions.

520stars120forksUpdated 2/18/2026

Security Assessment

Safe(100/100)
Security Score100/100

About test-generator

The 'test-generator' skill automates the process of generating basic tests for new code, particularly focusing on newly created functions, components, or any scenario where testing is mentioned. It solves the problem of manually setting up initial test cases, which can be time-consuming and error-prone. This skill triggers automatically when a new function is created, a component is added, or a user requests tests, providing quick scaffolding to help developers get started with testing immediately.

FAQ

How does the 'test-generator' skill work?

The skill automatically generates basic test scaffolding based on the code you write. It covers common test scenarios such as happy paths, edge cases, and error handling, and adapts to different testing frameworks such as Jest, Vitest, or Pytest.

What frameworks does the 'test-generator' skill support?

The skill supports JavaScript/TypeScript (Jest, Vitest, Mocha), Python (pytest, unittest), Java (JUnit), and Go (test), automatically detecting the appropriate framework based on your code.

Can the 'test-generator' skill create comprehensive test suites?

No, the 'test-generator' skill only generates basic test scaffolding. For comprehensive test suites, you should use the '@test-engineer' sub-agent.

What type of tests does the 'test-generator' skill not handle?

The skill does not generate integration tests, end-to-end tests, or provide test strategy planning. For those tasks, the '@test-engineer' sub-agent should be used.

Can the 'test-generator' skill handle all types of components and functions?

Yes, it can handle various types of code, including JavaScript functions, React components, and Python functions, providing relevant test scaffolding based on the type of code you write.

All Files

2 files
SKILL.md6.1 KB
View
README.md1.5 KB
View

Install test-generator

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill