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

Tdd

skill-merozemory-oh-my-droid-tdd · by MeroZemory

Enforce strict Test-Driven Development (TDD) using the red-green-refactor cycle. Use when writing unit tests, practicing test-first development, applying TDD discipline, or implementing features via red-green-refactor workflows.

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

Install

$ agentstack add skill-merozemory-oh-my-droid-tdd

✓ 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-merozemory-oh-my-droid-tdd)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo 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 Tdd? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

TDD Mode

The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Write code before test? DELETE IT. Start over. No exceptions.

Red-Green-Refactor Cycle

1. RED: Write Failing Test

  • Write test for the NEXT piece of functionality
  • Run test - MUST FAIL
  • If it passes, your test is wrong

2. GREEN: Minimal Implementation

  • Write ONLY enough code to pass the test
  • No extras. No "while I'm here."
  • Run test - MUST PASS

3. REFACTOR: Clean Up

  • Improve code quality
  • Run tests after EVERY change
  • Must stay green

4. REPEAT

  • Next failing test
  • Continue cycle

Enforcement Rules

| If You See | Action | |------------|--------| | Code written before test | STOP. Delete code. Write test first. | | Test passes on first run | Test is wrong. Fix it to fail first. | | Multiple features in one cycle | STOP. One test, one feature. | | Skipping refactor | Go back. Clean up before next feature. |

Commands

Before each implementation:

npx jest --watchAll  # Should have ONE new failure
# or: npx vitest run, pytest, go test ./...

After implementation:

npx jest --watchAll  # New test should pass, all others still pass

Worked Example: Adding a capitalize Function

RED Phase — Write the Failing Test

// src/strings.test.js
const { capitalize } = require('./strings');

describe('capitalize', () => {
  it('should uppercase the first letter and lowercase the rest', () => {
    expect(capitalize('hello')).toBe('Hello');
  });

  it('should handle single character strings', () => {
    expect(capitalize('h')).toBe('H');
  });

  it('should return empty string for empty input', () => {
    expect(capitalize('')).toBe('');
  });
});

Run tests — they fail because strings.js does not export capitalize:

FAIL  src/strings.test.js
  ● capitalize › should uppercase the first letter and lowercase the rest
    TypeError: capitalize is not a function

GREEN Phase — Minimal Implementation

// src/strings.js
function capitalize(str) {
  if (!str) return '';
  return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
}

module.exports = { capitalize };

Run tests — all three pass:

PASS  src/strings.test.js
  capitalize
    ✓ should uppercase the first letter and lowercase the rest
    ✓ should handle single character strings
    ✓ should return empty string for empty input

REFACTOR Phase — Clean Up

Extract a guard clause for clarity, ensure tests still pass:

function capitalize(str) {
  if (str.length === 0) return '';
  return str[0].toUpperCase() + str.slice(1).toLowerCase();
}

Tests still green. Move to the next failing test.

Output Format

When guiding TDD:

## TDD Cycle: [Feature Name]

### RED Phase
Test: [test code]
Expected failure: [what error you expect]
Actual: [run result showing failure]

### GREEN Phase
Implementation: [minimal code]
Result: [run result showing pass]

### REFACTOR Phase
Changes: [what was cleaned up]
Result: [tests still pass]

Remember: The discipline IS the value. Shortcuts destroy the benefit.

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.