Community코딩 & 개발github.com

pytorch/pr-review

PyTorch Pull Request 리뷰: 코드 품질, 테스트 커버리지, 보안 및 하위 호환성을 검토합니다. PR 검토 시, 코드 변경 검토 요청 시, 또는 사용자가 'PR 리뷰', '코드 리뷰', '이 PR 확인' 등을 언급할 때 사용하세요.

pr-review란 무엇인가요?

이 스킬은 PyTorch 저장소의 Pull Request를 체계적으로 검토하여 코드 품질, 테스트 커버리지, 보안 취약점, 그리고 하위 호환성 문제를 자동으로 분석합니다. 개발자가 PR을 제출하거나 코드 리뷰를 요청할 때 활성화되며, 변경된 코드의 논리적 오류, 스타일 가이드 준수 여부, 누락된 테스트, 잠재적 보안 위험 및 기존 기능과의 호환성 깨짐을 식별합니다. 주로 GitHub와 연동된 AI 코딩 에이전트(예: Claude Code, Cursor, Copilot 등)에서 사용되며, 리뷰 결과를 PR 코멘트로 바로 제안할 수 있습니다. SKILL.md 문서에 정의된 리뷰 규칙을 기반으로 동작하며, PyTorch의 엄격한 코드 품질 기준을 따르도록 설계되었습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/pytorch/pytorch/tree/main/skills/pr-review

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

pr-review은(는) 무엇을 하나요?

PyTorch 풀 리퀘스트를 코드 품질, 테스트 커버리지, 보안 및 하위 호환성 측면에서 검토합니다. PR을 검토할 때, 코드 변경 사항을 검토하라는 요청을 받았을 때, 또는 사용자가 "PR 리뷰", "코드 리뷰", "이 PR 확인" 등을 언급할 때 사용하세요.

사용법

이 스킬은 PyTorch 저장소의 PR을 자동으로 분석하고 리뷰 코멘트를 생성합니다. 다음과 같은 경우에 활성화됩니다:

  • PR이 생성되거나 업데이트될 때
  • 사용자가 /review 명령을 사용할 때
  • 사용자가 리뷰를 요청하는 메시지를 보낼 때

리뷰 항목

스킬은 다음 항목을 확인합니다:

  • 코드 품질: 코드 스타일, 명확성, 모범 사례 준수 여부
  • 테스트 커버리지: 새로운 코드에 대한 적절한 테스트 존재 여부
  • 보안: 잠재적 취약점 또는 안전하지 않은 패턴
  • 하위 호환성: 기존 API 및 동작과의 호환성 깨짐 여부

리뷰 프로세스

  1. PR의 변경 사항(diff)을 가져옵니다.
  2. 변경된 파일과 관련 컨텍스트를 분석합니다.
  3. 위 항목에 따라 리뷰를 수행합니다.
  4. 발견된 문제에 대한 리뷰 코멘트를 생성합니다.
  5. 코멘트를 PR에 제출합니다.

예시 응답 형식

리뷰 결과는 다음과 같은 형식으로 제공됩니다:

## PR 리뷰: #1234

### 코드 품질
- ✅ 일관된 코드 스타일
- ⚠️ `torch.no_grad()` 컨텍스트 매니저 사용 고려 (성능 최적화)

### 테스트 커버리지
- ❌ 새로운 함수 `new_feature()`에 대한 테스트가 누락되었습니다.

### 보안
- ✅ 알려진 보안 문제 없음

### 하위 호환성
- ✅ 기존 API와 호환됨

구성

이 스킬은 추가 구성 없이 기본적으로 작동합니다. 하지만 특정 저장소나 브랜치에 맞게 조정이 필요할 수 있습니다.

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

pytorch/add-uint-support

Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.

pytorch/aoti-debug

Debug AOTInductor (AOTI) errors and crashes. Use when encountering AOTI segfaults, device mismatch errors, constant loading failures, or runtime errors from aot_compile, aot_load, aoti_compile_and_package, or aoti_load_package.

pytorch/at-dispatch-v2

Convert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code. Use when porting AT_DISPATCH_ALL_TYPES_AND*, AT_DISPATCH_FLOATING_TYPES*, or other dispatch macros to the new v2 API. For ATen kernel files, CUDA kernels, and native operator implementations.

pytorch/docstring

Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.

pytorch/metal-kernel

Write Metal/MPS kernels for PyTorch operators. Use when adding MPS device support to operators, implementing Metal shaders, or porting CUDA kernels to Apple Silicon. Covers native_functions.yaml dispatch, host-side operators, and Metal kernel implementation.

pytorch/pyrefly-type-coverage

Migrate a file to use stricter Pyrefly type checking with annotations required for all functions, classes, and attributes.

pytorch/skill-writer

Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.

pytorch/triaging-issues

Triages GitHub issues by routing to oncall teams, applying labels, and closing questions. Use when processing new PyTorch issues or when asked to triage an issue.

관련 스킬