# Tdd Fix

> Strict TDD bug-fix loop. Failing test first, then minimal fix, then full CI parity (tsc -b + tests + lint) before PR. Use for bug-fix issues. Triggers "/tdd-fix", "tdd bug", "fix issue #N with tdd".

- **Type:** Skill
- **Install:** `agentstack add skill-ao92265-claude-code-playbook-tdd-fix`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ao92265](https://agentstack.voostack.com/s/ao92265)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ao92265](https://github.com/ao92265)
- **Source:** https://github.com/ao92265/claude-code-playbook/tree/main/skills/tdd-fix

## Install

```sh
agentstack add skill-ao92265-claude-code-playbook-tdd-fix
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# TDD Fix Loop

Eliminates wrong-approach / buggy-first-pass friction by forcing red→green→ship.

## Phase 1 — RED

1. Read issue, reproduce bug locally.
2. Write a test that captures expected behavior. Test MUST fail.
3. Run `tsc -b && npm test` — confirm test fails for the RIGHT reason (not compile error, not wrong assertion).
4. Commit failing test alone: `test: failing case for #N`.

## Phase 2 — GREEN

1. Implement MINIMAL fix. No refactor, no adjacent cleanup.
2. After every edit run full CI parity:
   ```
   tsc -b && npm test && npm run lint
   ```
3. Loop until all three pass. NEVER skip a step.
4. 3 failed attempts → STOP, explain blocker, ask user.

## Phase 3 — SHIP

1. Commit fix separate from test: `fix:  (#N)`.
2. `git branch --show-current` before push.
3. `gh pr create` referencing issue.

## Hard Rules

- Use `tsc -b` (CI parity), NEVER `tsc --noEmit`.
- NEVER edit `prisma/schema.prisma` without explicit user auth.
- NEVER bypass hooks (`--no-verify`, `[skip-verify]`) without user say-so.
- NEVER claim done without paste of `tsc -b && npm test && npm run lint` exit codes.

## Source & license

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

- **Author:** [ao92265](https://github.com/ao92265)
- **Source:** [ao92265/claude-code-playbook](https://github.com/ao92265/claude-code-playbook)
- **License:** MIT

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

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ao92265-claude-code-playbook-tdd-fix
- Seller: https://agentstack.voostack.com/s/ao92265
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
