test-writer

Generate pytest or unittest suites for Python code with fixtures and mocks.

1.0k|120|Updated Nov 29, 2025
One-click install
npx skills add https://github.com/vstorm-co/pydantic-deepagents --skill test-writer-vstorm-co
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-writer
Source: https://github.com/vstorm-co/pydantic-deepagents/tree/main/cli/skills/test-writer
Command: npx skills add https://github.com/vstorm-co/pydantic-deepagents --skill test-writer-vstorm-co

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of comprehensive, maintainable test suites for existing codebases to reduce manual effort, increase confidence in changes, and catch regressions early.

Core Features & Use Cases

  • Test discovery: Inspect source files to identify public functions, methods, and entry points that require tests.
  • Framework-aware generation: Detect and follow the project's existing testing framework and conventions (pytest, unittest) and produce tests that match style and patterns.
  • Coverage strategy: Produce tests covering happy paths, edge cases, error handling, and integration flows while recommending fixtures and mocks for external dependencies.
  • Use Case: Turn an untested Python module into a suite of descriptive pytest tests that mock external APIs, assert specific return values and side effects, and follow project naming and fixture conventions.

Quick Start

Generate a pytest test suite for the module at path src/utils.py covering happy path, edge cases, and mocked external calls.

Frequently Asked Questions about test-writer

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

FAQPage Schema
How do I generate pytest tests for an existing Python module?

To generate pytest tests for an existing Python module, apply this test generation Skill to your source path. It detects your testing framework, analyzes public functions, and outputs descriptive test cases covering happy paths and edge cases.

What is the best way to automate unit test generation for Python code?

Automating unit test generation for Python code involves inspecting source files to identify public functions and entry points. This Skill produces framework-aware tests that assert explicit values and use fixtures for shared setup.

Can I automatically add mocking for external dependencies in my test suite?

Yes, you can automatically add mocking for external dependencies in your test suite. The generated tests mock external APIs and dependencies, ensuring integration and unit cases conform to pytest or unittest conventions without requiring live calls.

Does the test generator work with both pytest and unittest frameworks?

Yes, the test generator works with both pytest and unittest frameworks. It detects your project's existing testing framework and conventions, then produces well-structured tests that match your established style and patterns.

How do I cover edge cases and error handling when writing Python tests?

To cover edge cases and error handling when writing Python tests, the Skill applies a coverage strategy that generates tests for error conditions and integration flows. It ensures your suite catches regressions by testing beyond standard happy paths.

What are the limitations of automated test generation for existing codebases?

Automated test generation for existing codebases is limited to Python projects and relies on detecting existing pytest or unittest patterns. It requires clear public functions to inspect and cannot infer unstated business logic beyond the source code.