Agent Skillsliaohch3/claude-tap › pr-preflight

pr-preflight

GitHub

PR预检技能,用于在提交或合并前全面验证PR就绪状态。检查本地代码规范、CI状态、PR元数据及正文策略,判断是否具备合并条件,帮助在审查前发现潜在问题。

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

Trigger Scenarios

准备打开Pull Request 准备合并Pull Request 审查现有PR的准备情况

Install

npx skills add liaohch3/claude-tap --skill pr-preflight -g -y
More Options

Non-standard path

npx skills add https://github.com/liaohch3/claude-tap/tree/main/.agents/skills/pr-preflight -g -y

Use without installing

npx skills use liaohch3/claude-tap@pr-preflight

指定 Agent (Claude Code)

npx skills add liaohch3/claude-tap --skill pr-preflight -a claude-code -g -y

安装 repo 全部 skill

npx skills add liaohch3/claude-tap --all -g -y

预览 repo 内 skill

npx skills add liaohch3/claude-tap --list

SKILL.md

Frontmatter
{
    "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

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. VerdictREADY or NOT_READY with specific reasons

Options

Flag Purpose
--repo OWNER/REPO Override repository (default: auto-detect via gh)
--no-tests Skip local test gates (useful when you just want CI + metadata check)

Exit codes

Code Meaning
0 All checks passed — ready to merge
1 Script error (missing tool, network failure)
2 Not 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:

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):

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

# 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>

Version History

  • 7170ab3 Current 2026-07-05 15:20

Same Skill Collection

.agents/skills/codex-e2e-test/SKILL.md
.agents/skills/demo-video/SKILL.md
.agents/skills/js-in-html-testing/SKILL.md
.agents/skills/legibility-check/SKILL.md
.agents/skills/playwright-screen-recording/SKILL.md
.agents/skills/push-release/SKILL.md
.agents/skills/real-e2e-test/SKILL.md
.agents/skills/screenshot-validation/SKILL.md
.agents/skills/translate-i18n/SKILL.md
.agents/skills/e2e-test/SKILL.md

Metadata

Files
0
Version
7170ab3
Hash
20619674
Indexed
2026-07-05 15:20

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-10 09:41
浙ICP备14020137号-1 $Carte des visiteurs$