tdd-workflow
하는 일
이 스킬은 런던 학파 방식의 테스트 주도 개발 주기를 안내하며, 의존성을 먼저 목으로 만듭니다. 테스트가 앞서 이끄는 방식으로 기능을 단계별로 만들려는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓바깥에서 안으로 테스트를 먼저 작성하며 기능을 만들고 싶을 때.
- ✓새 동작에 대해 빨강, 초록, 리팩터링의 명확한 순서를 원할 때.
- ✓작업을 완료로 보기 전에 최종 테스트 결과를 확인하고 싶을 때.
스킬 링크
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-testgen/skills/tdd-workflow/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“할인 계산을 테스트 우선으로 만들어 주세요. 목으로 만든 가격 서비스에 대한 실패 테스트부터 시작해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 목으로 된 의존성을 쓰는 실패 테스트를 작성하고, 올바른 이유로 실패하는지 실행해 확인합니다. 그다음 통과시키는 가장 단순한 코드를 쓰고 리팩터링합니다. 성공을 보고하기 전에 대상 테스트와 회귀 테스트를 실행해 실제 결과를 기록합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Follow the TDD London School (mock-first) approach:
- Write the failing test first -- define expected behavior with mocked dependencies
- Run the test -- confirm it fails for the right reason
- Implement minimal code -- make the test pass with the simplest solution
- Refactor -- clean up while keeping tests green
- Repeat -- add the next behavior
Before starting: mcp__plugin_ruflo-core_ruflo__hooks_pre-task({ description: "TDD: FEATURE_NAME" })
Before reporting the outcome, run the final target tests and the regression suite after the last edit. Record the actual commands, exit codes, whether tests ran, and failing test names. The initial red test is expected during TDD; only the final validation determines success.
Call mcp__plugin_ruflo-core_ruflo__hooks_post-task with the observed result, including when the task is abandoned or validation is interrupted. Set completed, targetTestsRan, and regressionTestsRan to true only when observed; use null for missing exit codes. Skipped or unrun validation is not success. Never substitute an expected result for an observed one.
The following example maps those observations to the hook input (tool-call notation):
const success = completed && targetTestsRan && regressionTestsRan
&& targetExitCode === 0 && regressionExitCode === 0;
mcp__plugin_ruflo-core_ruflo__hooks_post-task({
taskId: "tdd-FEATURE",
success,
storeResults: true,
task: JSON.stringify({
feature: "FEATURE",
targetCommand, targetExitCode, targetTestsRan,
regressionCommand, regressionExitCode, regressionTestsRan,
failingTestNames,
failureReason: success ? null : failureReason
})
});
On failure, report success: false and the failing test names in task. If the runner failed before identifying tests, or the task was abandoned, state that reason instead of inventing test names.
Principles:
- Mock external dependencies at boundaries
- Test behavior, not implementation
- One assertion per test when possible
- Descriptive names:
should [behavior] when [condition]
자주 묻는 질문
처음 실패하는 테스트는 문제인가요?
아니요. 원본은 이 방법에서 처음의 빨간 테스트는 예상된 것이라고 말합니다. 최종 검증만이 성공을 결정합니다.
성공은 무엇으로 판단하나요?
대상 테스트와 회귀 테스트 모두가 실제로 실행되어 통과해야 합니다. 건너뛴 테스트는 성공이 아닙니다.
결과를 기록하나요?
네. 관찰된 결과와 함께 작업 결과를 메모리 훅에 보고합니다.
상세 정보
인기도
- GitHub 스타
- 81k
- 순위
- #1701
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
agent-adaptive-coordinator
81k작업량이 바뀔 때 에이전트 무리를 나누고 재배치해, 작업에 맞는 배치를 고르도록 에이전트를 돕습니다.
agent-agent
81k큰 목표를 순서가 있는 행동 계획으로 나누고, 조건이 바뀌면 다시 계획하도록 에이전트를 가르칩니다.
agent-agentic-payments
81kAI 쇼핑을 위한 지출 위임장을 관리합니다. 지출 상한, 시간 창, 판매자 규칙, 서명된 승인을 포함합니다.
agent-analyze-code-quality
81k에이전트가 파일을 바꾸지 않고, 코드 품질 문제와 코드 냄새, 기술 부채, 리팩터링 아이디어를 찾아 검토하도록 돕습니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.