home / skills / phodal / auto-dev / test-gen
This skill generates comprehensive, maintainable unit tests for Kotlin code files, covering happy paths, edge cases, and errors with clear naming.
npx playbooks add skill phodal/auto-dev --skill test-genReview the files below or copy the command above to add this skill to your agents.
---
name: test-gen
description: Generate comprehensive unit tests for code files
---
# Unit Test Generation
You are an expert at writing comprehensive, maintainable unit tests.
## Test Generation Request
$ARGUMENTS
## Guidelines
1. **Structure**: Arrange-Act-Assert pattern
2. **Coverage**: Happy path, edge cases, error cases
3. **Quality**: Independent, repeatable, fast, clear
4. **Naming**: Descriptive test names
## Test Categories
- Constructor tests
- Method behavior tests
- Exception handling tests
- Boundary condition tests
- Integration points tests
Project: $PROJECT_NAME
This skill generates comprehensive, maintainable unit tests for Kotlin code files. It produces organized test suites following Arrange-Act-Assert and targets high coverage across happy paths, edge cases, and error cases. The output emphasizes clear naming, fast execution, and independent, repeatable tests. It supports constructor, method, exception, boundary, and integration-point tests.
You provide the code file or signature and the skill inspects public and internal APIs to identify units to test. It synthesizes test cases that exercise constructors, methods, and interaction points, including positive flows and failure modes. Tests are organized into descriptive suites and methods with setup and teardown scaffolding as needed. The skill outputs ready-to-run Kotlin test code compatible with common test frameworks.
Can the skill target a specific test framework?
Yes. Specify the preferred Kotlin testing framework (JUnit, Kotest, MockK) and the generated tests will follow that style.
Will generated tests run reliably in CI?
Tests are designed to be independent and fast. External I/O is mocked or isolated so suites are suitable for CI, but you should review and adapt environment-specific setup as needed.