claude/skills/github-pr-review-operation/SKILL.md
GitHub Pull Requestのレビュー操作を行うスキル。PR情報取得、差分確認、コメント取得・投稿、インラインコメント、コメント返信をghコマンドで実行する。PRレビュー、コードレビュー、PR操作が必要な時に使用。
npx skillsauth add kazuph/dotfiles github-pr-review-operationInstall 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.
GitHub CLI (gh) を使ったPRレビュー操作。
gh インストール済みgh auth login で認証済みPR URL https://github.com/OWNER/REPO/pull/NUMBER から以下を抽出して使用:
OWNER: リポジトリオーナーREPO: リポジトリ名NUMBER: PR番号gh pr view NUMBER --repo OWNER/REPO --json title,body,author,state,baseRefName,headRefName,url
gh pr diff NUMBER --repo OWNER/REPO | awk '
/^@@/ {
match($0, /-([0-9]+)/, old)
match($0, /\+([0-9]+)/, new)
old_line = old[1]
new_line = new[1]
print $0
next
}
/^-/ { printf "L%-4d | %s\n", old_line++, $0; next }
/^\+/ { printf " R%-4d| %s\n", new_line++, $0; next }
/^ / { printf "L%-4d R%-4d| %s\n", old_line++, new_line++, $0; next }
{ print }
'
出力例:
@@ -46,15 +46,25 @@ jobs:
L46 R46 | prompt: |
L49 | - (削除行)
R49 | + (追加行)
L50 R50 | # レビューガイドライン
L数字: LEFT(base)側の行番号 → インラインコメントでside=LEFTに使用R数字: RIGHT(head)側の行番号 → インラインコメントでside=RIGHTに使用Issue Comments(PR全体へのコメント):
gh api repos/OWNER/REPO/issues/NUMBER/comments --jq '.[] | {user: .user.login, created_at, body}'
Review Comments(コード行へのコメント):
gh api repos/OWNER/REPO/pulls/NUMBER/comments --jq '.[] | {id, user: .user.login, path, line, created_at, body, in_reply_to_id}'
gh pr comment NUMBER --repo OWNER/REPO --body "コメント内容"
まずhead commit SHAを取得:
gh api repos/OWNER/REPO/pulls/NUMBER --jq '.head.sha'
単一行コメント:
gh api repos/OWNER/REPO/pulls/NUMBER/comments \
--method POST \
-f body="コメント内容" \
-f commit_id="COMMIT_SHA" \
-f path="src/example.py" \
-F line=15 \
-f side=RIGHT
複数行コメント(10〜15行目):
gh api repos/OWNER/REPO/pulls/NUMBER/comments \
--method POST \
-f body="コメント内容" \
-f commit_id="COMMIT_SHA" \
-f path="src/example.py" \
-F line=15 \
-f side=RIGHT \
-F start_line=10 \
-f start_side=RIGHT
注意点:
-F (大文字): 数値パラメータ(line, start_line)に使用。-fだと文字列になりエラーになるside: RIGHT(追加行)または LEFT(削除行)gh api repos/OWNER/REPO/pulls/NUMBER/comments/COMMENT_ID/replies \
--method POST \
-f body="返信内容"
COMMENT_IDはコメント取得で得たidを使用。
tools
X (Twitter) API read-only CLI. Bookmarks retrieval, tweet search, engagement analytics (likes/RT aggregation), mentions, user lookup. Use when: reading X bookmarks, searching tweets, aggregating likes/retweets, checking mentions, looking up users. Triggers: bookmark, bookmarks, X search, Twitter search, likes count, RT count, engagement, tweet analytics.
testing
単体テスト方針の要約。Kiro流で使うときは本文を必ず参照・展開する。
tools
Send prompts to other AI CLIs (Codex, Claude Code) running in sibling tmux panes and receive results back. Use this skill when the user asks to send a question or task to Codex or another Claude Code instance in a tmux pane. Handles pane discovery, CLI startup if needed, prompt delivery with proper Enter timing, delivery verification, and result return via tmux send-keys.
data-ai
TAKT ピースエンジン。Agent Team を使ったマルチエージェントオーケストレーション。ピースYAMLワークフローに従ってマルチエージェントを実行する。