huggingface/pre-submit-pr
Validate changes before submitting a pull request. Run comprehensive checks including lint, tests, alignment review, and RFC analysis. Use before creating a PR, when asked if code is ready for review, or before pushing for PR.
npx skills add https://github.com/huggingface/OpenEnv --skill pre-submit-pr
Comprehensive validation before submitting a pull request. Run this before creating or updating a PR.
git fetch origin main to get latest maingit rev-list --count HEAD..origin/main to check commits behindgit merge origin/mainbash .claude/hooks/lint.sh - format check (includes ruff format + ruff check)bash .claude/hooks/test.sh - run testsbash .claude/hooks/check-debug.sh - find debug code.claude/docs/PRINCIPLES.md and .claude/docs/INVARIANTS.mdsrc/openenv/core/, flag for RFC considerationrfcs/ for conflicts.claude/docs/REPO_WALKTHROUGH.md against the current repo structuresrc/, envs/, .claude/, or rfcs//update-docs before PRbash .claude/hooks/post-push-pr.shPR description quality, CI check status
## 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]
The following issues block PR submission:
These should be noted in PR but don't block:
Take huggingface/pre-submit-pr from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.