google-agents-cli-scaffold
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
copilot-review
GitHub Copilot PRレビュー対応ワークフロー(コメント取得→修正→返信→解決)
Full skill instructions
GitHub Copilot によるPRレビューコメントへの対応を効率化します。レビューコメントの取得から修正、返信、スレッド解決までを自動化し、PRレビュー対応時間を15分→3分に短縮(80%削減)します。
重要: ブランチ保護ルールにより、全てのコメントを解決しないとマージできません。
スキル呼び出し時にPR番号を指定してください:
/copilot-review <PR番号>
または
/copilot-review
PR番号: <番号>
GitHub APIを使用してPRのレビューコメントを取得します。
コマンド:
gh api repos/foie0222/baken-kaigi/pulls/<PR番号>/comments \
--jq '.[] | {id, path, line, body, user: .user.login}'
出力例:
{
"id": 123456789,
"path": "backend/src/domain/ports/race_data_provider.py",
"line": 25,
"body": "Consider adding type hints for the return value",
"user": "copilot"
}
判断基準:
user: "copilot")のみを対象レビューコメントを以下のカテゴリーに分類:
Critical(即座に対応):
High(優先対応):
Medium(推奨対応):
Low(任意対応):
各コメントに対して以下のいずれかを提案:
| 優先度 | 許可される対応 | 禁止される対応 |
|---|---|---|
| Critical | 修正のみ | 説明返信、延期、スキップ |
| High | 修正、または技術的根拠のある説明返信 | 延期、スキップ |
| Medium | 修正、説明返信 | なし |
| Low | 修正、説明返信、スキップ | なし |
Critical指摘の例と必須対応:
High指摘の例と対応:
重要: Critical指摘に対して「説明返信」で済ませることは絶対に禁止。必ずコードを修正すること。
提案フォーマット:
📝 レビューコメント #1 [Critical]
ファイル: backend/src/domain/ports/race_data_provider.py:25
指摘: Consider adding type hints for the return value
提案: 修正する
理由: 型ヒントはコードの可読性と保守性を向上させる
修正内容: 戻り値の型ヒントを追加
ユーザーの承認後、Editツールを使用して修正を実施します。
修正パターン:
# Before
def get_race(self, race_id):
pass
# After
def get_race(self, race_id: RaceId) -> RaceData | None:
pass
# Before
data = response.json()
return data["value"]
# After
try:
data = response.json()
return data.get("value")
except (KeyError, ValueError) as e:
logger.error(f"Failed to parse response: {e}")
return None
def test_get_race_not_found():
"""存在しないレースIDの場合Noneを返す."""
# Arrange
provider = MockRaceDataProvider()
race_id = RaceId("invalid_id")
# Act
result = provider.get_race(race_id)
# Assert
assert result is None
修正をコミットしてプッシュします。
コマンド:
git add <修正ファイル>
git commit -m "fix: Copilotレビュー指摘対応 - <概要>"
git push
コミットメッセージ例:
fix: Copilotレビュー指摘対応 - 型ヒント追加fix: Copilotレビュー指摘対応 - エラーハンドリング改善test: Copilotレビュー指摘対応 - テストケース追加修正内容または説明をコメントに返信します。
コマンド:
gh api repos/foie0222/baken-kaigi/pulls/<PR番号>/comments/<コメントID>/replies \
-X POST \
-f body='<返信内容>'
返信テンプレート:
✅ 修正しました。
変更内容:
- <変更1>
- <変更2>
コミット: <コミットハッシュ>
📝 現在の実装理由
<理由の説明>
そのため、この指摘については現状維持とさせていただきます。
修正完了後、レビュースレッドを解決します。
ステップ7-1: スレッドID取得
gh api graphql -f query='
query {
repository(owner: "foie0222", name: "baken-kaigi") {
pullRequest(number: <PR番号>) {
reviewThreads(first: 20) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
databaseId
body
}
}
}
}
}
}
}'
ステップ7-2: スレッド解決
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "<スレッドID>"}) {
thread {
isResolved
}
}
}'
全てのコメントに対応したことを確認します。
確認コマンド:
# 未解決のスレッド数を確認
gh api graphql -f query='
query {
repository(owner: "foie0222", name: "baken-kaigi") {
pullRequest(number: <PR番号>) {
reviewThreads(first: 20) {
nodes {
isResolved
}
}
}
}
}' --jq '.data.repository.pullRequest.reviewThreads.nodes | map(select(.isResolved == false)) | length'
期待値: 0(全スレッド解決済み)
📊 Copilot レビュー対応サマリー
PR番号: #<番号>
レビューコメント総数: <件数>
対応状況:
✅ 修正済み: <件数>
📝 説明返信: <件数>
⏭️ スキップ: <件数>
詳細:
---
📝 コメント #1 [Critical]
ファイル: backend/src/domain/ports/race_data_provider.py:25
指摘: Consider adding type hints for the return value
対応: ✅ 修正済み
返信: "型ヒントを追加しました。"
---
次のアクション:
- [ ] 全スレッド解決確認(gh api graphqlで確認)
- [ ] CI/CD成功確認
- [ ] マージ実行
GraphQL API認証エラー
Error: HTTP 401: Unauthorized
gh auth login で再認証スレッドIDが見つからない
Error: Invalid thread ID
コメント返信に失敗
Error: Resource not accessible by integration
gh CLI の権限スコープを確認(repo スコープが必要)マージブロック
Error: Required reviews not satisfied
fix: Copilotレビュー指摘対応 - <具体的な修正内容>/copilot-review 42
📊 Copilot レビュー対応サマリー
PR番号: #42
レビューコメント総数: 3件
対応状況:
✅ 修正済み: 2件
📝 説明返信: 1件
詳細:
---
📝 コメント #1 [High]
ファイル: backend/src/domain/ports/race_data_provider.py:25
指摘: Consider adding type hints for the return value
対応: ✅ 修正済み
返信: "戻り値の型ヒントを追加しました。"
コミット: abc1234
---
📝 コメント #2 [Medium]
ファイル: backend/src/api/handlers/races.py:50
指摘: Consider extracting this to a separate function
対応: 📝 説明返信
返信: "現状のロジックは十分シンプルであり、抽出するとかえって複雑になると判断しました。"
---
次のアクション:
- [x] 全スレッド解決確認
- [ ] CI/CD成功確認
- [ ] マージ実行
/copilot-review 45
📊 Copilot レビュー対応サマリー
PR番号: #45
レビューコメント総数: 1件
対応状況:
✅ 修正済み: 1件
詳細:
---
📝 コメント #1 [Critical]
ファイル: backend/src/api/handlers/races.py:30
指摘: Potential SQL injection vulnerability
対応: ✅ 修正済み
返信: "パラメータ化クエリに変更し、SQLインジェクションを防止しました。"
コミット: def5678
---
次のアクション:
- [x] 全スレッド解決確認
- [x] CI/CD成功確認
- [ ] マージ実行
# PR一覧表示
gh pr list
# PR詳細表示
gh pr view <PR番号>
# レビューコメント取得
gh api repos/foie0222/baken-kaigi/pulls/<PR番号>/comments
# コメントに返信
gh api repos/foie0222/baken-kaigi/pulls/<PR番号>/comments/<コメントID>/replies \
-X POST -f body='返信内容'
# スレッド情報取得
gh api graphql -f query='...'
# スレッド解決
gh api graphql -f query='mutation { resolveReviewThread(...) }'
query {
repository(owner: "foie0222", name: "baken-kaigi") {
pullRequest(number: <PR番号>) {
reviewThreads(first: 20) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
body
path
}
}
}
}
}
}
}
mutation {
resolveReviewThread(input: {threadId: "<スレッドID>"}) {
thread {
isResolved
}
}
}
コメントが来たら真摯に対応し、対応完了後に返信してクローズ。
順序を厳守:
先に返信してから修正するのは禁止。修正してから返信。
以下の返信は絶対に禁止:
理由: これらは技術的負債の先送りであり、PRの品質基準を満たさない。 Critical/High指摘に対してこれらの返信をした場合、PRはマージ不可。
特に「テスト不足」の指摘に対して:
コメントが「対応完了」となる条件:
Critical指摘は修正以外の対応は認められない。High指摘は修正、または技術的根拠のある説明返信が必要。
Critical指摘の場合:
High指摘の場合:
Medium/Low指摘の場合:
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.
Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.
Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.
Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.
Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.
Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.
Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Opus.ai: Revolutionize Your Web Experience
Build a no-code AI app in minutes.
An IDE for code migration from legacy to modern frameworks through coding agents.
Automate CGI animation in live-action scenes
Branded artistic QR-code concepts
Launch a website in seconds with AI.
Streamline Your Coding Experience with AI Code Helper
Convert any screenshot or design to clean code.