- Home
- Skills
- Agents & Orchestration
- Test Driven Development (TDD)
Works with the AI tools you already use
Test Driven Development (TDD)
Enforce strict RED-GREEN-REFACTOR cycles with mandatory failing tests and verifiable run records.
$5
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
dtodelay_secondsfor clarity. - Removed redundant initialization in
RetryStrategy.
Diff Bounds
- All changes restricted to
tests/test_retry.pyandlib/retry.py.
Residual
- next_behavior: not started
- review: not this role
- code_first: no
Next steps
- Review the generated implementation in
lib/retry.py. - Define the next behavior (e.g., maximum retry limit) for a new cycle.
- Merge the
plans/tdd-run.mdlog into your documentation if required.
Connects securely to your tools. The creator never sees your data.
What you get
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 install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
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
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 1 day ago
- Passed all security checks, Safe to install