Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    Test Driven Development (TDD)

    1

    Enforce strict RED-GREEN-REFACTOR cycles with mandatory failing tests and verifiable run records.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Test Driven Development (TDD)

    Test Driven Development (TDD)

    Example session with this skill installed

    Run TDD for the 'exponential backoff' behavior in my 'payment-processor' project. Test path is tests/test_retry.py and source is lib/retry.py. Use 'pytest' as the command.

    • Read your context and instructions
    • Compiled the test driven development

    I have completed the RED-GREEN-REFACTOR cycle for the exponential backoff behavior. Production code written before the test was cleared, a failing test was verified, and the implementation now passes.

    TDD Run Record: payment-processor

    Behavior: Exponential backoff doubling the delay on each retry.
    Status: ready

    Paths

    • tests/test_retry.py: Modified (1 test added)
    • lib/retry.py: Modified (Implementation added)

    RED

    Command: pytest tests/test_retry.py::test_backoff_doubles_delay
    Result: AssertionError: assert 1 == 2 (Proven: delay logic was missing)

    GREEN

    Command: pytest tests/test_retry.py::test_backoff_doubles_delay
    Result: PASSED
    Suite Command: pytest
    Suite Result: 14 passed, 0 failed

    Refactor

    • Renamed internal variable d to delay_seconds for clarity.
    • Removed redundant initialization in RetryStrategy.

    Diff Bounds

    • All changes restricted to tests/test_retry.py and lib/retry.py.

    Residual

    • next_behavior: not started
    • review: not this role
    • code_first: no

    Next steps

    1. Review the generated implementation in lib/retry.py.
    2. Define the next behavior (e.g., maximum retry limit) for a new cycle.
    3. Merge the plans/tdd-run.md log into your documentation if required.

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

    About this skill

    The problem

    Developers often struggle with the discipline of test-driven development, resulting in production code that is either untested or written before a clear assertion exists. This leads to bloated implementations and a lack of verifiable requirements.

    What it does

    • Enforces a strict RED-GREEN-REFACTOR cycle for a single, specific behavior.
    • Deletes any production code that existed before a corresponding failing test was verified.
    • Validates that tests fail for the correct reason before allowing any implementation code.
    • Generates a structured TDD run record as proof of the development process.
    • Runs the full test suite after the cycle to ensure no regressions were introduced.

    Why this beats prompting it yourself

    General-purpose agents tend to "gold-plate" code or implement multiple features at once, violating TDD principles. This skill enforces the iron law of "no production code without a failing test" by explicitly blocking the run if production code arrives early or if the scope creeps beyond the named behavior.

    Use cases

    • Implementing a single new domain logic requirement with strict quality gates.
    • Refactoring existing code safely by ensuring behavior is pinned by tests first.
    • Building critical path functions where "tests-after" is not acceptable.

    Known limitations

    Requires an existing test runner and framework in the repository. It will not install new dependencies or set up CI pipelines.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed 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 scanned

    Verified clean 1 month ago

    • Passed all security checks, Safe to install

    Listed1 month ago

    What's inside

    Frequently Asked Questions