本文へ移動
cccskills
無料GitHub で公開

pr-review

Review a teammate's pull request. The reviewer role (multi-lens analysis, severity calibration, suggestion writing) lives in the `pr-review:pr-review` subagent; this skill is the orchestrator — it resolves the PR, fetches diff and changed files, delegates analysis to the subagent, stages the resulting comments for user approval, then submits a batch review via the GitHub API. NOT for self-review of your own PR (use `self-pr-review` instead). Trigger phrases include "review PR #123", "code review PR", "peer review", "check this PR", "give PR feedback", "review pull request", "review someone's PR".

日本語の概要は準備中です。原文の説明を表示しています。

連携ツールGitHub

実行スコア 未検証

インストール方法を見る

含まれるファイル(4)

  • SKILL.md7.4 KB
  • agents/pr-review.md5.9 KB
  • references/gh-review-api.md3.8 KB
  • references/review-perspectives.md5.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

PR Review

Orchestrator skill for reviewing someone else's PR. The reviewer judgment itself lives in the @agent-pr-review:pr-review subagent. This skill handles PR lookup, diff fetching, staging UI, user interaction, and GitHub submission.

This skill reviews someone else's PR — for self-review of your own PR, use self-pr-review instead.

Locating your reference files

The references/*.md link at Step 6 is relative to this skill's own install location, not to the repo you're reviewing — a bare relative path will not resolve. Resolve it once, in one Bash call, before you need it:

SKILL_HOME=$(ls -d ~/.claude/plugins/cache/hideki-plugins/pr-review/*/skills/pr-review 2>/dev/null | sort -V | tail -1)
echo "$SKILL_HOME"

Re-derive $SKILL_HOME in the same Bash call as the reference read, or a fresh one — shell state doesn't persist between separate Bash calls.

Arguments

  • <pr> — PR number (123, #123) or full URL (required).
  • --lens — Comma-separated list of review lenses. Options: bugs, security, performance, style, complexity, testing, docs. Default: all.
  • --event — Review event type: COMMENT (default), APPROVE, REQUEST_CHANGES.
  • --severity — Minimum severity to include: critical, high, medium, low, all. Default: all.
  • --max-comments — Maximum inline comments to stage. Default: 30.

Workflow Overview

1. Resolve PR ──► Verify OPEN, fetch metadata
2. Fetch Diff ──► gh pr diff + read changed files
3. Delegate ────► @agent-pr-review:pr-review analyses with active lenses
4. Stage ───────► Display comment table + details (DO NOT POST)
5. Approve ─────► User edits / removes / adds / submits / cancels
6. Submit ──────► Batch POST /repos/.../pulls/.../reviews

Step 1: Resolve PR

Accept a PR number, #number, or full GitHub URL. Extract owner/repo/number.

gh pr view <number> --json number,title,state,author,baseRefName,headRefName,isDraft,additions,deletions,changedFiles

If PR is not OPEN, warn and ask whether to proceed read-only (skip Step 6).

OWNER=$(gh repo view --json owner --jq '.owner.login')
REPO=$(gh repo view --json name --jq '.name')

Step 2: Fetch Diff and Changed Files

gh pr diff <number>
gh pr view <number> --json files --jq '.files[].path'

For each changed file, Read the full content (not just the diff) so the subagent has surrounding context.

Large PRs (>30 changed files)

  1. Warn: "This PR has N changed files. Reviewing all of them may take a while."
  2. Ask whether to proceed with all files, or specify a subset.
  3. If --max-comments is set, prioritize files with the most changes.

Binary files

Skip and note them in the summary as "skipped (binary)".

Step 3: Delegate to the reviewer subagent

Hand the bundle to @agent-pr-review:pr-review:

  • diff (text)
  • files (path → content map for non-binary files)
  • active_lenses (from --lens, default all)
  • severity_floor (from --severity, default low)
  • max_comments (from --max-comments, default 30)
  • PR metadata (title, author, body — for context)

The subagent returns a structured object with summary, files_reviewed, files_skipped, comments, and dropped_by_cap.

Step 4: Stage Comments

CRITICAL: Do NOT submit anything to GitHub yet. Display the staged review inline.

Summary Table

## Staged Review for PR #<number>: <title>

| # | File | Line | Severity | Lens | Summary |
|---|------|------|----------|------|---------|
| 1 | src/api.ts | 42 | high | bugs | Null dereference on optional field |
| 2 | src/db.ts | 15 | critical | security | SQL injection via string concat |
| 3 | src/app.tsx | 88 | medium | performance | Re-render on every state change |

**Total: N comments** (X critical, Y high, Z medium, W low)

Detail View

For each comment, show path:line, severity/lens, and the full body (including any ```suggestion block).

Overall Review Body

Use the subagent's summary as the top-level review body.

Action Menu

**Actions:**
- `submit` — Submit all staged comments as a review
- `edit N` — Edit comment #N (provide new body text)
- `remove N` — Remove comment #N from the review
- `add file:line body` — Add a new comment manually
- `change-event EVENT` — Change review event (COMMENT/APPROVE/REQUEST_CHANGES)
- `cancel` — Abort without submitting

Step 5: User Approval

Wait for the user's decision. Loop until submit or cancel.

  • edit N — re-display, accept new body, update staged comment.
  • remove N — drop from list, renumber.
  • add file:line body — parse and append manual comment.
  • change-event EVENT — warn if changing to APPROVE / REQUEST_CHANGES.
  • submit — proceed to Step 6.
  • cancel — print "Review cancelled. No comments were posted." and exit.

Step 6: Submit Review

Build the API payload and submit as one batch review. See "$SKILL_HOME"/references/gh-review-api.md (resolve $SKILL_HOME per "Locating your reference files" above).

HEAD_SHA=$(gh pr view <number> --json headRefOid --jq '.headRefOid')

# Build review JSON with commit_id, event, body, and comments[]
# Then submit:
echo "$REVIEW_JSON" | gh api --method POST \
  /repos/{owner}/{repo}/pulls/{number}/reviews \
  --input -

After submission:

  1. "Review submitted with N comments."
  2. Print the review URL if available.
  3. If any comments failed (422 on specific path/line), report which and why.

Error Recovery

  • 403 — no permission. Inform and abort.
  • 404 — PR not found. Inform and abort.
  • 422 — validation. Report the failing field/comment. Offer retry without invalid comments.
  • 429 — rate limited. Wait for Retry-After, retry once.

Edge Cases

  • Closed/merged PR — warn at Step 1. Allow read-only (skip Step 6) on confirmation.
  • Draft PR — note it, review normally.
  • No diff — empty PR. Report and exit.
  • Binary files — skip, note in summary.
  • Large PR (>30 files) — warn at Step 2.
  • Zero issues — "No issues found across N lenses." Offer to submit an approval or exit.
  • API rate limiting — check X-RateLimit-Remaining before submitting.
  • Reviewer is PR author — cannot use APPROVE / REQUEST_CHANGES on own PR. Fall back to COMMENT with warning.
  • Fork PRs — diff may not include all context; note if isCrossRepository is true.

References

Resolve $SKILL_HOME per "Locating your reference files" above, then:

  • "$SKILL_HOME"/references/gh-review-api.md — Full REST API reference for batch reviews, error handling, suggestion blocks.
  • "$SKILL_HOME"/references/review-perspectives.md — Detailed lens definitions used by the subagent.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Run a multi-model adversarial mutual review with facilitator synthesis: 2+ panelists (different model families where possible — use codex-server / codex-cli for the external-family seat) independently answer, adversarially critique each other across rounds, and the main session acts as facilitator, synthesizing agreements, live disagreements, and calibrated confidence into one answer. Use ONLY on high-stakes, hard-to-reverse claims, designs or decisions, and only when the user EXPLICITLY asks to debate or adversarially review with multiple models — "discuss with Opus and Codex", "red-team this", "devil's advocate", 敵対的レビュー, 相互レビュー, 多モデル討論, 議論させて. A full run costs ~6 subagent/CLI dispatches: state the panel size and round count and get a go-ahead before launching. Where the Workflow tool is available, run the panel as a Workflow (judge-panel / adversarial-verify) instead of ad-hoc fan-out. Do NOT self-trigger on a bare "are you sure?" — that is a cue to OFFER the panel, not to run it.

日本語の概要は準備中です。原文の説明を表示しています。

hideki5123/agent-skill-set22026年10月21日 更新

Orchestrate multiple coding-agent sessions (Claude Code, Codex, Gemini) over the mcp_agent_mail MCP server, observe their progress on a recurring auto-loop, and prevent inconsistencies (file/edit conflicts and contradictory decisions) between concurrent tasks. Auto-manages the agent-mail server, derives the shared room key from the git repo, and runs either as the orchestrator/observer or as a participating worker. Handles the operational details (server startup, room key, reservation conventions) so the user does not have to remember them. Use when coordinating several agent sessions on different tasks at once, watching a swarm of sessions for conflicts, or wiring already-running sessions into a shared coordination room. Trigger phrases: "agent-swarm", "/agent-swarm", "orchestrate agents", "orchestrate multiple claude sessions", "coordinate sessions", "watch for conflicts between agents", "observe the swarm", "prevent inconsistency between sessions", "multi-agent observe", "複数セッションを協調", "エージェント協調", "セッション間の不整合監視", "スウォーム監視", "複数のClaudeを束ねて".

日本語の概要は準備中です。原文の説明を表示しています。

hideki5123/agent-skill-set22026年10月21日 更新

Generate AGENTS.md (cross-tool agent context — Codex CLI, Aider, Cursor, etc.) and wire CLAUDE.md as a symlink so Claude Code reads the same file. Delegates content generation to Claude's built-in /init when needed, then renames + symlinks. Idempotent. Triggers — /agents-init, "generate agents.md", "create agents.md", "share claude and codex context", "set up agents file", "init agents", "agents-init", "cross-tool agent context", "wire claude and agents".

日本語の概要は準備中です。原文の説明を表示しています。

hideki5123/agent-skill-set22026年10月21日 更新

Drive an already-running, LOGGED-IN Chromium browser on macOS via AppleScript — navigate, click, fill forms, scroll, and extract page content from the user's REAL session, with the browser left open and NO profile copy and NO restart. Use when the task needs the existing logged-in session (cookies, auth, current tabs) reused as-is. Trigger phrases: "chrome-use", "ブラウザから取得", "ログイン済みの Chromeで", "ブラウザを操作して", "このページ読んで", "Xのスレッド読んで", "ログインしたまま取得", "自分のセッションでスクレイプ", "read this page in my browser", "scrape with my session", "drive my chrome", "execute JS in my (logged-in) browser", "automate my logged-in browser". Chromium family (Chrome default; Brave/Edge/Arc/Vivaldi via --app). NOT for isolated/throwaway automation where login reuse is unneeded — use playwright-cli for that. macOS only.

日本語の概要は準備中です。原文の説明を表示しています。

hideki5123/agent-skill-set22026年10月21日 更新

codex-cli

無料

Run OpenAI Codex CLI from the terminal for batch / one-shot `codex exec` invocations with output captured to an `-o` file. Use for fire-and-forget runs, scripted CI, code review batches (`codex review`), and resuming a specific session by id (`codex exec resume`). Always use this skill instead of `mcp__codex__codex` and `mcp__codex__codex-reply` MCP tools — CLI is faster and more capable. For streaming UX, multi-turn dialogues that need live state, structured (JSON schema) output, attaching images, or programmatic event handling → **use codex-server instead**. codex-server uses the user's ChatGPT subscription via Codex App Server and decoupled async invocation that bypasses the Bash 2-minute timeout entirely. Trigger patterns (batch-only — chat/streaming triggers belong to codex-server): codex-cli / codex CLI / codex exec / codex review / codex resume / codex fork / batch + {codex, gpt} / one-shot + {codex, gpt} / non-interactive + codex / codex {to a file, -o, output file, captured output} / CI + {codex, gpt} / scripted + {codex, gpt} / fork codex session / resume codex session by id

日本語の概要は準備中です。原文の説明を表示しています。

hideki5123/agent-skill-set22026年10月21日 更新

Run OpenAI Codex via the Codex App Server (JSON-RPC-over-stdio) for streaming multi-turn chat sessions with persistent threads, structured output, image input, and rich event streams. Default entry point for ChatGPT/GPT/Codex-like conversations from the terminal. Uses the user's ChatGPT subscription (Plus / Pro / Team) exclusively via `codex login` — never consumes OPENAI_API_KEY billing, by design. Implementation: TypeScript on deno with npm:@openai/codex-sdk; spawns the existing system codex binary. Decoupled async invocation: every turn returns turn-id in <1 s; the actual SDK work runs in a detached worker that streams to per-turn files under ~/.codex-server/turns/<turn-id>/ — Bash's 2-min timeout never applies. Prefer this over codex-cli for streaming UX, multi-turn dialogues that need live state, structured (JSON schema) output, attaching images, or programmatic event handling. Use codex-cli only for one-shot batch invocations that pre-capture to an -o file. For OpenAI Platform API calls specifically (embeddings, image generation, audio, moderation, batches, files) — not open-ended chat — use openai-cli instead; that path bills OPENAI_API_KEY, this one uses the ChatGPT subscription. Trigger patterns (match any variation): codex / codex-server / codex app server / codex app-server / openai / open ai / OpenAI / chatgpt / chat gpt / ChatGPT / GPT / ask gpt / chat with gpt / gpt session / codex session / streaming chat / multi-turn chat / multi turn chat / second opinion / cross-check / cross check / ai pair programming / another AI / external AI / ask another model / get GPT's take / what does openai think / show me what gpt thinks / structured output from gpt / json schema gpt / resume codex thread / continue codex conversation / continue codex session / /codex-server

日本語の概要は準備中です。原文の説明を表示しています。

hideki5123/agent-skill-set22026年10月21日 更新

hideki5123 のスキルをすべて見る

このスキルの問題を報告する