Skill · em Corrigir bugs

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code

Procedência

Antes de instalar

2 arquivos · 17,4 KB · só texto, nenhum script

Instalar na sua CLI

O comando baixa a versão fixada (commit 5bf4e78) direto da origem, para a pasta que a CLI lê. Precisa de curl (macOS e Linux); no Windows não há comando, porque o Rook Labs é para macOS.

Claude Code

Neste projeto: instala em .claude/skills/test-driven-development/.

d=".claude/skills/test-driven-development"
u="https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/skills/test-driven-development"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/writing-good-tests.md" "$u/writing-good-tests.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/LICENSE"

Global: instala em ~/.claude/skills/test-driven-development/.

d="$HOME/.claude/skills/test-driven-development"
u="https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/skills/test-driven-development"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/writing-good-tests.md" "$u/writing-good-tests.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/LICENSE"

Codex

Neste projeto: instala em .agents/skills/test-driven-development/.

d=".agents/skills/test-driven-development"
u="https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/skills/test-driven-development"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/writing-good-tests.md" "$u/writing-good-tests.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/LICENSE"

Global: instala em ~/.agents/skills/test-driven-development/.

d="$HOME/.agents/skills/test-driven-development"
u="https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/skills/test-driven-development"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/writing-good-tests.md" "$u/writing-good-tests.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/LICENSE"

Antigravity

Neste projeto: instala em .agents/skills/test-driven-development/.

d=".agents/skills/test-driven-development"
u="https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/skills/test-driven-development"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/writing-good-tests.md" "$u/writing-good-tests.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/LICENSE"

Global: instala em ~/.gemini/antigravity-cli/skills/test-driven-development/.

d="$HOME/.gemini/antigravity-cli/skills/test-driven-development"
u="https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/skills/test-driven-development"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/writing-good-tests.md" "$u/writing-good-tests.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/obra/superpowers/5bf4e78011075bcfc0dc295f0724994cd123ee71/LICENSE"

Peça ao Rook

Já usa o Rook Labs? Cole no chat do Rook: instale a skill https://rooklabs.sh/marketplace/superpowers.test-driven-development

Prévia do SKILL.md

---
name: test-driven-development
description: Use when implementing any feature or bugfix, before writing implementation code
---

# Test-Driven Development (TDD)

## Overview

Write the test first. Watch it fail. Write minimal code to pass.

**Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.

**Violating the letter of the rules is violating the spirit of the rules.**

## When to Use

**Always:**
- New features
- Bug fixes
- Refactoring
- Behavior changes

**Exceptions (ask your human partner):**
- Throwaway prototypes
- Generated code
- Configuration files

Thinking "skip TDD just this once"? Stop. That's rationalization.

## The Iron Law

```
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
```

Write code before the test? Delete it. Start over.

**No exceptions:**
- Don't keep it as "reference"
…

Ver todo o marketplace