Agent skill · software engineering · aiskillstore
tdd-pytest
Python/pytest TDD specialist for test-driven development workflows. Use
Why this skill is useful
Provides specific pytest commands and TDD workflows that the AI wouldn't reliably generate on its own.
What it needs
Requires pytest, uv installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
TDD-Pytest Skill Activate this skill when the user needs help with: Writing tests using TDD methodology (Red-Green-Refactor) Auditing existing pytest test files for quality Running tests with coverage Generating test reports to TESTINGREPORT.local.md Setting up pytest configuration in pyproject.toml TDD Workflow Red-Green-Refactor Cycle 1. RED - Write a failing test first Test should fail for the right reason (not import errors) Test should be minimal and focused Show the failing test output 2. GREEN - Write minimal code to pass Only implement what's needed to pass the test No premature optimization Show the passing test output 3. REFACTOR - Improve code while keeping tests green Clean up duplication Improve naming Extract functions/classes if needed Run tests after each change Test Organization File Structure Naming Conventions Test files: test.py or test.py Test functions: test Test classes: Test Fixtures: Descriptive names (mockdatabase, sampleuser) Pytest Best Practices Fixtures Parametrization Async Tests Exception Testing Running Tests With uv Common Flags -v / --verbose - Detailed output -x / --exitfirst - Stop on first failure --tb=short - Short tracebacks --tb=no - No tracebacks -k EXPR - Run tests matching expression -m MARKER - Run tests with marker --cov=PATH - Coverage for path --cov-report=term-missing - Show missing lines pyproject.toml Configuration Minimal Setup Full Configuration Report Generation The TESTINGREPORT.local.md file should contain: 1. Test execution summary (passed/failed/skipped) 2. Coverage metrics by module 3. Audit findings by severity 4. Recommendations with file:line references 5. Evidence (command outputs) Integration with Conversation When the user asks to write tests: 1. Check conversation history for context about what to test 2. Identify the code/feature being discussed 3. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/tdd-pytest