reviewing-prs

作成者: flutter

General workflow for fetching, inspecting, reviewing GitHub Pull Requests using the gh CLI, drafting user-aligned review comments, and securing approval before…

npx skills add https://github.com/flutter/devtools --skill reviewing-prs

Reviewing Pull Requests

This skill outlines the workflow for inspecting GitHub Pull Requests using the gh CLI, drafting review feedback, and securing user approval before posting review comments.

Approval Safeguard (Strict Requirement)

[!IMPORTANT] NEVER post comments or reviews to GitHub without explicit prior user approval. Always present draft review comments to the user in natural language first. Only execute write commands (gh pr comment, gh pr review) after the user approves.

Workflow

1. Request Information via GitHub CLI

  • PR Details:
    gh pr view <pr-number> --repo <owner/repo> --json title,body,author,state,headRefName,baseRefName,comments,reviews,files
    
  • Code Diff:
    gh pr diff <pr-number> --repo <owner/repo>
    
  • Existing Inline Comments:
    gh api repos/<owner/repo>/pulls/<pr-number>/comments
    
  • CI / Status Checks:
    gh pr checks <pr-number> --repo <owner/repo>
    

2. Inspect Context & Prior Feedback

  • Read the PR description, linked issues, and full diff.
  • Verify whether existing bot or human comments have already been addressed in subsequent commits.

3. Draft Review Comments

  • Keep comments direct, concise, and focused on code quality and correctness.
  • Approvals: Keep comments concise (LGTM or A couple comments but lgtm.). Avoid fluffy praise or re-summarizing the PR.
  • Actionable Feedback: Reference specific files, line numbers, and rationale when leaving suggestions.

4. Present Draft & Post Only Upon User Approval

[!IMPORTANT] NEVER post comments or reviews to GitHub without explicit prior user approval.

  1. Present the drafted review comments to the user in your response window.
  2. Ask for confirmation: "Would you like me to submit this review to GitHub?"
  3. Once explicitly approved by the user, post the review:
    gh pr review <pr-number> --repo <owner/repo> --comment --body "<approved review text>"
    

flutterのその他のスキル

adding-release-notes
flutter
DevToolsのリリースノートにユーザー向けの変更説明を追加します。NEXT_RELEASE_NOTES.mdファイルに改善点、修正、新機能を文書化する際に使用します。
official
dart-modern-features
flutter
モダナイゼーションの候補を見つけるには:
official
api-review
flutter
指定されたコードを標準的なAPI設計ガイドラインに照らしてレビューします。ユーザーがAPIレビューを依頼した場合や、コードをAPI設計に照らして確認したい場合にこのスキルを使用します。
official
code-documentation
flutter
効果的なコードドキュメントを書くためのガイド。docstring、JSDoc、dartdoc、実装コメントを含む。新しいコードを書く際や追加する際にこのスキルを使用する。
official
dart-add-unit-test
flutter
Write and organize unit tests for functions, methods, and classes using `package:test`. Use when creating new logic or fixing bugs to ensure code remains…
official
dart-build-cli-app
flutter
エントリポイント構造、終了コード、クロスプラットフォームのスクリプト。コマンドラインユーティリティ、スクリプト、またはアプリケーションを構築する際に使用します。
official
dart-collect-coverage
flutter
coverageパッケージを使用してカバレッジを収集し、LCOVレポートを作成します
official
dart-fix-runtime-errors
flutter
get_runtime_errors と lsp を使用してアクティブなスタックトレースを取得し、失敗している行を特定して修正を適用し、hot_reload で解決を確認します。
official