一键导入
bazel-pre-pr
Runs pre-flight checks and deep code reviews on local commits of a feature branch before push or PR creation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Runs pre-flight checks and deep code reviews on local commits of a feature branch before push or PR creation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | bazel-pre-pr |
| description | Runs pre-flight checks and deep code reviews on local commits of a feature branch before push or PR creation. |
bazel-pre-pr)This skill defines the pre-flight checks and local commit code review workflow to execute before a branch is pushed to remote or a pull request is created. It helps catch common Bazel migration bugs and style violations early.
Before initiating any code analysis, you MUST verify that the local repository is in a valid state for code review:
git branch --show-current).main (or the default base branch). If it is main, stop immediately and print a hard-stop error:
Error: Cannot run bazel-pre-pr on the 'main' branch. Please create a feature branch, commit your changes, and try again.main if origin/main is not configured) and run the log:
BASE_BRANCH=$(git rev-parse --verify origin/main >/dev/null 2>&1 && echo "origin/main" || echo "main")
git log $BASE_BRANCH..HEAD --oneline
If this returns empty, stop immediately and print:
Error: No local commits found on this branch compared to the base branch.If the branch checks pass, spin up a subagent of type self (inheriting all tools and rules) to run the code review in the background:
Bazel Code Reviewermain if origin/main is not configured) and run the diff:
BASE_BRANCH=$(git rev-parse --verify origin/main >/dev/null 2>&1 && echo "origin/main" || echo "main")
git diff $BASE_BRANCH...HEAD
docs/bazel-migration/GUIDELINES.md.bazel_pre_pr_review.md to the repository root directory.github-pr-triage:
# Pre-PR Review: <branch_name>🔥 Critical (causes compile/test failures or sandboxing violations), ⚠️ Warning (style/performance degradation), 💡 Suggestion.Once the subagent finishes and writes the bazel_pre_pr_review.md to the repository root:
RequestFeedback: true in the metadata to render the Proceed button.Post-merge cleanup protocol for Dart SDK Bazel thread task worktrees, beads issue closing, and remote sync.
MANDATORY skill when working on Bazel thread tasks (sdk-5m4.*, etc.), updating task status in beads, managing PR alignment lifecycle, or syncing the Dolt task DB.
Orchestrates long-running or recurring patrols of the Dart SDK Bazel test completion matrix. Discovers test targets, runs automated watchdog timers (default 5m/300s), bypasses blocking test suites or configs, regenerates canonical completion reports (TEST_COMPLETION_MATRIX.md), and synchronizes findings with the Beads issue backlog. Use when the user asks to run all Bazel tests, check test completion matrix health, audit migration test gaps, or leave overnight test patrols running.
Import, test, and export upstream Gerrit CLs or GitHub PRs in the Bazel workspace.