plugins/ai-registry/common/workflow-bundle/skills/test-planner/SKILL.md
Use when: (1) "테스트 시나리오 작성해줘", (2) "테스트 계획 만들어줘", (3) "test plan 만들어줘", (4) creating test plan for new features, (5) before writing test code.
npx skillsauth add onejaejae/skills test-plannerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze implementation code and generate comprehensive test scenarios grouped by architectural layer.
이 스킬은 특정 feature 단위로 테스트 시나리오를 생성합니다.
사용자가 제공하는 정보:
research_favorite)src/services/research_favorite_service.py)제공된 feature를 기반으로 관련 파일만 분석:
src/controllers/{feature}.py
src/services/{feature}_service.py
src/repositories/{feature}_repository.py
tests/CLAUDE.md각 파일 분석 시 확인할 항목:
3개 이상 동일 패턴의 메서드가 있으면 @pytest.mark.parametrize로 통합:
#### Parametrized Scenario Group: get_{type}_metadata
- **Pattern**: 동일한 시그니처의 메타데이터 조회 메서드
- **Methods**: get_condition_metadata, get_medication_metadata, ...
- **Parametrize Keys**: (service_method, repo_method, response_class, pk_field, ...)
- **Cases**:
- success: 정상 조회 (parametrize across all methods)
- empty_codes: 코드 없을 때 빈 결과 (parametrize across all methods)
- not_found: 리서치 미존재 (parametrize across all methods)
- **개별 테스트 필요**: 대표 메서드 1개로 상세 로직 테스트 (예: condition_metadata)
적용 기준: tests/CLAUDE.md의 Parametrize 패턴 섹션 참조
PATCH 엔드포인트는 반드시 3가지 시나리오 포함:
None으로 전달되는지 검증공유 테스트 데이터가 많으면 클래스 상수로 정의:
#### Shared Test Data
- `CONDITION_CODES`: [{"name": "Type2 Diabetes", "codes": ["E11"]}]
- `MEDICATION_CODES`: [{"name": "Metformin", "codes": ["A10BA02"]}]
시나리오에 Factory 사용 방법을 명시:
Factory.build_response() (Pydantic Response 스키마)Factory.build() (SQLAlchemy Model) - model_validate가 실제 속성 접근 필요Factory.create() (실제 DB 저장)# Test Plan: {Feature Name}
## Summary
- Total scenarios: {count}
- Controller: {count} scenarios ({count} parametrized groups)
- Service: {count} scenarios ({count} parametrized groups)
- Repository: {count} scenarios
---
## Layer: Controller
### File: tests/controllers/test_{feature}_controller.py
#### Class: Test{Feature}Controller
#### Shared Test Data (class constants)
- `TEST_API_PREFIX`: "/api/{resources}"
- (필요한 경우 추가 상수)
#### Scenario 1: {method}_success
- **Method**: `{HTTP_METHOD} /api/{path}`
- **Description**: {테스트 목적 - 한글로}
- **Mock setup**: `mock_{service}.{method}.return_value = Factory.build_response(...)`
- **Test Steps**:
1. Arrange: {Mock 설정}
2. Act: {API 호출}
3. Assert: {응답 검증 - assert_success_response 사용}
- **Expected**: HTTP {status_code}
#### Parametrized Group: {group_name}
- **Methods**: {method1}, {method2}, ...
- **Parametrize Keys**: ({key1}, {key2}, ...)
- **Success case**: {설명}
- **Error case**: {설명}
---
## Layer: Service
### File: tests/services/test_{feature}_service.py
#### Scenario 1: {method}_success
- **Method**: `{method_name}`
- **Description**: {테스트 목적 - 한글로}
- **Dependencies to mock**: {mocking 대상}
- **Mock return type**: Factory.build() (실제 Model 인스턴스 - model_validate 필요)
- **Test Steps**:
1. Arrange: {Mock 설정}
2. Act: {메서드 호출}
3. Assert: {결과 및 호출 검증}
- **Expected**: {expected return value}
---
## Layer: Repository
### File: tests/repositories/test_{feature}_repository.py
#### Scenario 1: {method}_success
- **Method**: `{method_name}`
- **Description**: {테스트 목적 - 한글로}
- **Database setup**: Factory.create() 사용
- **Test Steps**:
1. Arrange: {테스트 데이터 생성}
2. Act: {메서드 호출}
3. Assert: {DB 상태 검증}
- **Expected**: {expected DB state/return}
assert_called_once_with 포함testing
CLAUDE.md 기반 환경 안전 체크. 작업 시작 전에 프로젝트의 안전 규칙, 컨벤션, 환경 설정을 자동 검증하여 CLEAR/WARNING/BLOCKED 상태를 보고한다. /check가 "변경 후 검증"이라면, /pre-flight는 "작업 전 환경 검증"이다. Use PROACTIVELY before starting work, especially after switching branches, pulling changes, or resuming a session. Also use when explicitly asked: "/pre-flight", "프리플라이트", "환경 체크", "작업 전 점검", "안전 체크", "environment check", "pre-flight check", "시작해도 돼?", "환경 괜찮아?", "safety check", "DB 확인", "설정 확인", "config check".
tools
PR 리뷰 워크플로우와 체크리스트를 제공하는 스킬. "PR 리뷰해줘", "코드 리뷰 해줘", "이 PR 봐줘", "review this PR" 등 PR 리뷰 요청 시 사용. GitHub/GitLab PR URL 또는 로컬 브랜치 diff를 기반으로 체계적이고 일관된 리뷰를 수행. 코드 품질, 안정성/보안, 성능, 테스트, 문서화 관점에서 건설적인 피드백 제공.
documentation
PR review comments를 체계적으로 처리하는 skill. Use when: (1) PR에 동료의 리뷰가 달렸을 때, (2) 여러 리뷰를 한 번에 처리하고 싶을 때, (3) 수정 후 commit 링크가 포함된 reply를 자동으로 추가하고 싶을 때
tools
PR diff를 받아 코드 리뷰 자동 요약을 생성하는 스킬. 핵심 변경점을 3줄로 요약하고, 변경 파일별로 what changed / why it matters / risk level을 정리. Use when: "PR 요약", "diff 요약", "PR 변경점 정리", "코드 변경 요약", "summarize PR", "PR summary", "diff summary", "what changed in this PR", "변경점 요약해줘", "PR 핵심 정리", "리뷰 요약"