test-generator

test-generator is a skill for Claude Code, Codex from vstorm-co/pydantic-deepagents. It costs 12 tokens per session (456 once invoked), scanned A, original, MIT.

A guide for generating pytest tests for Python functions and classes, covering normal inputs, edge cases, errors, and relevant component interactions.

In plain words
What is it for?
Use it when creating a Python test suite with pytest. It helps structure tests for successful results, empty or boundary values, invalid inputs, missing parameters, and integrations where appropriate.
Why use it?
It helps turn expected behavior and failure conditions into repeatable checks. Running these tests can reveal regressions when code changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating a Python test suite with pytest. It helps structure tests for successful results, empty or boundary values, invalid inputs, missing parameters, and integrations where appropriate.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vstorm-co/pydantic-deepagents/test-generator
About the project

Pydantic Deep Agents is a self-hosted terminal AI assistant and Python framework for building coding, research, and other AI agents. It gives agents tools such as file access, shell commands, planning, memory, sub-agents, sandboxed execution, and MCP connections, and supports different models.

vstorm-co/pydantic-deepagents · 1,057 stars · on GitHub · vstorm-co.github.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vstorm-co/pydantic-deepagents --skill test-generator
Clone the repo
git clone --depth 1 https://github.com/vstorm-co/pydantic-deepagents

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/vstorm-co/pydantic-deepagents/test-generator.svg)](https://agentmods.dev/skills/vstorm-co/pydantic-deepagents/test-generator)
Your own site
<a href="https://agentmods.dev/skills/vstorm-co/pydantic-deepagents/test-generator"><img src="https://agentmods.dev/badge/skills/vstorm-co/pydantic-deepagents/test-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.00456
Opus 5 $0.00006 $0.00228
Sonnet 5 $0.00002 $0.00091
Haiku 4.5 $0.00001 $0.00046

Measured 8d ago against content hash 8ed82c052e74, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

test-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/full_app/skills/test-generator/SKILL.md · 93 lines

What it actually says

Test Generator Skill

You are a test generation expert. When generating tests, follow these guidelines:

Test Structure

Use pytest with the following structure:

import pytest
from module import function_to_test

class TestFunctionName:
    """Tests for function_name."""

    def test_basic_case(self):
        """Test the basic/happy path."""
        result = function_to_test(valid_input)
        assert result == expected_output

    def test_edge_case(self):
        """Test edge cases."""
        ...

    def test_error_handling(self):
        """Test error conditions."""
        with pytest.raises(ExpectedError):
            function_to_test(invalid_input)

Test Categories

1. Happy Path Tests

  • Test normal, expected inputs
  • Verify correct output

2. Edge Cases

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

3. Error Cases

  • Invalid types
  • Out of range values
  • Missing required parameters

4. Integration Tests (if applicable)

  • Test interactions between components
  • Test with real dependencies where possible

Best Practices

  1. One assertion per test when possible
  2. Descriptive test names that explain what's being tested
  3. Use fixtures for common setup
  4. Use parametrize for testing multiple inputs
  5. Mock external dependencies

Example: Parametrized Test

@pytest.mark.parametrize("input,expected", [
    (0, 0),
    (1, 1),
    (5, 120),
    (10, 3628800),
])
def test_factorial(input, expected):
    assert factorial(input) == expected

Example: Testing Async Functions

import pytest

@pytest.mark.asyncio
async def test_async_function():
    result = await async_function()
    assert result == expected
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 93 lines · 12 tokens per session scan A 8ed82c052e74

Subscribe to this mod's changes

test-generator is a skill published in the GitHub repository vstorm-co/pydantic-deepagents (1,057 stars, last pushed 16d ago), licensed MIT. It adds 12 tokens to every session and 456 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.