platforms/linux/.claude/skills/python-runner/SKILL.md
Python 프로젝트 실행, 테스트, 문법 검사, 임포트 검증을 위한 스킬. `scripts/python-runner.sh`를 사용합니다.
npx skillsauth add taksung/python-katas python-runnerInstall 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.
이 스킬은 scripts/python-runner.sh 래퍼 스크립트를 사용하여 .venv 가상환경에서 Python 프로젝트를 실행, 테스트 및 검증합니다.
모든 명령어는 .katarc 파일에 정의된 현재 kata 프로젝트의 컨텍스트에서 실행됩니다.
모든 기능은 ./scripts/python-runner.sh를 통해 접근합니다.
| 작업 | 명령어 | 설명 |
|---|---|---|
| 테스트 실행 | ./scripts/python-runner.sh test [test_path] | 모든 테스트 또는 특정 테스트 실행 |
| 프로젝트 실행 | ./scripts/python-runner.sh run [module] | Python 모듈 실행 (기본값: {CURRENT_KATA}.main) |
| 문법 검사 | ./scripts/python-runner.sh syntax-check <file_path> | Python 파일 문법 검사 |
| 임포트 검증 | ./scripts/python-runner.sh import-check | 임포트 전략 검증 (절대 임포트) |
| 정리 | ./scripts/python-runner.sh clean | 빌드 아티팩트 삭제 (__pycache__, .pyc 등) |
| 도움말 | ./scripts/python-runner.sh help | 사용 가능한 모든 명령어 확인 |
사용자 요청:
"테스트 돌려줘"
스킬 동작:
./scripts/python-runner.sh test
사용자 요청:
"게임 테스트만 실행해줘"
스킬 동작:
./scripts/python-runner.sh test hidden-number/tests/test_game.py
사용자 요청:
"main.py 실행해줘"
스킬 동작:
./scripts/python-runner.sh run
사용자 요청:
"game.py 파일 문법 검사해줘"
스킬 동작:
./scripts/python-runner.sh syntax-check hidden-number/domain/game.py
사용자 요청:
"임포트 제대로 됐는지 확인해줘"
스킬 동작:
./scripts/python-runner.sh import-check
출력 예시:
==> Executing in venv for kata 'hidden-number': ...
1. Searching for relative imports (should be none):
✅ No relative imports found
2. Searching for imports without package name (should be none):
✅ No imports without package name found
3. Testing pytest collection (validates all imports):
collected 10 items
사용자 요청:
"캐시 파일 정리해줘"
스킬 동작:
./scripts/python-runner.sh clean
이 프로젝트는 다음 임포트 전략을 따릅니다:
# ✅ 올바른 임포트
from hidden-number.domain.game import Game
from hidden-number.app.game_service import GameService
from hidden-number.infra.random_generator import RandomGenerator
# ❌ 잘못된 임포트 (같은 패키지 내에서도 절대 임포트 권장)
from .game import Game
from ..domain.game import Game
Case 1: 상대 임포트 → 절대 임포트
# Before (잘못됨)
from .game import Game
# After (올바름)
from hidden-number.domain.game import Game
Case 2: 패키지명 누락
# Before (잘못됨)
from domain.game import Game
# After (올바름)
from hidden-number.domain.game import Game
Case 3: 순환 임포트 문제
# 해결 방법 1: TYPE_CHECKING 사용
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from hidden-number.domain.game import Game
# 해결 방법 2: 늦은 임포트 (함수 내부)
def some_function():
from hidden-number.domain.game import Game
# ...
.venv 가상환경이 존재해야 합니다.katarc에서 CURRENT_KATA 값을 읽어 작업 대상 결정문제: .venv not found
# 가상환경 생성
uv venv
uv sync
문제: ModuleNotFoundError
# 프로젝트 재설치
uv pip install -e .
문제: pytest 찾을 수 없음
# pytest 설치
uv pip install pytest
tools
학습 중 떠오른 아이디어와 메모를 아카이브 파일에 시간순으로 기록합니다. `scripts/study-note-helper.sh`를 사용하여 현재 KATA 프로젝트의 docs/study/아카이브.md에 노트를 추가합니다.
tools
Git 저장소의 변경사항을 추적하고 요약합니다. 미커밋 코드, 최근 커밋, 커밋 히스토리를 확인할 때 사용하세요. catchup, 변경사항, git diff, 커밋 히스토리, 작업 내용 파악 등의 키워드에 반응합니다.
tools
Claude 스킬을 생성하고 작성하는 것을 도와줍니다. 새로운 스킬 만들기, 스킬 작성 가이드, 베스트 프랙티스 적용 등의 키워드에 반응합니다.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.