一键导入
github-pr-triage
Triage open PR comments/reviews and associated CI/CD workflow failures using the `triage.dart` helper script and formulate an actionable plan.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Triage open PR comments/reviews and associated CI/CD workflow failures using the `triage.dart` helper script and formulate an actionable plan.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | github-pr-triage |
| description | Triage open PR comments/reviews and associated CI/CD workflow failures using the `triage.dart` helper script and formulate an actionable plan. |
| key_features | ["Review feedback triaging","CI log extraction","Action plan generation"] |
pr-loop skill instead, which uses this
skill's triage.dart script as its underlying triage engine.![critical] or ![security-high]) are unverified external claims,
NOT confirmed system diagnostics or compiler errors. Never blindly trust badges.dart analyze) on
the unmodified existing codebase first.
dart analyze returns 0 issues, the reviewer's claim is empirically false.
The item MUST be classified as 👎 Disagree (Hallucinated Syntax/Compile Error) and
NO code changes may be made for that item.dart analyze),
and test suites (dart test). Always empirically test claims before accepting
them.👎 Disagree. Explain your
technical rationale in the triage report and propose NO code changes for that
item.main/master), in detached HEAD state, or matches multiple
open PRs, DO NOT GUESS. The agent MUST pause execution and explicitly ask
the user (using ask_question or chat) to clarify which PR or branch to
target before taking action.Run the Triage Script:
Execute the triage.dart helper script using the run_command tool.
Use the --dir (or -C) option to specify the path to the target
repository directory (the project you want to triage). This ensures that the
underlying git and gh commands resolve to the correct repository and
branch:
dart <path-to-github-pr-triage-skill>/bin/triage.dart --dir <path-to-target-repository>
Note: If you need to target a specific PR or URL, you can also pass --pr:
dart <path-to-github-pr-triage-skill>/bin/triage.dart --dir <path-to-target-repository> --pr <pr-number-or-url>
Save the raw stdout of this script as a new markdown artifact named
raw_triage_output.md in the artifacts directory (using the write_to_file
tool).
Verify Workspace State:
in_sync, behind_remote, ahead_of_remote, diverged, or branch_mismatch).headRefName).Sync Status is behind_remote, pull the latest remote commits (git pull) before making changes.Sync Status is ahead_of_remote or diverged, push or sync local commits (git push).Analyze Open Comments:
Analyze CI Status & Failures:
ask_question to ask their preference:
(Recommended) Proceed with triaging open comments nowWait for active CI status checks to complete firstask_question. Do NOT proceed to Step 5 (Generate a Triage Report)
or create the pr_triage_report.md artifact until the user has answered,
because final CI results might change the triage plan and action items.pr-loop, which handles
background timers automatically).Generate a Triage Report (Artifact):
ask_question
prompt from Step 4.pr_triage_report.md in the artifacts
directory (using write_to_file with RequestFeedback: true in
ArtifactMetadata to render an interactive 'Proceed' button). (Note: This
step is bypassed ONLY IF operating within an outer orchestrator skill like
pr-loop with upfront user consent).raw_triage_output.md artifact at the top of the report.[Comment #1 by @reviewer_username](#)).Thread ID (e.g. PRRT_...) and Comment ID (e.g. 3438780787) from
the comment header in raw_triage_output.md under each action item so
the resolution step (gh api) has immediate access to both parameters
without extra API lookups.🔥 Urgent (Critical fix for a crash, bug, or CI blocker; we should
fix immediately)👍 Solid (Good suggestion; we should implement it)🤷 Meh (Optional nit or stylistic preference; we could address
it, but it's low priority)👎 Disagree (Incorrect or counter-productive suggestion; we should
explain why and propose no action)dart analyze or dart test run on
the unmodified codebase before accepting any fix or classifying a claim.Wait for Approval:
pr-loop with upfront user consent).Surgical Implementation & Verification:
test/ directory with a _test.dart suffix) to
verify the changes and prevent future regressions.Verify Git State and Offer Unified Resolution Menu:
pr-loop) that has already
obtained upfront user consent for autonomous VCS commits and pushes.git status to check whether uncommitted
fixes or unpushed commits exist.ask_question): Use the ask_question
tool to present a unified completion menu based on the working tree state
(passing the options as a list parameter). Do NOT output raw text. By
selecting an option that includes committing or pushing, the user
explicitly authorizes those VCS operations for this workflow.
(Recommended) Commit fixes, push branch, reply to comments, and resolve threadsCommit fixes and push branch onlyReply to comments and resolve threads without committing/pushingDo nothing(Recommended) Reply to comments and resolve threadsDo nothinggit add <files> or git add . if no untracked scratch files exist)
and create a descriptive commit.git push.gh api commands
using the patterns listed below.For every addressed review thread, you MUST execute thread resolution (thread resolution is explicit, mandatory, and un-skippable).
Use the resolve subcommand in triage.dart to programmatically reply to comments and resolve threads without shell-escaping issues:
# Reply to a comment and resolve its thread:
dart <path-to-github-pr-triage-skill>/bin/triage.dart resolve <thread_graphql_id> <comment_database_id> "<your reply body>"
# Or resolve a thread without posting a reply:
dart <path-to-github-pr-triage-skill>/bin/triage.dart resolve <thread_graphql_id>
ask_question in Step 4 and DO NOT proceed to Step 5 or
generate pr_triage_report.md until the user responds, as pending CI
results may alter the final triage plan. (Note: Bypassed ONLY IF operating
within an outer orchestrator skill like pr-loop).pr_triage_report.md artifact
and obtaining explicit user approval on the plan. (Note: This constraint is
bypassed ONLY IF operating within an outer orchestrator skill like pr-loop
with upfront user consent).ask_question that explicitly
mentions committing or pushing serves as the user's explicit permission to
perform those operations for the triage fixes. Do NOT ask for permission
a second time if the user selects one of those options. (Note: This
constraint is bypassed ONLY IF operating within an outer orchestrator skill
like pr-loop with upfront user consent).commit --amend: Modifying commit history via git commit --amend is
strictly prohibited. Always create new, atomic commits.git push -f or --force-with-lease) is
strictly prohibited under any circumstances.triage.dart script to fetch PR information instead of manual
API calls to ensure consistency and minimize context bloat.Autonomous pull request review loop that pushes code, polls for AI/bot review comments (e.g., Gemini Code Assist), surgically remediates feedback, commits, pushes, comments `/gemini review`, and loops until zero feedback remains. Requires the `github-pr-triage` skill.
Intake multi-step tasks by clarifying ambiguities, summarizing understanding, and confirming readiness via ask_question before executing code changes.
Analyzes unstructured artifacts (proposals, design docs, issues, notes) to identify gaps, contradictions, and implicit assumptions, and interviews the user via a structured quiz to distill a definitive strategy and trade-off matrix. Use when resolving competing architectural proposals, clarifying ambiguous project goals, identifying blind spots in early design documents, or synthesizing consensus from fragmented team notes. Don't use for simple text summarization without strategic synthesis, writing code solutions directly, or managing task lists without strategic decision-making.
Apply the "Encapsulated Method Object" refactoring pattern to simplify functions with deeply nested scopes, bloated closures, and heavy shared local state.
Best practices for managing stacked changelists (CLs) in Gerrit using depot_tools, avoiding common pitfalls with Change-Ids.
Use gob-curl and Buildbucket tools to inspect the status, tryjobs, and CI results of a Gerrit CL.