test-fixing
하는 일
이 스킬은 에이전트가 테스트 모음을 실행하고, 비슷한 원인의 실패를 묶고, 가장 큰 묶음부터 고치도록 합니다. 테스트가 실패하고 있는 개발자를 위한 것입니다.
사용하는 경우
- ✓테스트 모음이 실패해서 에이전트가 문제를 찾고 고치기를 원할 때.
- ✓지속적 통합 검사가 테스트 때문에 실패할 때.
- ✓기능을 끝내고 병합하기 전에 모든 테스트가 통과하기를 원하는 경우.
스킬 링크
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/test-fixing/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“리팩터링 후 테스트가 실패하기 시작했어요. 테스트 모음이 통과하도록 고쳐 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 테스트를 실행하고 실패를 오류 유형, 모듈, 근본 원인별로 묶습니다. 그다음 코드를 읽고 작고 집중된 수정을 적용한 뒤, 각 묶음을 다시 실행해 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Test Fixing
Systematically identify and fix all failing tests using smart grouping strategies.
When to Use
- Explicitly asks to fix tests ("fix these tests", "make tests pass")
- Reports test failures ("tests are failing", "test suite is broken")
- Completes implementation and wants tests passing
- Mentions CI/CD failures due to tests
Systematic Approach
1. Initial Test Run
Run make test to identify all failing tests.
Analyze output for:
- Total number of failures
- Error types and patterns
- Affected modules/files
2. Smart Error Grouping
Group similar failures by:
- Error type: ImportError, AttributeError, AssertionError, etc.
- Module/file: Same file causing multiple test failure
- Root cause: Missing dependencies, API changes, refactoring impacts
Prioritize groups by:
- Number of affected tests (highest impact first)
- Dependency order (fix infrastructure before functionality)
3. Systematic Fixing Process
For each group (starting with highest impact):
Identify root cause
- Read relevant code
- Check recent changes with
git diff - Understand the error pattern
Implement fix
- Use Edit tool for code changes
- Follow project conventions (see CLAUDE.md)
- Make minimal, focused changes
Verify fix
- Run subset of tests for this group
- Use pytest markers or file patterns:
uv run pytest tests/path/to/test_file.py -v uv run pytest -k "pattern" -v - Ensure group passes before moving on
Move to next group
4. Fix Order Strategy
Infrastructure first:
- Import errors
- Missing dependencies
- Configuration issues
Then API changes:
- Function signature changes
- Module reorganization
- Renamed variables/functions
Finally, logic issues:
- Assertion failures
- Business logic bugs
- Edge case handling
5. Final Verification
After all groups fixed:
- Run complete test suite:
make test - Verify no regressions
- Check test coverage remains intact
Best Practices
- Fix one group at a time
- Run focused tests after each fix
- Use
git diffto understand recent changes - Look for patterns in failures
- Don't move to next group until current passes
- Keep changes minimal and focused
Example Workflow
User: "The tests are failing after my refactor"
- Run
make test→ 15 failures identified - Group errors:
- 8 ImportErrors (module renamed)
- 5 AttributeErrors (function signature changed)
- 2 AssertionErrors (logic bugs)
- Fix ImportErrors first → Run subset → Verify
- Fix AttributeErrors → Run subset → Verify
- Fix AssertionErrors → Run subset → Verify
- Run full suite → All pass ✓
자주 묻는 질문
테스트를 바꾸나요, 코드를 바꾸나요?
원인에 따라 둘 중 하나 또는 둘 다 바꿀 수 있으며, 최소한의 집중된 변경을 하도록 요구받습니다.
무엇부터 고칠지 어떻게 정하나요?
가장 많은 테스트에 영향을 주는 묶음부터 시작하며, 공유 설정 문제를 기능 문제보다 먼저 고칩니다.
특정 명령이 필요한가요?
먼저 make test를 실행하므로, 프로젝트에 그 명령이 있을 때 가장 잘 작동합니다.
상세 정보
작성자의 원본 설명
Run tests and systematically fix all failing tests using smart error grouping. Use when user asks to fix failing tests, mentions test failures, runs test suite and failures occur, or requests to make tests pass.
인기도
- GitHub 스타
- 33k
- 순위
- #8807
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
owasp-security
33k웹 앱, API, 모바일, 컨테이너, AI 에이전트를 위한 OWASP 보안 지침을 따르도록 해서, 흔한 약점을 찾고 수정안을 제안하게 합니다.
agent-management
33k에이전트가 AI Maestro 명령줄을 사용해 AI 에이전트를 만들고, 나열하고, 일시 정지하고, 깨우고, 이름을 바꾸고, 삭제하도록 돕습니다.
agent-messaging
33k에이전트가 Agent Messaging Protocol로 AI 에이전트 사이에 서명된 메시지를 보내고, 받고, 답하도록 돕습니다. 대부분 내 컴퓨터에서 작동합니다.
docs-search
33k에이전트가 자동 생성된 코드 문서에서 함수 시그니처, 클래스 정의, 주석을 검색하도록 해서, 코드를 바꾸기 전에 실제 API를 확인하게 합니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.