본문으로 건너뛰기
Skillpedia
테스트95k · #1315

test-driven-development

하는 일

이 스킬은 테스트 주도 개발을 하도록 AI를 안내합니다. 먼저 문제를 보여 주는 테스트를 쓴 뒤 작은 수정을 합니다. 변경이 작동한다는 증거를 원하는 개발자를 위한 것입니다.

사용하는 경우

  • ✓테스트를 먼저 작성하며 새 기능을 만들고 싶을 때.
  • ✓버그를 고치고 실패하는 테스트로 수정을 증명해야 할 때.
  • ✓기존 테스트를 깨뜨리지 않으면서 동작을 바꾸고 싶을 때.

스킬 링크

https://github.com/odysseus-dev/odysseus/blob/dev/resources/skills/general/test-driven-development/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/odysseus-dev/odysseus/blob/dev/resources/skills/general/test-driven-development/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“빈 검색 결과가 페이지를 깨뜨리는 버그를 고쳐 주세요. 먼저 실패하는 테스트를 쓰고 나서 고쳐 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 기존 코드와 테스트를 읽고, 기대 동작을 보여 주는 가장 작은 테스트를 쓴 뒤 그 테스트가 실패하는지 확인합니다. 그다음 테스트를 통과시키는 가장 작은 변경을 하고 diff를 검토합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

When to Use

Use when implementing a feature, fixing a bug, or changing behavior where a regression test can define the expected result. Prefer this workflow for parser, routing, agent-loop, and UI behavior changes.

Procedure

  1. Inspect the relevant code, existing tests, and local conventions before editing.
  2. Write the smallest regression test that demonstrates the requested behavior or reproduces the bug.
  3. Run that test and confirm it fails for the expected reason, not because the test setup is broken.
  4. Make the smallest production change that makes the test pass.
  5. Run the focused test again, then run the surrounding module suite.
  6. Review the diff for unrelated changes, brittle assertions, hidden state, and missing error paths.
  7. Report the tests run and any remaining coverage or environment limits.

Pitfalls

  • Do not write a test that only mirrors the implementation; assert the user-visible contract.
  • Do not weaken an assertion just to make a failing test pass.
  • Do not skip the focused failing-test step when the behavior is observable in a local test.
  • Keep network, filesystem, and model calls deterministic with fakes or fixtures unless the integration itself is under test.

Verification

  • The new regression test fails before the fix and passes after it.
  • The relevant focused suite passes.
  • The broader suite passes or its failure is explained with evidence.
  • The final diff contains the test and the production change needed for the same behavior.
자주 묻는 질문

테스트가 왜 먼저 실패해야 하나요?

실패하는 테스트는 그 테스트가 우연히 통과하는 것이 아니라 실제로 동작을 검사한다는 것을 보여 준다고 스킬은 설명합니다.

통과시키려고 테스트를 약하게 만들 수 있나요?

아닙니다. 스킬은 실패하는 테스트를 통과시키기 위해 검증문을 약하게 만들지 말라고 말합니다.

테스트에서 네트워크 호출은 어떻게 다루나요?

연결 자체가 테스트 대상이 아닌 한, 가짜 객체나 픽스처로 예측 가능하게 유지합니다.

상세 정보

작성자의 원본 설명

Build or fix software with a focused red-green-refactor loop

repo: odysseus-dev/odysseus

인기도

GitHub 스타
95k
순위
#1315
라이선스
AGPL-3.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬