ワンクリックで
devpilot-pr-review
Use when the user asks to review a pull request, merge request, or a diff — "review this PR", "review PR
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when the user asks to review a pull request, merge request, or a diff — "review this PR", "review PR
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when the agent keeps making the same mistake across multiple PRs, when lint/test failures recur on the same rule, when PR review comments reveal a missing guide or unenforced convention, or when you want to proactively evolve the harness. Triggers on "self-evolve", "optimize harness", "update harness docs", "agent keeps making the same mistake", "harness self evolution", "harness 自我进化", "优化 harness", "更新 harness 文档".
Turn a single article, document, or web page into a standalone HTML learning artifact: either a bilingual digest or a chaptered Chinese study guide with source summaries. MUST use this skill — not raw summarization — whenever the user asks to summarize, digest, get key points from, extract takeaways from, or turn a URL, PDF, .docx, .md, .txt, paper, report, or blog post into notes or study material. Trigger on: summarize this, key points, takeaways, digest, highlights, TL;DR, what does it say, overview, 学习资料, 学习笔记, 复习资料, 总结, 摘要, 要点, 重点, 提取, 整理, 讲了什么. NOT for: writing new content, translating, comparing two documents, building apps, multi-source news, code review, or data/CSV analysis.
Use proactively when harness documentation needs updating — new module/package added, skill created or removed, CLI surface changed, exec plan completed, new convention established, or CLAUDE.md exceeds ~100 lines. Also use when asked to set up AGENTS.md/skills/sub-agents, fix agent drift, or retrofit guardrails.
Use when setting up a repository for autonomous coding agents, adding guardrails, context files, or automation so agents ship reliably without constant review. Triggers on "make this repo agent-friendly", "agents keep drifting", "set up AGENTS.md / skills / sub-agents", "harness engineering", architectural drift with agent-authored code, or retrofitting guardrails after output quality decayed.
Use when the user wants to resolve, fix, work through, or burn down open GitHub issues in a repository — "fix all the issues", "resolve these tickets", "work through the repo-scan issues", "clear the backlog", "fix issue
Use when the user asks to scan, audit, or sweep an entire GitHub repository for issues and file them as tickets — "scan this repo", "audit the codebase", "find bugs/security holes/missing tests", "check the docs are still accurate", "/repo-scan", "open issues for all the problems you find". Scans security, edge cases, testing coverage, and doc/code drift (CLAUDE.md, AGENTS.md, README.md and the docs they link to) without assuming business logic. Do NOT use for reviewing a single PR (use devpilot-pr-review) or language-specific style review (use devpilot-google-go-style).
| name | devpilot-pr-review |
| description | Use when the user asks to review a pull request, merge request, or a diff — "review this PR", "review PR |
A PR review the author can act on: every concrete finding is posted as an inline comment anchored to the line it talks about, drawn from a parallel multi-angle scan and filtered through an explicit confidence rubric so the author sees signal, not noise. The body holds a short verdict, strengths, the blind-spot sweep, and counts.
Three structural ideas drive this skill:
Confidence: 0–100. Findings below 70 are dropped by default. Coverage at collection, filtering at posting.<coverage_in_collection_filtering_at_posting> Subagents report every finding they reach, including uncertain ones — that is the only way to get coverage. The main session filters by Confidence and Severity at posting time. A finding silently dropped by a subagent because it "felt minor" is a defect in the review; a finding scored 40 and filtered out at the gate is fine. </coverage_in_collection_filtering_at_posting>
<investigate_before_asserting> State how the code behaves only after opening and reading the relevant files. When a finding depends on a caller or test the subagent did not locate, it MUST score Confidence ≤ 50 and record the gap. No speculation passed off as fact. </investigate_before_asserting>
<inline_by_default> Every finding tied to a specific line goes in as an inline review comment, never in the body. The body holds only the Verdict, TL;DR, Strengths, the sweep summary, finding counts, and Open Questions. If a finding has no obvious anchor (cross-cutting concern, missing-but-not-present code), anchor it to the most representative line and say so in the comment — do not promote it to the body. </inline_by_default>
0. Eligibility gate → references/eligibility.md
1. Load PR → gh / git / pasted patch
1.5 Graph enrichment → references/graph.md (preflight once; fallback OK)
2. Parallel fanout → references/fanout.md (5 subagents, parallel)
3. Filter + merge + reconcile against graph → references/confidence.md
4. Draft review → references/template.md
5. Post one combined POST → references/posting.md
Self-check before post → references/rationalizations.md
Before anything else, run the gate in references/eligibility.md. If the PR is closed, draft, automation-only, generated-only, or already reviewed by you at the current head SHA, stop and tell the user. Cheap; saves an entire fanout.
The gate also produces two outputs the later steps consume:
full (no prior devpilot review) or incremental (prior review exists but head has moved; fanout runs against last_reviewed_sha..head_sha, not the full PR diff)./tmp/existing_review_comments.json, every prior inline comment on this PR from any reviewer. Used by step 3 to drop findings that duplicate an existing comment.gh pr view <url> --json title,body,files,baseRefName,headRefOid,author
gh pr diff <url>
Or git diff <base>...HEAD for a local branch, or read a pasted patch directly. Capture the head SHA — link rendering depends on it (see references/posting.md). A PR with no stated intent is itself a finding.
Run devpilot graph preflight --base <base-sha> --head <head-sha> once. Cache the JSON to /tmp/pr_review_graph.json and inject it into the shared header that every fanout brief sees. The payload tells subagents — before they read any code — which symbols changed, who calls each, which are hubs, which lack tests, and which cross-community edges this PR adds. Agent A's blast-radius answer comes from this payload, not from grep.
If the graph cache is missing, the language is unsupported, or preflight fails, fall back to the grep-only path and note Behavior trace: grep-only (graph unavailable: <reason>) in the body's sweep summary. Do not auto-run devpilot graph build. See references/graph.md for the full payload schema, fallback triggers, and confidence-weighting rules.
Dispatch all in a single message so they run in parallel. Each receives the PR metadata, the diff, and one focused brief. Each returns findings with Confidence: 0–100 and Severity. See references/fanout.md for the prompts. Agent F is conditional: the dispatcher pre-extracts the dependency manifest per references/import-verifier.md → "What the dispatcher pre-extracts"; F is dispatched only when that manifest is non-empty.
In incremental mode, the diff passed to subagents is the range diff (last_reviewed_sha..head_sha), not the full PR diff — agents should look at the new commits only. Agent A still grounds its blast-radius checks in the full repo, but findings must be anchored to lines changed in the new commits.
| Agent | Angle |
|---|---|
| A | Behavior sweep (5 blind-spot questions + behavior trace) |
| B | Shallow bug scan on the diff + Security/Performance [REQUIRED CHECKS] coverage |
| C | CLAUDE.md / AGENTS.md compliance |
| D | Git blame & history + comments on prior PRs touching these files |
| E | Code comments & in-file conventions in modified files |
| F | Dependency reality check — verifies added imports/packages resolve on public registry (conditional: only dispatched when the diff adds dependencies) |
The main session does NOT also do these passes itself. Subagent context savings are the point.
Graph-reconcile each finding (corroborated → floor 85; contradicted → cap 50) → drop Confidence < 70 → drop matches against eligibility.md false-positive list, including duplicates of existing inline comments at the same anchor (from step 0) → dedupe across agents; same defect across multiple files → one consolidated comment listing the other path:lines → anchor each survivor to (path, line). Full procedure incl. graph-injected missing-test findings: references/confidence.md.
One inline comment per anchored finding: severity-tagged title + Behavior today / Why that's a problem / Suggested change / Confidence. One body: Verdict + TL;DR + Strengths + Unknown-Unknowns Sweep summary (from Agent A) + Security/Performance coverage line + inline-finding counts + Open Questions. Templates, field rules, and tone/stance/language are in references/template.md. Calibrate against references/example-review.md on first use.
Single combined POST to repos/:owner/:repo/pulls/:num/reviews carrying {event, body, comments[]} in one call — never split into multiple reviews and never post inline findings via gh pr comment. Event derived from highest severity (confidence.md → "Severity rubric"). Links in the body use full-SHA blob URLs so GitHub renders the snippet preview.
Payload shape:
jq -n --arg event "$event" --arg body "$body" --argjson comments "$comments_json" \
'{event:$event, body:$body, comments:$comments}' \
| gh api -X POST "repos/$owner/$repo/pulls/$num/reviews" --input -
# each entry in $comments_json: {path, line, side:"RIGHT"|"LEFT", body}
See references/posting.md for the full jq build, anchor field rules (multi-line / LEFT side / start_line), GitLab equivalent, and the local-only "skip posting" mode. Before posting, walk references/rationalizations.md self-check.
devpilot-clean-code-principles.devpilot-google-go-style.| File | What's in it |
|---|---|
references/eligibility.md | Gate rules + false-positive list (when to skip review entirely, what to never flag). |
references/graph.md | devpilot graph preflight payload schema, fallback triggers, confidence-weighting rules consumed by step 3. |
references/fanout.md | Six subagent prompts (Behavior, Bug scan + sec/perf coverage, CLAUDE.md, Git history, In-file comments, Dependency reality) — A–E receive the graph payload; F receives the pre-extracted dependency manifest. |
references/import-verifier.md | Agent F spec: per-ecosystem registry-check commands (Go / npm / Python / Rust), finding shape, typosquat heuristic, fallback rules. |
references/confidence.md | 0–100 rubric, threshold 70, severity vs. confidence axes, dedupe rules, graph reconciliation. |
references/unknown-unknowns.md | Behavior sweep details — Agent A's playbook. |
references/checklist.md | Quality dimensions referenced by Agent B's bug scan and Agent A's checklist tail. |
references/template.md | Inline comment template + review body template (Verdict, Strengths, sweep, counts) + tone/stance/language rules. |
references/posting.md | One combined POST (gh api), full-SHA link format, GitLab equivalent. |
references/example-review.md | Worked example: body + inline comments. |
references/rationalizations.md | Common shortcuts + pre-post self-check. |