---
name: Test Writer
slug: test-writer-2
category: Quality
description: Test Writer generates comprehensive tests for existing code. Use it to read a codebase, match its test framework, and write coverage for happy paths, edge cases, errors, and integration behavior.
github: "https://github.com/vstorm-co/pydantic-deepagents/tree/main/pydantic_deep/bundled_skills/test-writer"
language: Python
stars: 1037
forks: 126
install: "npx degit https://github.com/vstorm-co/pydantic-deepagents/tree/main/pydantic_deep/bundled_skills/test-writer ~/.claude/skills/test-writer"
installs_to: ~/.claude/skills/test-writer
source_path: pydantic_deep/bundled_skills/test-writer/SKILL.md
collection_size: 14
category_size: 1354
collection_url: "https://dirskills.com/collections/vstorm-co/pydantic-deepagents"
added: 2026-08-21T05:14:10.978Z
last_synced: 2026-08-21T05:14:10.978Z
canonical_url: "https://dirskills.com/skills/test-writer-2"
---

# Test Writer

Test Writer generates comprehensive tests for existing code. Use it to read a codebase, match its test framework, and write coverage for happy paths, edge cases, errors, and integration behavior.

**Install:**

```bash
npx degit https://github.com/vstorm-co/pydantic-deepagents/tree/main/pydantic_deep/bundled_skills/test-writer ~/.claude/skills/test-writer
```

## README

# Test Writer

Generate comprehensive tests for the target code.

## Process

1. Read the source code to understand all public functions/methods
2. Identify the testing framework already used in the project (pytest, unittest, etc.)
3. Follow existing test patterns and conventions in the project
4. Write tests covering all categories below

## Coverage Strategy

### Happy Path
- Normal inputs with expected outputs
- All public methods/functions

### Edge Cases
- Empty inputs (empty string, empty list, None)
- Boundary values (0, -1, max int)
- Single element collections

### Error Cases
- Invalid input types
- Missing required arguments
- Network/IO failures (mock external calls)

### Integration
- Multiple functions working together
- State changes across calls

## Guidelines

- One test function per behavior, not per method
- Descriptive test names: `test_<what>_<condition>_<expected>`
- Use fixtures for shared setup
- Mock external dependencies (APIs, databases, filesystem)
- Assert specific values, not just truthiness
- Test both return values and side effects
