본문으로 건너뛰기
cccskills
무료GitHub에 공개

tdd

Test-driven development - write failing test first, then minimal code. Use before implementing any feature or bugfix.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md2.9 KB
  • agents/openai.yaml184 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Test-Driven Development (TDD)

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

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"
  • Don't "adapt" it while writing tests
  • Delete means delete

Red-Green-Refactor

RED - Write Failing Test

Write one minimal test showing what should happen.

  • One behavior
  • Clear name
  • Real code (no mocks unless unavoidable)

Verify RED - Watch It Fail

MANDATORY. Never skip.

  • Run the test, confirm it fails (not errors)
  • Failure message is expected
  • Test passes? You're testing existing behavior. Fix test.

GREEN - Minimal Code

Write simplest code to pass the test.

  • Just enough to pass
  • No extra features
  • Don't add behavior beyond the test

Verify GREEN - Watch It Pass

MANDATORY.

  • Test passes
  • Other tests still pass
  • Output pristine (no errors, warnings)

REFACTOR - Clean Up

After green only:

  • Remove duplication
  • Improve names
  • Extract helpers Keep tests green. Don't add behavior.

Why Order Matters

"I'll write tests after" Tests written after pass immediately. Passing immediately proves nothing. Test-first forces you to see the test fail, proving it actually tests something.

"Tests after achieve same goals" No. Tests-after answer "What does this do?" Tests-first answer "What should this do?"

"Deleting X hours of work is wasteful" Sunk cost fallacy. The time is gone. The waste is keeping code you can't trust.

Red Flags - STOP and Start Over

  • Code before test
  • Test after implementation
  • Test passes immediately
  • "I already manually tested it"
  • "Tests after achieve the same purpose"
  • "This is different because..."

All mean: Delete code. Start over with TDD.

Common Rationalizations

ExcuseReality
"Too simple to test"Simple code breaks. Test takes 30 seconds.
"I'll test after"Tests passing immediately prove nothing.
"Already manually tested"Ad-hoc ≠ systematic. No record, can't re-run.
"TDD will slow me down"TDD faster than debugging later.

Verification Checklist

Before marking work complete:

  • Every new function/method has a test
  • Watched each test fail before implementing
  • Each test failed for expected reason
  • Wrote minimal code to pass each test
  • All tests pass
  • Output pristine (no errors, warnings)

Can't check all boxes? You skipped TDD. Start over.

When to Use

Use this skill when the task directly matches the workflow described above.

When Not to Use

Do not use this skill when the request is unrelated, low-stakes, or better handled by a simpler direct response.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Surface and categorize assumptions underlying product strategy. Use early in development to document what you're betting on.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

itseffi/agentic-os1172026년 10월 7일 업데이트

Prioritize assumptions by risk and importance. Use after assumption mapping to decide what to test first.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

itseffi/agentic-os1172026년 10월 7일 업데이트

Sync Jira issues with local tasks. Use during daily planning or when user asks about Jira issues.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

itseffi/agentic-os1172026년 10월 7일 업데이트

Design backend architecture for implementation with API contracts, data model changes, service boundaries, security, and observability.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

itseffi/agentic-os1172026년 10월 7일 업데이트

Turn ideas into designs through collaborative dialogue. Use before any creative work - features, components, or modifications.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

itseffi/agentic-os1172026년 10월 7일 업데이트

Check Google Calendar for today's schedule. Use during daily planning or when user asks about their calendar.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

itseffi/agentic-os1172026년 10월 7일 업데이트

itseffi의 스킬 모두 보기

이 스킬의 문제 신고