home/dot_agents/skills/fetch-pr-comments/SKILL.md
PRのコメント・レビューを取得する。引数: <pr-number-or-url>
npx skillsauth add kryota-dev/dotfiles fetch-pr-commentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
指定されたPull Requestの本文、レビュー、コメントを取得します。
$ARGUMENTS
8597)https://github.com/<OWNER>/<REPO>/pull/8597)引数からPR情報を抽出してください:
owner, repo, PR番号 を抽出owner, repo を取得(git remote get-url origin を使用)gh pr view {PR番号} --json body,title,author --repo {owner}/{repo}
gh api repos/{owner}/{repo}/pulls/{PR番号}/reviews --paginate | \
jq '[.[] | select(.body | length > 0) | {user: .user.login, state: .state, body: .body}]'
gh api repos/{owner}/{repo}/pulls/{PR番号}/comments --paginate | \
jq '[.[] | {user: .user.login, path: .path, body: .body, line: .line}]'
gh api repos/{owner}/{repo}/issues/{PR番号}/comments --paginate | \
jq '[.[] | {user: .user.login, body: .body}]'
レビューコメントのスレッド(conversation)を resolve するには、GraphQL API の resolveReviewThread mutation を使用する。
注意:
minimizeCommentはコメントを折りたたんで非表示にする操作であり、resolve とは異なる。
# Thread ID の取得
gh api graphql -f query='
{
repository(owner: "{owner}", name: "{repo}") {
pullRequest(number: {PR番号}) {
reviewThreads(first: 50) {
nodes {
id
isResolved
comments(first: 1) {
nodes { path, author { login } }
}
}
}
}
}
}'
# スレッドを Resolve
gh api graphql -f query='
mutation {
resolveReviewThread(input: { threadId: "{thread_id}" }) {
thread { isResolved }
}
}'
# 全未解決スレッドを一括 Resolve
gh api graphql -f query='...' | \
jq -r '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false) | .id' | \
while read -r tid; do
gh api graphql -f query="mutation { resolveReviewThread(input: { threadId: \"$tid\" }) { thread { isResolved } } }"
done
取得した情報を以下の形式で整理して報告してください:
## PR #{番号} の内容
### タイトル
{タイトル}
### 作者
{作者}
### PR本文
{本文}
---
## レビュー
### {ユーザー名} ({状態})
> {レビュー本文}
---
## レビューコメント(ファイル別)
### {ユーザー名} のコメント
**ファイル**: {path}:{line}
> {コメント本文}
---
## Issueコメント
### {ユーザー名}
> {コメント本文}
development
`cc-code-review` エージェントを起動して独立したコンテキストでコードレビューを実行する。 現在のセッションのバイアスのないフレッシュな視点で、プロジェクトの CLAUDE.md を踏まえたレビューを行う。 トリガー: "cc-code-review", "ccでレビュー", "別の視点でレビュー", "セカンドオピニオン" 使用場面: (1) PRのコードレビュー (2) ブランチ差分のレビュー (3) 特定ファイルのレビュー (4) 現在の変更のレビュー
tools
Comprehensive guide for the `wtp` (Worktree Plus) CLI by satococoa — an enhanced Git worktree manager. Use this whenever the user wants to create, list, remove, or navigate Git worktrees with wtp, mentions `wtp add`/`wtp cd`/`wtp list`/`wtp remove`/`wtp exec`, asks about automatic worktree paths from branch names, post-create hooks (copy/symlink/command) in `.wtp.yml`, branch tracking for worktrees, or shell integration (`wtp shell-init`, `wtp hook`, tab completion, auto-cd). Trigger this even when the user just describes the workflow — e.g. 'spin up a worktree for this feature branch', 'jump to my auth worktree', 'clean up the worktree and its branch' — without naming wtp explicitly, as long as wtp is the available tool.
tools
Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector).
data-ai
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.