pre-submit-pr

작성자: huggingface

풀 리퀘스트를 제출하기 전에 변경 사항을 검증합니다. 린트, 테스트, 정렬 검토 및 RFC 분석을 포함한 포괄적인 검사를 실행합니다. 생성하기 전에 사용합니다…

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의 다른 스킬

sync-models
huggingface
chat-ui의 모델 구성을 HuggingFace 라우터와 동기화 — 새 모델에 대한 설명을 추가하고, 추론 기능이 있는 모델을 표시하며, 32B 이상 모델에 대해 아티팩트를 활성화합니다…
custom-blocks
huggingface
Use when the user has written (or wants to write) a `ModularPipelineBlocks` subclass in a local Python file and needs to package it into a Hub-uploadable…
self-review
huggingface
Use before opening a PR, or whenever asked to self-review a diffusers contribution. Applies the same rubric as the `@claude` CI (checks the diff against…
hf-cloud-sagemaker-production-defaults
huggingface
SageMaker 엔드포인트(실시간 또는 비동기)를 생성하며, 자동 확장, CloudWatch 알람, 태깅이 기본적으로 활성화됩니다. 이 스킬은 엔드포인트를 생성하려고 할 때마다 사용하세요.
hf-cloud-serving-image-selection
huggingface
SageMaker 모델 배포에 적합한 서빙 컨테이너를 선택하고 현재 이미지 URI를 찾습니다. 모델을 배포하려 할 때마다 이 스킬을 사용하세요.
Hugging Face Cli
huggingface
Execute Hugging Face Hub operations using the `hf` CLI. Use when the user needs to download models/datasets/spaces, upload files to Hub repositories, create repos, manage local cache, or run compute jobs on HF infrastructure. Covers authentication, file transfers, repository creation, cache operations, and cloud compute.
Hugging Face Datasets
huggingface
허깅 페이스 허브에서 데이터셋을 생성하고 관리합니다. 리포지토리 초기화, 설정/시스템 프롬프트 정의, 행 업데이트 스트리밍, SQL 기반 데이터셋 쿼리/변환을 지원합니다. 포괄적인 데이터셋 워크플로를 위해 HF MCP 서버와 함께 작동하도록 설계되었습니다.
Hugging Face Evaluation
huggingface
Hugging Face 모델 카드에 평가 결과를 추가하고 관리합니다. README 콘텐츠에서 평가 테이블 추출, Artificial Analysis API에서 점수 가져오기, vLLM/lighteval을 사용한 사용자 정의 모델 평가 실행을 지원합니다. model-index 메타데이터 형식과 함께 작동합니다.