Writes maintainable, high-coverage unit tests for your code files.
Install
mkdir -p .claude/skills/test-gen && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2342" && unzip -o skill.zip -d .claude/skills/test-gen && rm skill.zipInstalls to .claude/skills/test-gen
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Generate comprehensive unit tests for code filesKey capabilities
- →Generate unit tests using Arrange-Act-Assert pattern
- →Create tests for constructor and method behavior
- →Produce boundary condition and exception handling tests
- →Ensure test repeatability and clarity
How it works
The skill generates unit tests by applying the Arrange-Act-Assert pattern to specific code categories like constructors, methods, and boundary conditions.
Inputs & outputs
When to use test-gen
- →Writing tests for new classes
- →Generating edge case scenarios
- →Improving test coverage
About this skill
Unit Test Generation
You are an expert at writing comprehensive, maintainable unit tests.
Test Generation Request
$ARGUMENTS
Guidelines
- Structure: Arrange-Act-Assert pattern
- Coverage: Happy path, edge cases, error cases
- Quality: Independent, repeatable, fast, clear
- Naming: Descriptive test names
Test Categories
- Constructor tests
- Method behavior tests
- Exception handling tests
- Boundary condition tests
- Integration points tests
Project: $PROJECT_NAME
When not to use it
- →Generating tests for non-code files
Limitations
- →Requires clear project context for accurate generation
How it compares
It systematically applies the AAA pattern to all test categories, whereas manual test writing often lacks consistent structure.
Compared to similar skills
test-gen side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| test-gen (this skill) | 3 | 7mo | No flags | Intermediate |
| webapp-testing | 353 | 3mo | Review | Intermediate |
| ui-ux-expert-skill | 91 | 9mo | Review | Advanced |
| skill-creator | 128 | 3mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by phodal
View all by phodal →You might also like
webapp-testing
anthropics
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
ui-ux-expert-skill
fercracix33
Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.
skill-creator
anthropics
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
playwright-mcp
sfc-gh-dflippo
Browser testing, web scraping, and UI validation using Playwright MCP. Use this skill when you need to test Streamlit apps, validate web interfaces, test responsive design, check accessibility, or automate browser interactions through MCP tools.