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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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
- Inspect the relevant code, existing tests, and local conventions before editing.
- Write the smallest regression test that demonstrates the requested behavior or reproduces the bug.
- Run that test and confirm it fails for the expected reason, not because the test setup is broken.
- Make the smallest production change that makes the test pass.
- Run the focused test again, then run the surrounding module suite.
- Review the diff for unrelated changes, brittle assertions, hidden state, and missing error paths.
- 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.
자주 묻는 질문
테스트가 왜 먼저 실패해야 하나요?
실패하는 테스트는 그 테스트가 우연히 통과하는 것이 아니라 실제로 동작을 검사한다는 것을 보여 준다고 스킬은 설명합니다.
통과시키려고 테스트를 약하게 만들 수 있나요?
아닙니다. 스킬은 실패하는 테스트를 통과시키기 위해 검증문을 약하게 만들지 말라고 말합니다.
테스트에서 네트워크 호출은 어떻게 다루나요?
연결 자체가 테스트 대상이 아닌 한, 가짜 객체나 픽스처로 예측 가능하게 유지합니다.
상세 정보
인기도
- GitHub 스타
- 95k
- 순위
- #1315
- 라이선스
- AGPL-3.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
odysseus
95k범위가 제한된 토큰으로 할 일, 이메일, 일정, 메모리, 문서 같은 Odysseus 데이터를 읽고 업데이트하도록 에이전트를 돕습니다.
odysseus
95kCodex Agent 토큰으로 할 일, 이메일, 일정, 메모리, 문서 같은 Odysseus 데이터를 읽고 업데이트하도록 에이전트를 돕습니다.
artifact-completion
95k요청된 파일이나 문서를 일찍 만들고 실제 결과물로 다듬은 뒤, 완료라고 말하기 전에 점검하도록 에이전트를 돕습니다.
terminal-recovery
95k오류를 읽고 가능성 높은 원인을 찾은 뒤 하나의 표적 수정을 시도해, 실패한 터미널 명령에서 회복하도록 에이전트를 돕습니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.