Open PR with pre-flight checks

VerifiedSafe

Push a branch and open a pull request after automatic pre-flight checks (build, clippy, tests, rebase).

Sby Skills Guide Bot
DevelopmentIntermediate
8/9/2026
Claude Code
#git#pull-request#rust#cargo#pre-flight-checks

Recommended for

Automated summary

Automates pushing a branch and opening a pull request after a series of pre-flight checks (rebase, build, clippy, tests, working-tree state).

Strengths

  • Runs checks in a strict order and stops at the first failure, preventing broken code from being pushed.
  • Supports a --dry-run mode that runs only the checks without pushing or creating a PR.
  • Prints a diff and commit summary (--stat and --oneline) before anything is published.
  • Explicitly forbids pushing straight to main and accepts a user-supplied PR title.

Limitations

  • Heavily Rust-specific: the cargo build/clippy/test commands and the nalgebra feature are hardcoded.
  • Relies on the GitHub MCP tool mcp__github__create_pull_request to create the PR.
  • On rebase failure it only reports the conflict rather than resolving it.
When to use it

Use it when a Rust feature branch is ready and you want to publish it as a clean PR after full validation.

When not to use it

Avoid it on non-Rust projects, without access to the GitHub MCP tool, or when the rebase must be handled interactively by hand.

Security analysis

Safe
Quality score88/100

The skill performs standard development workflow actions (git fetch/rebase/push, cargo build/test/clippy, and PR creation via GitHub MCP). No destructive commands, secret exfiltration, or unsafe network behavior are present. The actions are legitimate and scoped to the repository.

No concerns found

How this analysis is made

Examples

Standard push and PR
Push my current branch and open a PR against main, running all the pre-flight checks first.
Dry run only
/pr --dry-run — just run the rebase, build, clippy and test checks and tell me if anything fails, don't push.
Custom PR title
/pr "Add SIMD-accelerated matrix multiply for nalgebra backend"

name: pr description: Push a branch and open a PR with pre-flight checks user-invocable: true

Push PR

Push the current branch and open a pull request, with pre-flight hygiene checks.

Arguments

  • No arguments: run all checks, push, and open PR
  • --dry-run: run checks only, don't push or create PR
  • A PR title in quotes: use as the PR title instead of generating one

Pre-flight checks (all must pass before pushing)

Run these steps in order. Stop on first failure.

1. Rebase on latest main

git fetch origin main
git rebase origin/main

If rebase fails, stop and report the conflict.

2. Build

cargo build --features nalgebra

3. Clippy (deny warnings)

cargo clippy --all-targets --features nalgebra -- -D warnings

4. Test

cargo test --features nalgebra

5. Check for uncommitted changes

git status

If there are unstaged changes, stop and ask the user what to do.

6. Review the diff

Run git diff origin/main...HEAD --stat and git log --oneline origin/main..HEAD to summarize what's being pushed. Show this to the user.

Push and create PR

Only after all checks pass:

  1. Push the branch: git push -u origin <branch-name>
  2. Create the PR using the GitHub MCP tool mcp__github__create_pull_request
  3. Base branch: main
  4. Title: use the provided title, or generate one from the commit messages
  5. Body: include a ## Summary section with bullet points describing changes, and a ## Test plan section

Rules

  • Do NOT push to main directly — always use a feature branch
  • Do NOT include Claude session links in the PR body or commits
  • If --dry-run was passed, stop after the checks and report results
  • If any check fails, do NOT push. Fix the issue or report it to the user.
  • Keep API_COVERAGE.md in sync if any safe wrappers were added or changed

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/open-pr-with-pre-flight-checks-msl9cejk/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/open-pr-with-pre-flight-checks-msl9cejk' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/open-pr-with-pre-flight-checks-msl9cejk/download' --output '.skill-downloads/open-pr-with-pre-flight-checks-msl9cejk/SKILL.md.part' && mv '.skill-downloads/open-pr-with-pre-flight-checks-msl9cejk/SKILL.md.part' '.skill-downloads/open-pr-with-pre-flight-checks-msl9cejk/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/open-pr-with-pre-flight-checks-msl9cejk/SKILL.md' && test -s '.skill-downloads/open-pr-with-pre-flight-checks-msl9cejk/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/open-pr-with-pre-flight-checks-msl9cejk' '.claude/skills/pr'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/open-pr-with-pre-flight-checks-msl9cejk'

openskills read 'open-pr-with-pre-flight-checks-msl9cejk'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/open-pr-with-pre-flight-checks-msl9cejk/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills