Agent skill

PR Preflight Check

by liaohch3 in liaohch3/claude-tap

Runs a single merge-readiness check on a pull request: metadata, GitHub Actions status, local lint, format and test gates, and PR body rules, ending in READY or NOT_READY.

MITAuto-check passedDevelopment

Install PR Preflight Check

skills CLI
$ npx skills add liaohch3/claude-tap --skill pr-preflight -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install liaohch3/claude-tap pr-preflight --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/liaohch3/claude-tap.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/pr-preflight .claude/skills/pr-preflight && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pr-preflight
GitHub stars
3.3k
Token cost
~615 tokens
SKILL.md length
236 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Runs a single merge-readiness check on a pull request: metadata, GitHub Actions status, local lint, format and test gates, and PR body rules, ending in READY or NOT_READY.

  • Works in 5 steps: PR metadata — fetches title, state,… → CI checks — counts pass/fail/pending… → Local gates — runs lint, format, and… → …
  • Checking a pull request is ready before asking for review
  • SKILL.md covers Check an existing PR, Run local gates only (no PR…, What blocks merge and Typical workflow
  • Calls uv, git and gh

What it does

Given a pull request number, `scripts/check_pr.sh` fetches the title, state, draft status, merge state and branch, counts passing, failing and pending GitHub Actions checks, runs the local gates and validates the PR body for required sections, evidence links and blocked artifacts. The local gates here are `uv run ruff check .`, `uv run ruff format --check .` and `uv run pytest tests/ -x --timeout=60`. Flags let you override the repository, which is otherwise detected through `gh`, or skip the local tests with `--no-tests`.

The verdict is READY or NOT_READY with specific reasons. Exit code 0 means ready, 1 a script error such as a missing tool or network failure, and 2 means at least one check failed. A PR is reported as not ready when it is not open, is still a draft, has a merge state other than CLEAN or HAS_HOOKS, has failing or pending CI, fails the local gates, or lacks evidence for runtime, viewer or client changes. You can also run just the local gates before a PR exists, or enable the pre-commit hook with `git config core.hooksPath .githooks`.

When your agent uses it

  • Checking a pull request is ready before asking for review
  • Verifying lint, format and tests pass locally before opening a PR
  • Reviewing an existing PR's CI status and body policy in one pass

Example prompts

  • “Run the preflight on my open pull request and tell me what blocks the merge.”
  • “Before I open this PR, run the local lint, format and test gates.”
  • “Check the PR with CI only and skip the local tests.”

Requirements

  • uv, ruff and pytest set up in the project
  • The gh CLI authenticated for the repository
  • The scripts/check_pr.sh script in the repository

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. PR metadata — fetches title, state, draft status, merge state, branch info
  2. CI checks — counts pass/fail/pending GitHub Actions checks
  3. Local gates — runs lint, format, and tests locally
  4. PR body policy — validates required sections, evidence links, and blocked artifacts
  5. Verdict — READY or NOT_READY with specific reasons

What it can do on your machine

Read from SKILL.md and the folder at commit 4cc867d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

PR Preflight Check loads about 615 tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 236 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~615

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from liaohch3/claude-tap at commit 4cc867d, republished under its MIT licence (© liaohch3). 236 words, ~615 tokens.

Download SKILL.mdSave it as .claude/skills/pr-preflight/SKILL.md (or your agent's skills folder).
name
pr-preflight
description
Full pre-PR merge-readiness check. Run this before opening or merging a pull request — it validates local gates (lint, format, tests), CI status, screenshot evidence, and PR metadata in one pass. Also useful for reviewing an existing PR's readiness.
user_invocable
true

PR Preflight

One-command merge-readiness check that combines local gates, CI status, and PR policy checks. Mirrors what reviewers look for so issues are caught before review, not during.

Check an existing PR

bash
scripts/check_pr.sh <pr_number>

This runs:

  1. PR metadata — fetches title, state, draft status, merge state, branch info
  2. CI checks — counts pass/fail/pending GitHub Actions checks
  3. Local gates — runs lint, format, and tests locally:
    • uv run ruff check .
    • uv run ruff format --check .
    • uv run pytest tests/ -x --timeout=60
  4. PR body policy — validates required sections, evidence links, and blocked artifacts
  5. Verdict — READY or NOT_READY with specific reasons
Options
FlagPurpose
--repo OWNER/REPOOverride repository (default: auto-detect via gh)
--no-testsSkip local test gates (useful when you just want CI + metadata check)
Exit codes
CodeMeaning
0All checks passed — ready to merge
1Script error (missing tool, network failure)
2Not ready — at least one check failed

Run local gates only (no PR needed)

If you haven't opened a PR yet and just want to validate locally:

bash
uv run ruff check . && uv run ruff format --check . && uv run pytest tests/ -x --timeout=60

Or use the pre-commit hook (auto-runs lint on commit):

bash
git config core.hooksPath .githooks

What blocks merge

The script reports NOT_READY if any of these are true:

  • PR is not in OPEN state
  • PR is still a draft
  • Merge state is not CLEAN or HAS_HOOKS
  • Any CI check is failing
  • Any CI check is still pending
  • Local gates (lint/format/tests) fail
  • PR body policy fails, such as missing evidence for runtime/viewer/client changes

Typical workflow

bash
# 1. Make sure local gates pass
uv run ruff check . && uv run ruff format --check . && uv run pytest tests/ -x --timeout=60

# 2. Push and open PR
git push origin my-branch
gh pr create --title "feat: ..." --body "..."

# 3. Wait for CI, then run full preflight
scripts/check_pr.sh <pr_number>

© liaohch3, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/pr-preflight of liaohch3/claude-tap.

Open the folder on GitHubat commit 4cc867d

Compare with similar skills

PR Preflight Check next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PR Preflight Check compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Preflight Check this skillliaohch3/claude-tap3.3k—~615Automated safety check: PassMIT
Django Verification Loopaffaan-m/ECC276k7 repos~2.9kAutomated safety check: PassMIT
Simple Modern Uvjlevy/simple-modern-uv301—~1.9kAutomated safety check: PassMIT
Checkav1155/houndarr292—~366Automated safety check: PassAGPL-3.0
Validatejuliepy/AI-Engineer-from-scrach436—~500Automated safety check: PassNone
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence

Similar skills

  • Runs a phased pre-PR and pre-deploy check on a Django project: environment, linting, migrations, tests with coverage, security scans and settings review.

    276k GitHub starsUsed in 7 repos~2.9k tokens
    DevelopmentAuto-check passed
  • Simple Modern Uv

    jlevy/simple-modern-uv

    Start, selectively modernize, fully migrate, or update Python projects using simple-modern-uv practices: uv, ruff, BasedPyright, pytest, GitHub Actions CI, and tag-driven PyPI publishing.

    301 GitHub stars~1.9k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Check

    av1155/houndarr

    Run Houndarr's full quality gate (ruff lint, ruff format check, mypy, bandit, pytest) and report results in a single table.

    292 GitHub stars~366 tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Validate

    juliepy/AI-Engineer-from-scrach

    Run the full quality gate (ruff + mypy + pytest + tsc + vitest) and report PASS/FAIL for each command.

    436 GitHub stars~500 tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Kedro Babysit

    kedro-org/kedro

    Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…

    11k GitHub stars~4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Adk Setup

    google/adk-python

    Official

    Sets up a local ADK Python development environment in a git clone of the open-source adk-python repository: a uv virtual environment, all dependency extras, pre-commit hooks, and a first unit-test…

    22k GitHub stars~993 tokensUpdated today
    DevelopmentAuto-check: notes

More from liaohch3/claude-tap

All 11 skills in this repo
  • Codex E2E Trace Validation

    liaohch3/claude-tap

    Runs a real Codex CLI session through claude-tap and produces trace evidence and viewer screenshots for pull requests that touch capture, proxying or the viewer.

    3.3k GitHub stars~3k tokensUpdated 17 days ago
    Auto-check passed
  • Terminal Demo Video Recorder

    liaohch3/claude-tap

    Records a real tmux end-to-end run with asciinema, converts it to a GIF and MP4, and captures trace viewer screenshots with Playwright.

    3.3k GitHub stars~545 tokensUpdated 17 days ago
    Auto-check passed
  • JS-in-HTML Testing

    liaohch3/claude-tap

    Tests JavaScript embedded in an HTML file in two layers: pytest checks of the logic ported to Python, and Playwright runs in a real browser for the DOM.

    3.3k GitHub stars~924 tokensUpdated 17 days ago
    Auto-check passed
  • Runs local checks on maintainer docs for stale review dates, missing manifest paths and plan state drift, matching what the CI workflow enforces.

    3.3k GitHub stars~561 tokensUpdated 17 days ago
    Auto-check passed
  • Playwright Screen Recording

    liaohch3/claude-tap

    Records headless Playwright sessions as .webm videos to show a bug fix working or to give pull request reviewers visual evidence.

    3.3k GitHub stars~714 tokensUpdated 17 days ago
    Auto-check passed
  • Push and PyPI Release

    liaohch3/claude-tap

    Pushes the current work to GitHub and, when pending commits change code, bumps the version in pyproject.toml so CI publishes a new PyPI release.

    3.3k GitHub stars~509 tokensUpdated 17 days ago
    Auto-check passed

Questions about PR Preflight Check

What does PR Preflight Check do?

Runs a single merge-readiness check on a pull request: metadata, GitHub Actions status, local lint, format and test gates, and PR body rules, ending in READY or NOT_READY. sh` fetches the title, state, draft status, merge state and branch, counts passing, failing and pending GitHub Actions checks, runs the local gates and validates the PR body for required sections, evidence links and blocked artifacts.` and `uv run pytest tests/ -x --timeout=60`.

When should I use PR Preflight Check?

PR Preflight Check fits situations like: checking a pull request is ready before asking for review; verifying lint, format and tests pass locally before opening a PR; reviewing an existing PR's CI status and body policy in one pass.

How do I install PR Preflight Check in Claude Code?

Run `npx skills add liaohch3/claude-tap --skill pr-preflight -a claude-code`. Or copy the skill folder (.agents/skills/pr-preflight in liaohch3/claude-tap) into .claude/skills/pr-preflight in your project. Claude Code loads it when a task matches its description.

How do I install PR Preflight Check in Codex?

Run `npx skills add liaohch3/claude-tap --skill pr-preflight -a codex`. Or copy the skill folder (.agents/skills/pr-preflight in liaohch3/claude-tap) into .agents/skills/pr-preflight in your project. Codex loads it when a task matches its description.

Can I use PR Preflight Check in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add liaohch3/claude-tap --skill pr-preflight -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr-preflight, .gemini/skills/pr-preflight, .github/skills/pr-preflight and .opencode/skills/pr-preflight in your project.

What does PR Preflight Check need to run?

Going by SKILL.md and its folder, PR Preflight Check needs the command-line tools its instructions call (uv, git and gh). Our summary lists: uv, ruff and pytest set up in the project; The gh CLI authenticated for the repository; The scripts/check_pr.sh script in the repository.

Does PR Preflight Check access the network?

SKILL.md contains no URLs. Its commands use uv, git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is PR Preflight Check safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does PR Preflight Check use?

PR Preflight Check is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR Preflight Check use?

About 615 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to PR Preflight Check?

Skills that share tags, products or a category with PR Preflight Check: Django Verification Loop (affaan-m/ECC, 276k stars), Simple Modern Uv (jlevy/simple-modern-uv, 301 stars), Check (av1155/houndarr, 292 stars) and Validate (juliepy/AI-Engineer-from-scrach, 436 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Preflight Check?

liaohch3 (a GitHub user) maintains it in liaohch3/claude-tap, which has 3,271 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on September 22, 2026.

Source: liaohch3/claude-tap on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.