protobuf-grpc-api-review
できること
このツールは、「.proto」という設定ファイルと、gRPCという通信APIの変更を分析します。これらのファイルを使う異なるシステムにとって変更が安全かどうかを確認し、古いバージョンと新しいバージョンが混在しても全体が動き続けるようにします。
使う場面
- ✓「.proto」ファイルの変更をレビューするとき。
- ✓メッセージやサービスを追加または変更するとき。
- ✓これらの設定を使うシステムを更新する計画を立てるとき。
スキルのリンク
https://github.com/github/awesome-copilot/blob/main/skills/protobuf-grpc-api-review/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このprotoファイルの変更を分析して、本番環境で使っても安全かどうか教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
ツールは古いバージョンと新しいバージョンのファイルを比較し、バイナリやJSONなどの形式でデータが正しく読み書きできるかを確認します。また、これらのファイルを使うシステムがどのように更新されるかも考慮します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Protobuf and gRPC API Review
Review .proto and related gRPC changes as long-lived contracts. Distinguish what the wire format permits from what generated clients, JSON users, stored data, and mixed-version deployments can safely tolerate.
Start With the Compatibility Envelope
Before deciding whether a change is safe, determine:
- the old and new schema, not only the final file
- whether payloads use binary protobuf, ProtoJSON, text format, or more than one encoding
- whether messages persist in databases, queues, logs, caches, or events
- whether clients exist outside the repository or release independently
- the protobuf syntax or edition and the generated languages/runtime versions
- whether HTTP/JSON transcoding, reflection, service config, or schema registries expose the contract
- the deployment order, rollback window, and duration of mixed-version operation
If context is missing, state the assumption and lower confidence. Do not call a change backward-compatible from the new schema alone.
Review Workflow
1. Inventory Contract Changes
Compare the old and new definitions by fully qualified symbol. Record:
- message fields: number, name, type, cardinality, presence,
oneof, defaults, and relevant options - enums: value name, number, aliases, reservations, and zero value
- services: package, service, method, request and response types, and streaming mode
- generated API inputs: package options, outer class names, namespaces, and custom options
Ignore formatting-only changes after confirming they do not alter descriptors or generated APIs.
2. Evaluate Four Compatibility Dimensions
Assess each affected symbol independently:
- Binary wire — can old and new readers parse both old and new bytes without corruption or loss?
- Named formats — do ProtoJSON, text-format, REST-transcoded, or name-based consumers still work?
- Source and generated API — will regenerated clients compile and preserve presence, enum, and accessor behavior?
- Behavior and operations — do status codes, retry safety, deadlines, authorization, streaming, and resource bounds preserve the RPC contract?
Read protobuf compatibility rules for field, enum, presence, oneof, and serialization changes. Read gRPC contract review when services, methods, or runtime behavior change.
3. Trace Mixed-Version Scenarios
For every non-trivial change, reason through these paths:
- old writer -> new reader
- new writer -> old reader
- old reader modifies and reserializes a new message
- rollback after new writers have emitted new values
- persisted old data read after the migration
For conditionally compatible changes, identify the exact writer constraint and the point at which it may be relaxed. A safe rollout commonly requires deploying readers before writers and retaining the old field or method until rollback is no longer needed.
4. Review Repository Evidence
Use the repository's own tooling when available:
- compile descriptors with the project's
protoc, Buf, Gradle, Maven, Bazel, or language-specific task - run configured breaking-change or lint checks
- inspect generated-code diffs only when they are committed by repository convention
- search call sites for exhaustive enum switches, presence assumptions, JSON field names, method paths, status handling, and retry configuration
- look for compatibility fixtures or descriptor baselines before proposing a new mechanism
Do not claim a check passed unless you ran it. If a required tool or baseline is unavailable, name the unverified risk.
5. Produce an Actionable Review
Lead with one verdict:
- Compatible — safe within the stated compatibility envelope
- Rollout-dependent — parseable, but safe only with explicit sequencing or value constraints
- Breaking — causes wire, named-format, source, or behavioral incompatibility
- Insufficient context — the old schema, encoding, consumers, or deployment model is unknown
Then provide only evidence-backed findings. For each finding include:
[severity] Short title
Location: file and symbol or changed lines
Dimension: binary | JSON/text | source | behavior/operations
Change: old contract -> new contract
Impact: concrete failing mixed-version scenario
Remediation: smallest safe schema change or staged migration
…
よくある質問
「.proto」ファイルとgRPCとは何ですか?
「.proto」ファイルは、データの構造を定義するものです。gRPCは、そのデータ構造を使って異なるプログラム同士が通信するための仕組みです。
この文脈での「互換性」とはどういう意味ですか?
新しい変更によって、古いバージョンを使っているシステムが壊れないこと、またその逆もないことを意味します。新しいスマホが古い充電器でも使えるようにする、というイメージです。
JSONの互換性を確認するのはなぜ重要ですか?
多くのシステムはJSONで情報をやり取りしています。「.proto」ファイルの変更がJSONと互換性を持たないと、それらのシステムが動かなくなる可能性があります。
詳細
作者による元の説明
Review Protocol Buffer (.proto) and gRPC API changes for wire and JSON compatibility, safe schema evolution, rollout hazards, and RPC contract quality. Use when reviewing proto diffs, adding or changing messages and services, planning migrations, or diagnosing cross-version failures.
repo: github/awesome-copilot
人気
- GitHubのスター
- 40k
- ランキング
- #7347
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
acquire-codebase-knowledge
40kエージェントが、既存のコードプロジェクトを理解してドキュメント化できるよう支援します。新しく参加するメンバーのオンボーディングや、アーキテクチャの全体像の把握に役立ちます。
acreadiness-assess
40kエージェントが、プロジェクトのAI対応状況を評価してレポートを生成できるよう支援します。プロジェクトがAIツールをどの程度活用できる状態にあるかを把握するのに役立ちます。
acreadiness-generate-instructions
40kエージェントが、評価結果をもとにAIツール向けの指示文を作成できるよう支援します。AIがコードとどのようにやり取りするかを改善し、特定された不足点を解消するのに役立ちます。
acreadiness-policy
40kエージェントが、AIプロジェクトの評価ポリシーの策定や適用を支援できるようにします。プロジェクトの評価方法を標準化し、コンプライアンスを確保するのに役立ちます。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。