kevmoo/dart-sdk-agent-config/bazel-pre-pr
Claude Code and agent skill by kevmoo/dart-sdk-agent-config
- community
Checking that the SKILL.md file is still in the repository.
Runs pre-flight checks and deep code reviews on local commits of a Bazel feature branch before push or pull request creation. Use when asked to run a pre-PR check, review local commits against Bazel migration guidelines, or verify a feature branch before opening a pull request. Don't use for generic upstream merges (use dart-sdk-merge-upstream) or worktree bootstrap and teardown (use dart-sdk-bootstrap).
Install
npx vskill@latest install kevmoo/dart-sdk-agent-config/bazel-pre-prSKILL.md
Bazel Pre-PR Pre-Flight Review (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.
When to Use This Skill
- Run this skill before staging a commit for upload or pushing a new feature
branch to GitHub.
- Trigger when the user requests "run pre-pr check", "review my local commits",
or "verify my feature branch before PR".
📋 Operational Workflow
Step 1: Feature Branch Validation (VCS Gate)
Before initiating any code analysis, you MUST verify that the local repository is in a valid state for code review:
- Branch Check: Get the current git branch name.
- Gate Criterion: The current branch MUST NOT be
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.
- Commit Check: Ensure there is at least one local commit distinguishing
the current branch from the remote base (origin/main). Run: ``bash git log origin/main..HEAD --oneline ` If this returns empty, **stop immediately** and print: Error: No local commits found on this branch compared to origin/main.`
Step 2: Spin Up Code Review Subagent
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:
- Role:
Bazel Code Reviewer - Initial Task:
- Retrieve the full diff of the local commits:
``bash git diff origin/main..HEAD ``
- Read the active unified migration guidelines from the repository root:
{root-worktree}/docs/bazel-migration/GUIDELINES.md (where {root-worktree} is resolved dynamically for the current thread checkout).
- Surgically audit all modifications in the diff against the guidelines
listed in that file. Pay special attention to "Part 2: Code-Level Patterns". When citing a violation, directly reference the specific "Rule" and adapt its "Prefer" block pattern to the specific code context in your suggested fix.
- Conduct a general, highly skeptical engineering review of the diff: check
for logical robustness, verify assumptions, look for edge cases, resource cleanup misses, or race conditions, and identify opportunities to simplify the code.
- Write a triage report artifact named
bazel_pre_pr_review.mdin the parent
conversation's artifacts directory.
- The report MUST structure issues exactly like
github-pr-triage:
- Header:
# Pre-PR Review: <branch_name> - Metadata: Commits analyzed, date, status.
- Issues Grouped by Category:
- For each issue:
- Context: File path and line range.
- Urgency:
🔥 Critical(causes compile/test failures or
sandboxing violations), ⚠️ Warning (style/performance degradation), 💡 Suggestion.
- The Flaw: Description of the guideline violated.
- The Recommended Fix: Correct vs. Incorrect code block comparison.
Step 3: Present Triage Report to User
Once the subagent finishes and writes the bazel_pre_pr_review.md artifact:
- Load and present the triage report to the user.
- The report file MUST be created as a user-facing artifact with
RequestFeedback: true in the metadata to render the Proceed button.
- If no critical issues are found, notify the user that the branch is ready for
push. If issues are found, prompt the user to approve the planned refactorings or fixes.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/bazel-pre-pr/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kevmoo/dart-sdk-agent-config/bazel-pre-pr)