mcpbeat Sign in

Pre Submit Pr Skill for Claude

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.

968 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
2474
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/huggingface/OpenEnv --skill pre-submit-pr

The instruction itself

5 sections, as written by the author

Pre-Submit PR Check

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

Instructions

  • 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
  • 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
  • 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
  • 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
  • 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
  • Summarize PR readiness:
  • List all blocking issues
  • List all discussion points for reviewers
  • Provide overall verdict
  • 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)

Other skills for the same job

different authors, same section of the catalogue
Receiving Code Review
by ZhanlinCui
×7

Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation

2k tokens
Requesting Code Review
by ZhanlinCui
×6

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

2k tokens
Git Commit
by github
vendor ×3

Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping

799 tokens
Github Code Review
by ComeOnOliver
×3

Comprehensive GitHub code review with AI-powered swarm coordination

13k tokens
Karpathy Guidelines
by hyyhf
×3

Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.

629 tokens
Code Reviewer
by google-gemini
vendor ×2

Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.

795 tokens
Agent MD Refactor
by softaworks
×2

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.

4k tokens
Commit Work
by softaworks
×2

Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.

2k tokens

How to use it

Copy the folder

Take huggingface/pre-submit-pr from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

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.