unit-test-writer
Professional-grade unit test generation using the AAA pattern across TS, Python, Go, and Java.
- Generate idiomatic unit tests for new or existing business logic.
- Increase code coverage by generating tests for missed edge cases.
- Create mocked test suites for services with external dependencies.
$7
One-time purchase
Included in download
- Generate idiomatic unit tests for new or existing business logic.
- Create mocked test suites for services with external dependencies.
- file_read, file_write automation included
- Includes example output and usage patterns
See it in action
it('should throw error when stock is insufficient', () => {
// Arrange
const inventory = { getStock: vi.fn().mockReturnValue(0) };
// Act & Assert
expect(() => processOrder(inventory, 5)).toThrow('Out of stock');
expect(inventory.getStock).toHaveBeenCalledWith(5);
});unit-test-writer
Professional-grade unit test generation using the AAA pattern across TS, Python, Go, and Java.
$7
One-time purchase
⚡ Also available via Agensi MCP — your AI agent can load this skill on demand via MCP. Learn more →
Included in download
- Generate idiomatic unit tests for new or existing business logic.
- Create mocked test suites for services with external dependencies.
- file_read, file_write automation included
- Includes example output and usage patterns
- Instant install
See it in action
it('should throw error when stock is insufficient', () => {
// Arrange
const inventory = { getStock: vi.fn().mockReturnValue(0) };
// Act & Assert
expect(() => processOrder(inventory, 5)).toThrow('Out of stock');
expect(inventory.getStock).toHaveBeenCalledWith(5);
});About This Skill
What it does
This skill transforms your AI agent into a senior software engineer specialized in automated testing. It analyzes your source code—functions, classes, or entire modules—and generates production-ready unit tests following the industry-standard Arrange-Act-Assert (AAA) pattern. It ensures high test coverage by identifying happy paths, edge cases, and error conditions while correctly mocking external dependencies like databases or APIs.
Why use this skill
Prompting an AI to "write tests" often results in shallow, messy code that tests implementation details rather than behavior. This skill enforces strict architectural boundaries, generating idiomatic, isolation-focused test suites that are deterministic and easy to maintain. It saves developers hours of boilerplate setup and helps catch regression bugs before they hit production.
Supported tools
- JavaScript/TypeScript: Jest and Vitest with full mocking support.
- Python: Pytest-ready tests with fixtures and parameterization.
- Go: Table-driven testing using the standard library or Testify.
- Java: JUnit 5 with lifecycle annotations and assertions.
📖 Learn more: Best Testing & QA Skills for Claude Code →
Use Cases
- Generate idiomatic unit tests for new or existing business logic.
- Increase code coverage by generating tests for missed edge cases.
- Create mocked test suites for services with external dependencies.
- Refactor messy test files into clean Arrange-Act-Assert patterns.
How to Install
mkdir -p ~/.claude/skills && curl -sL https://www.agensi.io/api/install/unit-test-writer | tar xz -C ~/.claude/skills/Free skills install directly. Paid skills require purchase - use the download button above after buying.
Reviews
No reviews yet - be the first to share your experience.
Only users who have downloaded or purchased this skill can leave a review.
Early access skill
Be the first to review this skill.
Only users who have downloaded or purchased this skill can leave a review.
Security Scanned
Passed automated security review
Permissions
Reads the source file under test and writes a sibling test file. Does not execute tests.
Creator
Frequently Asked Questions
Learn More About AI Agent Skills
Similar Skills
code-reviewer
Reviews your code for bugs, security vulnerabilities, logic errors, performance issues, and style violations. Organizes findings by severity and suggests fixes with code examples.
git-commit-writer
Writes conventional commit messages by analyzing your staged git changes. Detects commit type, scope, and breaking changes automatically.
readme-generator
Generates a complete, polished README.md by scanning your actual project structure, dependencies, and code.
env-doctor
Diagnoses why your project will not start. Checks runtime versions, dependencies, environment variables, databases, ports, and build artifacts systematically.