pre-submit-pr
Automated pre-submission validation for quality control.
Install
mkdir -p .claude/skills/pre-submit-pr && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9031" && unzip -o skill.zip -d .claude/skills/pre-submit-pr && rm skill.zipInstalls to .claude/skills/pre-submit-pr
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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.Key capabilities
- →Run linting
- →Execute tests
- →Check alignment
- →Verify documentation
How it works
It runs automated hooks and checks changes against repository principles and invariants.
Inputs & outputs
When to use pre-submit-pr
- →Run linting and test suites
- →Verify architectural alignment
- →Check if documentation matches code structure
About this skill
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 mainto get latest main - Run
git rev-list --count HEAD..origin/mainto 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
-
Run all automated hooks:
bash .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
-
Run alignment review:
- Read
.claude/docs/PRINCIPLES.mdand.claude/docs/INVARIANTS.md - Compare changes against principles and invariants
- Identify Tier 1 (mechanical) and Tier 2 (alignment) issues
- Read
-
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
- If changes touch
-
Documentation freshness check:
- Review
.claude/docs/REPO_WALKTHROUGH.mdagainst 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/, orrfcs/ - 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-docsbefore PR
- Review
-
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)
When not to use it
- →When branch is out of date with main
Prerequisites
Limitations
- →Requires manual merge if out of date
How it compares
It prevents merge conflicts and ensures architectural alignment before submission.
Compared to similar skills
pre-submit-pr side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| pre-submit-pr (this skill) | 0 | 6mo | No flags | Intermediate |
| verify | 6 | 6mo | No flags | Beginner |
| code-change-verification | 4 | 4mo | Review | Beginner |
| springboot-verification | 4 | 4mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by meta-pytorch
View all by meta-pytorch →You might also like
verify
Use when you want to validate changes before committing, or when you need to check all React contribution requirements.
code-change-verification
openai
Run the mandatory verification stack when changes affect runtime code, tests, or build/test behavior in the OpenAI Agents Python repository.
springboot-verification
affaan-m
Verification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.
moai-workflow-testing
modu-ai
Comprehensive development workflow specialist combining DDD testing, debugging, performance optimization, code review, PR review, and quality assurance into unified development workflows
resolve-checks
flowglad
Resolve all failing CI checks and address PR review feedback on the current branch's PR. Runs tests locally, fixes failures, incorporates valid review comments, and resolves addressed feedback. Use when CI is red, after receiving PR feedback, or before merging.
verification-quality-assurance
ruvnet
Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.