Works with the AI Agents you already use

    Pytest Test Architect

    by Tommi Sullivan

    2

    Generate professional pytest suites using behavior-driven matrices, AAA patterns, and resilient fixture architecture.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    pytest-test-architect

    pytest-test-architect

    Example session with this skill installed

    Write a test suite for this PaymentProcessor class. It has a process_refund method that talks to Stripe and updates our local DB. Make sure it handles API failures.

    • Read your context and instructions
    • Compiled the pytest-test-architect

    I've generated tests/test_payments.py. It includes:

    • A stripe_client fixture using monkeypatch.
    • test_process_refund_insufficient_funds_raises_and_preserves_db_state.
    • A 4-category test matrix (Happy/Boundary/Error/State).

    Running tests... 5 passed, 0 failed.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    Writing tests often results in brittle suites that break during refactors because they target implementation details instead of behavior. Developers frequently miss critical edge cases and fail to verify that the system state remains intact after an error is raised.

    What it does

    • Generates a comprehensive test matrix covering the happy path, boundary conditions, error paths, and side effects.
    • Builds production-grade pytest suites using the Arrange-Act-Assert (AAA) pattern and clean fixture architecture.
    • Implements robust mocking strategies limited to system boundaries like HTTP, clocks, and third-party SDKs.
    • Enforces state-preservation assertions to ensure failed operations do not corrupt data.
    • Delivers runnable test files along with a coverage report and a list of identified code smells.

    Frameworks & tools

    Python, pytest, freezegun, monkeypatch, tmp_path.

    Why this beats prompting it yourself

    Standard prompts usually produce shallow tests that only check the happy path. This skill enforces a disciplined architectural approach to testing, ensuring every public method is exercised against a four-category matrix and that fixtures are composed rather than duplicated.

    Use cases

    • Generating a complete test suite for a new Python module or class.
    • Increasing test coverage for legacy code by identifying unhandled boundary conditions.
    • Refactoring brittle mocks into stable, behavior-based assertions.
    • Auditing existing codebases for "testability" and identifying hidden I/O or state issues.

    Known limitations

    Requires the environment to have necessary dependencies installed to verify the tests via execution. Prefers fakes over MagicMock for complex interfaces, which may require manual implementation of the fake if not provided.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 5 months ago

    Software
    Python

    Permissions

    Environment Variables
    Listed5 months ago

    What's inside

    Creator

    Tommi Sullivan

    Tommi Sullivan

    6 skills on Agensi

    Frequently Asked Questions

    The skill uses a behavior-driven matrix to automatically identify and write tests for happy paths, boundary conditions, error handling, and state preservation, ensuring your suite covers more than just basic functionality.

    The skill focuses on the Python ecosystem and is optimized for workflows using pytest, along with supporting tools like freezegun for time-sensitive logic and monkeypatch for mocking.

    Each execution delivers fully structured .py test files following the AAA pattern, a detailed coverage analysis, and a report identifying potential code smells in your source module.

    Yes, the skill is designed to audit legacy modules, identify untested edge cases, and replace brittle implementation-focused mocks with stable, behavior-based assertions.

    For complex third-party integrations, the architect prefers using 'fakes' over 'MagicMocks' to ensure stability; you may need to provide a simple fake implementation if the interface is highly specialized.

    New in Testing & Debugging

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.