AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Test Driven Development

skill-infews-pxp-skill-test-driven-development · by infews

Use when implementing any feature or bugfix in code — guides the strict RED-GREEN-REFACTOR cycle: write one failing test, confirm it fails for the right reason, write the minimal code to pass, refactor while the context is fresh.

No reviews yet
0 installs
31 views
0.0% view→install

Install

$ agentstack add skill-infews-pxp-skill-test-driven-development

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-infews-pxp-skill-test-driven-development)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Test Driven Development? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Test-Driven Development

A disciplined cycle for writing code one behavior at a time: red (failing test) → green (minimal code) → refactor.

The Iron Law

No production code without a failing test first. Not even one line. Not even "I'll just sketch this out." Not even "the test is obvious — I'll add it after."

The Cycle

1. Write the failing test

Write a single test for one behavior. The test should:

  • Describe what you want, not how it's done.
  • Fail in a meaningful way (assertion error — not syntax error, not missing import).
  • Be small — favor one method's behavior over a whole class.

2. Confirm red

Run the test. Confirm it fails for the expected reason.

  • Unexpected failure reason: diagnose first; don't paper over with implementation.
  • Passes without any implementation: the behavior already exists, or the test isn't testing what you think. Investigate.

3. Write the minimal implementation

Write the simplest code that makes the test pass. Resist the urge to add more.

  • No "while I'm here" additions.
  • No defensive code for cases not yet tested.
  • No abstractions for hypothetical future tests.

4. Confirm green

Run the test. Confirm it passes. Run the full suite to check for regressions.

5. Refactor

Look at the code you just wrote and the code around it:

  • Is there duplication to extract?
  • Are names clear and intention-revealing?
  • Is the code as simple as it can be while remaining clear?
  • Any code smells?

If you see an improvement, make it. Re-run tests. If nothing needs refactoring, say so out loud and move on.

Common Rationalizations

| Excuse | Reality | |---|---| | "Test is trivial, I'll skip it" | Trivial tests catch real regressions later. Write it. | | "I already manually tested it" | Manual tests don't run in CI. Write the automated test. | | "I'll write the test after" | Tests-after asks "what does this do?" Tests-first asks "what should this do?" Different exercises. | | "Refactor isn't needed here" | Say so explicitly. Don't silently skip Step 5. | | "I'll batch the refactor at the end" | Refactor with context fresh, not after you've moved on. |

Red Flags — STOP

  • Code before test.
  • "I'll just sketch this out and add the test later."
  • Test added after the code already passed manually.
  • Implementing more than one behavior per cycle.
  • Skipping Step 5 without saying so.

All of these mean: stop, delete the unprotected code, start the cycle properly.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.