본문으로 건너뛰기
Skillpedia
테스트48k · #5935

tdd-workflows-tdd-green

하는 일

이 도구는 실패하는 테스트를 통과시키는 데 필요한 최소한의 코드를 작성하도록 돕습니다. 당장의 문제를 해결해 테스트가 다시 작동하도록 하는 데 집중합니다.

사용하는 경우

  • ✓코드 테스트가 실패해서 빨리 고쳐야 할 때.
  • ✓새 기능을 시작하고 첫 단계가 테스트를 통과시키는 것일 때.
  • ✓필수적인 것만 구현해 코드가 기대대로 작동하도록 하는 경우.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/tdd-workflows-tdd-green/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/tdd-workflows-tdd-green/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분.

작동 방식

도구는 실패한 테스트를 만족하는 가장 작은 코드 변경을 분석합니다. 이 작은 수정을 적용하고 테스트가 통과하는지 확인하며, 불필요한 복잡성은 더하지 않습니다.

기술 내용 (원본 SKILL.md)

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

Green Phase: Simple function

def product_list(request): products = Product.objects.all() return JsonResponse({'products': list(products.values())})

Refactor: Class-based view

class ProductListView(View): def get(self, request): products = Product.objects.all() return JsonResponse({'products': list(products.values())})

Refactor: Generic view

class ProductListView(ListView): model = Product context_object_name = 'products'


### Express Patterns

**Inline → Middleware → Service Layer:**
```javascript
// Green Phase: Inline logic
app.post('/api/users', (req, res) => {
  const user = { id: Date.now(), ...req.body };
  users.push(user);
  res.json(user);
});

// Refactor: Extract middleware
app.post('/api/users', validateUser, (req, res) => {
  const user = userService.create(req.body);
  res.json(user);
});

// Refactor: Full layering
app.post('/api/users',
  validateUser,
  asyncHandler(userController.create)
);

Use this skill when

  • Moving from red to green in a TDD cycle
  • Implementing minimal behavior to satisfy tests
  • You want to keep implementation intentionally simple

Do not use this skill when

  • You are refactoring for design or performance
  • Tests are already passing and you need new requirements
  • You need a full architectural redesign

Instructions

  1. Review failing tests and identify the smallest fix.
  2. Implement the minimal change to pass the next test.
  3. Run tests after each change to confirm progress.
  4. Record shortcuts or debt for the refactor phase.

Safety

  • Avoid bypassing tests to make them pass.
  • Keep changes scoped to the failing behavior only.

Resources

  • resources/implementation-playbook.md for detailed patterns and examples.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
자주 묻는 질문

TDD에서 '그린 단계'란 무엇인가요?

TDD(테스트 주도 개발)에서 '그린 단계'는 모든 코드 테스트가 통과하고 있는 상태입니다.

최소한의 코드를 쓰는 것이 왜 중요한가요?

최소한의 코드는 불필요한 복잡성을 피하고, 테스트가 가리키는 정확한 문제를 해결하도록 해 줘서 나중에 유지보수하기 쉽습니다.

언제 이 도구 사용을 멈춰야 하나요?

테스트가 통과하고 새 기능을 추가해야 할 때, 또는 목표가 단지 테스트를 고치는 것이 아니라 전체 코드 설계를 개선하는 것일 때 멈춥니다.

상세 정보

작성자의 원본 설명

Implement the minimal code needed to make failing tests pass in the TDD green phase.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5935
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬