What problem does it solve?
This Skill eliminates the risk of inconsistent, broken API contracts for the Cambridge Beer Festival app by enforcing a strict proto-first workflow, where Protocol Buffer (proto) definitions are the single source of truth for all API surfaces, preventing accidental drift between the contract, generated artifacts, and deployed Cloudflare Worker implementation.
Core Features & Use Cases
- Proto-first workflow enforcement: Provides the exact ordered command sequence for formatting, linting, API linting, and generating OpenAPI specs and client code after any proto change, plus documents CI gate behavior and sandbox limitations for proto tasks.
- AIP guideline defence: Includes a canonical AIP known-facts table with concrete evidence from the repo's own contract to resist incorrect automated review suggestions (e.g., duplicate etag fields, wrong soft-delete return types, incorrect parent annotations).
- Contract drift tracking: Explicitly documents the gap between the current proto contract (DrinkEntry/DrinkSummary) and the deployed worker's older Review/ReviewSummary surface, plus rules for evolving the contract without breaking existing clients.
- Use Case: If an automated review comment claims an API change requires adding a duplicate etag request field, use this Skill to verify the AIP-154 rule that etag is OUTPUT_ONLY and the correct fix is documenting If-Match support, not adding a redundant request field.
Quick Start
Use the api-contract skill to validate a proposed API change against AIP guidelines and the repo's contract rules before editing any proto files or responding to automated review comments.