unit-test-generator

Generate unit tests for Python, TypeScript, and JavaScript via AST analysis.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/chaserbreitenbach/claude-skills-and-agents --skill unit-test-generator-chaserbreitenbach
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unit-test-generator
Source: https://github.com/chaserbreitenbach/claude-skills-and-agents/tree/main/skills/testing/unit-test-generator
Command: npx skills add https://github.com/chaserbreitenbach/claude-skills-and-agents --skill unit-test-generator-chaserbreitenbach

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automatically generates comprehensive unit tests for Python, TypeScript, and JavaScript codebases by analyzing function signatures, docstrings, and implementation patterns.

Core Features & Use Cases

  • Generates happy-path, boundary, null/empty, and exception tests across supported frameworks (pytest, Jest, Vitest).
  • Analyzes source via AST to discover functions and type hints to tailor tests.
  • Use cases include new code without tests, code with low coverage, and refactoring.

Quick Start

Run the unit-test-generator on your project to automatically produce a baseline test suite.

Frequently Asked Questions about unit-test-generator

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

FAQPage Schema
How do I generate unit tests for Python and TypeScript codebases?

To generate unit tests for Python, TypeScript, and JavaScript, this tool analyzes source code via AST to discover functions, signatures, and type hints, then outputs framework-specific test files covering happy paths, boundaries, nulls, and exceptions.

Does this unit test generator work with pytest for Python code?

Yes, the unit test generator supports pytest for Python codebases, applying a test-case design strategy that includes happy paths, boundaries, null/empty inputs, and exceptions to produce comprehensive baseline test suites.

What's the best way to create unit tests for code with low test coverage?

The best way to create tests for low coverage code is using an AST-based generator that analyzes existing function signatures and docstrings to automatically produce framework-specific test files covering boundary and exception cases.

Can I auto-generate test cases for refactoring scenarios without writing tests manually?

Yes, you can auto-generate test cases for refactoring scenarios by parsing source code with AST to discover functions and type hints, which allows the tool to tailor tests for happy paths, boundaries, nulls, and exceptions automatically.

What types of test cases are generated when automatically creating unit tests?

When automatically creating unit tests, the tool generates happy-path, boundary, null/empty, and exception test cases by analyzing implementation patterns and type hints from your source code.