pre-submit-pr

작성자: huggingface

Validate changes before submitting a pull request. Run comprehensive checks including lint, tests, alignment review, and RFC analysis. Use before creating a…

npx skills add https://github.com/huggingface/openenv --skill pre-submit-pr

Pre-Submit PR Check

Comprehensive validation before submitting a pull request. Run this before creating or updating a PR.

Instructions

  1. Check branch freshness (BLOCKING):

    • Run git fetch origin main to get latest main
    • Run git rev-list --count HEAD..origin/main to check commits behind
    • If > 0 commits behind, merge main before proceeding: git merge origin/main
    • This prevents "branch out of date" issues on GitHub
  2. Run all automated hooks:

    • bash .claude/hooks/lint.sh - format check (includes ruff format + ruff check)
    • bash .claude/hooks/test.sh - run tests
    • bash .claude/hooks/check-debug.sh - find debug code
  3. Run alignment review:

    • Read .claude/docs/PRINCIPLES.md and .claude/docs/INVARIANTS.md
    • Compare changes against principles and invariants
    • Identify Tier 1 (mechanical) and Tier 2 (alignment) issues
  4. RFC check:

    • If changes touch src/openenv/core/, flag for RFC consideration
    • If any public API signatures change, RFC required
    • Check against existing RFCs in rfcs/ for conflicts
  5. Documentation freshness check:

    • Review .claude/docs/REPO_WALKTHROUGH.md against the current repo structure
    • If the PR adds new directories, moves files, or changes structure significantly:
      • Update REPO_WALKTHROUGH.md to reflect the changes
      • Include these updates in the PR
    • Check triggers: new directories in src/, envs/, .claude/, or rfcs/
    • Check if any public API signatures changed (function/class renames, new params):
      • Search for references in docs/, examples/, README.md, other .py docstrings
      • If stale references found, recommend running /update-docs before PR
  6. Summarize PR readiness:

    • List all blocking issues
    • List all discussion points for reviewers
    • Provide overall verdict
  7. After push/PR creation, run the post-push check:

    • bash .claude/hooks/post-push-pr.sh
    • Verifies: PR is open, no merge conflicts, branch freshness, PR description quality, CI check status

Output Format

## Pre-Submit PR Report

### Branch Freshness
| Check | Status | Details |
|-------|--------|---------|
| Up to date with main | YES/NO | [X commits behind, merged if needed] |

### Automated Checks
| Check | Status | Details |
|-------|--------|---------|
| Lint | PASS/FAIL | [summary] |
| Tests | PASS/FAIL | [X passed, Y failed] |
| Debug code | CLEAN/FOUND | [details] |

### Alignment Review

#### Tier 1: Fixes Required (blocking)
- [ ] path/file.py:123 - [issue description]

#### Tier 2: Discussion Points (flag for reviewers)
[ALIGNMENT FLAGS or "None identified"]

### Invariant Check
[List any invariants at risk, or "All invariants maintained"]

### RFC Status
[NOT REQUIRED / RECOMMENDED / REQUIRED: reason]

### Documentation Freshness
[UP TO DATE / UPDATED: list of changes made to REPO_WALKTHROUGH.md]
[STALE DOCS: run /update-docs — list of stale references found]

### Verdict: READY FOR PR / ISSUES TO ADDRESS

### Summary for PR Description
[2-3 sentences summarizing changes for the PR description]

Blocking Issues

The following issues block PR submission:

  • Branch out of date with main (must merge first)
  • Lint failures
  • Test failures
  • Debugger statements (breakpoint, pdb)
  • Invariant violations
  • RFC required but not written

Non-Blocking (Flag for Reviewers)

These should be noted in PR but don't block:

  • Alignment discussion points (Tier 2)
  • RFC recommended (optional)
  • TODOs in code
  • Print statements (unless in core code)

huggingface의 다른 스킬

cpu-kernels
huggingface
C++ CPU 커널을 SIMD 내장 함수(AVX2/AVX512)로 작성, 최적화 및 벤치마킹하는 방법에 대한 지침을 제공하며, Hugging Face 커널 생태계를 대상으로 합니다. 포함 사항…
official
generate-openenv-env
huggingface
구체적인 사용 사례(예: "라이브러리 textarena를 위한 환경 생성")로부터 OpenEnv 환경을 생성합니다. 새로운 환경을 설계하거나 구현하라는 요청을 받았을 때 사용하세요.
official
hf-mcp
huggingface
Hugging Face Hub를 MCP 서버 도구를 통해 사용하세요. 모델, 데이터셋, 스페이스, 논문을 검색하고, 저장소 세부 정보를 확인하며, 문서를 가져오고, 컴퓨팅 작업을 실행하고, Gradio를 사용할 수 있습니다…
official
trl-training
huggingface
트랜스포머 언어 모델을 TRL(Transformers Reinforcement Learning)을 사용하여 학습 및 미세 조정합니다. SFT, DPO, GRPO, KTO, RLOO 및 보상 모델 학습을 지원합니다…
official
deploy-hf
huggingface
OpenEnv 환경을 Hugging Face Spaces에 배포합니다. 배포, Hugging Face로 푸시, 또는 스페이스 업데이트를 요청받았을 때 사용하세요.
official
hf-space-recovery
huggingface
Diagnose and recover failing or stuck Hugging Face Space deployments for OpenEnv environments. Use when deploying envs from `envs/` to the Hub (`openenv`…
official
example-skill
huggingface
액션 스모크 테스트용 예제 픽스처 스킬
official
cuda-kernels
huggingface
NVIDIA GPU(H100, A100, T4)에서 HuggingFace diffusers 및 transformers를 대상으로 최적화된 CUDA 커널 작성 및 벤치마킹을 위한 지침을 제공합니다…
official