test

Generate unit tests by analyzing code and project test conventions.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/maggit/claude-workspace --skill test-maggit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test
Source: https://github.com/maggit/claude-workspace/tree/main/skills/test
Command: npx skills add https://github.com/maggit/claude-workspace --skill test-maggit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating robust unit tests can be time-consuming and error-prone; this Skill helps automate the generation of thorough tests by analyzing code and project testing conventions.

Core Features & Use Cases

  • Detect the testing ecosystem (config files and existing tests) to align with project patterns.
  • Analyze the target code to identify inputs, outputs, side effects, dependencies, and edge cases.
  • Generate tests following existing naming conventions and directory structures for compatibility.
  • Structure tests with the AAA pattern (Arrange, Act, Assert) and cover happy paths, edge cases, errors, and async behavior where applicable.
  • Provide guidance on test quality and potential refactors when testability is poor.

Quick Start

Provide the target code and desired coverage, then ask the AI to generate a complete unit test suite.

Frequently Asked Questions about test

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

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

Auto-generate unit tests by providing your target code to the AI, which inspects functions and modules to output a complete suite following your project's testing conventions. It detects the testing ecosystem and aligns with existing directory structures for compatibility.

What is the AAA pattern for structuring unit tests?

The AAA pattern for structuring unit tests organizes logic into Arrange, Act, and Assert phases. This Skill applies the AAA pattern to clearly separate input setup, behavior execution, and output verification across positive and negative test cases.

How do I ensure my generated tests cover edge cases and regressions?

Ensure generated tests cover edge cases and regressions by analyzing target code to identify side effects and boundary conditions. The Skill generates both positive and negative test cases targeting these edge cases to validate regression safety across new features.

Does the generated test suite work with my project's existing test patterns?

The generated test suite works with your existing test patterns by detecting config files and analyzing the testing ecosystem. It follows current naming conventions and directory structures to ensure new tests integrate seamlessly with your framework setup.

Can I validate async behavior with auto-generated unit tests?

You can validate async behavior with auto-generated unit tests by having the Skill inspect target functions for asynchronous operations. It structures tests to cover async behavior where applicable, alongside standard happy paths and error handling.

What to do when code testability is poor during test generation?

When code testability is poor during test generation, the Skill provides guidance on potential refactors to improve structure. It analyzes dependencies and side effects to offer actionable recommendations for making the target code more testable.