Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 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.

    Requires an existing test runner in the repo. Does not support horizontal slices or multiple behaviors in one cycle. Will not install new test frameworks.

    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 any payment.

    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 2 months ago

    Permissions

    Read Files
    Write Files
    Listed2 months ago

    What's inside

    Frequently Asked Questions

    This skill uses a strict validation engine that identifies and automatically removes any production code introduced before a test failure is logged, ensuring a pure Red-Green-Refactor cycle.

    The skill is compatible with most major agentic frameworks (such as AutoGPT or LangChain-based agents) that have filesystem access and the ability to execute terminal commands.

    You must have a functioning test runner (like pytest, Jest, or JUnit) already configured in your repository; the skill will use your existing environment to execute its validation cycles.

    Yes, upon completion, the skill generates a structured TDD Run Record, providing a verifiable audit trail of the failing test, the passing code, and the refactor step.

    It is designed for focused, atomic development; we recommend using it for one specific behavior or requirement at a time to maintain the integrity of the TDD cycle and avoid scope creep.

    New in Agents & Orchestration