python-code-review skill
PEP8 준수 여부, 타입 안정성, 비동기 패턴, 에러 핸들링 및 일반적인 코딩 실수를 검토합니다.
- GitHub 스타
- 87
- 파일
- 6
- 마지막 커밋
- 2026년 9월 15일
- 라이선스
- Apache-2.0
- 허용된 도구
- —
python-code-review skill은 무엇을 하나요?
python-code-review은(는) agent skill입니다. PEP8 준수 여부, 타입 안정성, 비동기 패턴, 에러 핸들링 및 일반적인 코딩 실수를 검토합니다.
skill의 SKILL.md에서 생성된 요약입니다.
python-code-review skill 정보
이 SKILL은 Python 파일의 구조적 및 스타일적 정확성을 분석할 수 있게 해줍니다. 개발자는 .py 파일을 로드하여 PEP8 준수 여부, 타입 안정성 및 적절한 비동기 패턴을 감사하는 데 사용합니다. 에이전트가 이 SKILL을 로드하면 pep8-style.md, type-safety.md, async-patterns.md와 같은 특정 참조 파일을 기준으로 코드를 검사하여 고품질 구현을 보장합니다.
이 도구는 비동기 함수 내의 블로킹 호출, 누락된 타입 힌트 또는 부적절한 예외 처리와 같은 문제를 식별합니다. 실제 에러와 타입 미지정 라이브러리를 위한 Any 사용 또는 noqa 주석 활용과 같은 유효한 패턴을 구분합니다. 프로세스는 컨텍스트 기반 규칙에 따라 발견 사항을 검증하고 결과를 제시하기 전 필수 검증 프로토콜을 거치는 엄격한 보고 워크플로우를 따릅니다.
가변 기본 인자, 적절한 임포트 그룹화 및 올바른 명명 규칙을 확인하여 전문적인 코드베이스를 유지하도록 돕습니다. 식별된 모든 문제에 대해 구체적인 파일 경로와 줄 번호가 포함된 상세 보고서를 생성합니다.
agent가 수행할 수 있는 작업
- 1PEP8 준수 감사Python 파일이 표준 들여쓰기, 줄 길이 및 명명 규칙을 따르는지 확인합니다.
- 2타입 안정성 검증모든 함수 파라미터와 반환 타입에 적절한 타입 힌트가 있는지 확인합니다.
- 3비동기 병목 현상 탐지비동기 함수 내부의 time.sleep 또는 requests와 같은 블로킹 호출을 식별합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
python-code-review skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.플러그인에 python-code-review skill 설치
/plugin marketplace add existential-birds/beagle /plugin install beagle-python@existential-birds
Claude Code에 python-code-review skill 설치
~/.claude/skills/python-code-review/SKILL.md
$ npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review ~/.claude/skills/python-code-reviewClaude Code (project)에 python-code-review skill 설치
.claude/skills/python-code-review/SKILL.md
$ npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review .claude/skills/python-code-reviewCodex에 python-code-review skill 설치
~/.agents/skills/python-code-review/SKILL.md
$ npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review ~/.agents/skills/python-code-reviewGemini CLI에 python-code-review skill 설치
~/.gemini/skills/python-code-review/SKILL.md
$ npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review ~/.gemini/skills/python-code-reviewClaude.ai에 python-code-review skill 설치
npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review python-code-review && zip -r python-code-review.zip python-code-review # claude.ai → Customize → Skills → + → Create skill → Upload a skill → python-code-review.zip
SKILL.md
GitHub에서 보기Python Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
| Indentation, line length, whitespace, naming | references/pep8-style.md |
| Missing/wrong type hints, Any usage | references/type-safety.md |
| Blocking calls in async, missing await | references/async-patterns.md |
| Bare except, missing context, logging | references/error-handling.md |
| Mutable defaults, print statements | references/common-mistakes.md |
Review Checklist
PEP8 Style
- 4-space indentation (no tabs)
- Line length ≤79 characters (≤72 for docstrings/comments)
- Two blank lines around top-level definitions, one within classes
- Imports grouped: stdlib → third-party → local (blank line between groups)
- No whitespace inside brackets or before colons/commas
- Naming:
snake_casefor functions/variables,CamelCasefor classes,UPPER_CASEfor constants - Inline comments separated by at least two spaces
Type Safety
- Type hints on all function parameters and return types
- No
Anyunless necessary (with comment explaining why) - Proper
T | Nonesyntax (Python 3.10+)
Async Patterns
- No blocking calls (
time.sleep,requests) in async functions - Proper
awaiton all coroutines
Error Handling
- No bare
except:clauses - Specific exception types with context
-
raise ... fromto preserve stack traces
Common Mistakes
- No mutable default arguments
- Using
loggernotprint()for output - f-strings preferred over
.format()or%
Valid Patterns (Do NOT Flag)
These patterns are intentional and correct - do not report as issues:
- Type annotation vs type assertion - Annotations declare types but are not runtime assertions; don't confuse with missing validation
- Using
Anywhen interacting with untyped libraries - Required when external libraries lack type stubs - Empty
__init__.pyfiles - Valid for package structure, no code required noqacomments - Valid when linter rule doesn't apply to specific case- Using
cast()after runtime type check - Correct pattern to inform type checker of narrowed type
Context-Sensitive Rules
Only flag these issues when the specific conditions apply:
| Issue | Flag ONLY IF |
|---|---|
| Generic exception handling | Specific exception types are available and meaningful |
| Unused variables | Variable lacks _ prefix AND isn't used in f-strings, logging, or debugging |
Gates (reporting workflow)
Complete in order. Do not advance until each pass condition is met.
- Scope — Pass: You list every
.pypath (or explicit glob) you inspected this run. - False-positive screen — Pass: For each issue you plan to report, you checked Valid Patterns and Context-Sensitive Rules above; you drop or narrow the finding if those sections say not to flag it.
- Evidence — Pass: Each remaining finding includes
[FILE:LINE](or a bounded line range). Symbols or short verbatim snippets may supplement the location anchor but do not replace it. - Verification protocol — Pass: You load review-verification-protocol and complete its mandatory steps for each reported issue before the user-facing write-up.
- Ship — Pass: The user-visible output matches whatever structure that protocol requires (no issues-only dump that skips its checks).
When to Load References
- Reviewing code formatting/style → pep8-style.md
- Reviewing function signatures → type-safety.md
- Reviewing
async deffunctions → async-patterns.md - Reviewing try/except blocks → error-handling.md
- General Python review → common-mistakes.md
Review Questions
- Does the code follow PEP8 formatting (indentation, line length, whitespace)?
- Are imports properly grouped (stdlib → third-party → local)?
- Do names follow conventions (snake_case, CamelCase, UPPER_CASE)?
- Are all function signatures fully typed?
- Are async functions truly non-blocking?
- Do exceptions include meaningful context?
- Are there any mutable default arguments?
Before reporting: complete Gates (reporting workflow) above (especially gate 4).
이 스킬의 파일
6python-code-review skill 질문
Claude Code에 python-code-review skill을 어떻게 설치하나요?
npx degit existential-birds/beagle/plugins/beagle-python/skills/python-code-review ~/.claude/skills/python-code-review를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
python-code-review skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
이 SKILL은 어떤 특정 Python 스타일 가이드를 따르나요?
들여쓰기, 줄 길이, 공백 및 명명 규칙에 대해 PEP8 표준을 따릅니다.
'Any' 타입 힌트는 언제 사용하는 것이 적절한가요?
타입 스텁이 없는 타입 미지정 라이브러리와 상호작용할 때는 'Any'를 사용할 수 있지만, 그 이유를 설명하는 주석을 함께 작성해야 합니다.