/omniagents-design-patterns:api-design [design|review|implement|evolve] <spec, proto, or feature>from omniagents-design-patterns
Use when designing, reviewing, or implementing a REST or gRPC API contract: resource names and hierarchy, standard vs custom methods, request/response fields, pagination, filtering, partial updates and field masks, long-running operations, error models and status codes, idempotency, etags, soft delete, batch methods, versioning, or breaking changes, where choices should follow Google's API Improvement Proposals (AIPs) or API Design Guide.
Ships in omniagents-design-patterns. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill deliberately encodes no Google API rules. Google's guidance
lives in the API Improvement Proposals at google.aip.dev, and it moves:
AIP-184 and interface-based versioning landed on 2026-08-17, and AIP-136,
AIP-164, and AIP-203 all changed earlier in 2026. Model priors on AIPs are
reliably stale on exactly the details reviewers check — the requirement
level, the condition a rule applies under, and its exceptions.
What this encodes instead: where each rule lives, how to retrieve it faithfully, how to label and cite every claim, and the house conventions for design docs, reviews, and code. Searching and retrieving mid-task is always allowed and expected. A retrieval costs seconds; a misremembered rule costs a redesign.
Establish these from the repo, or ask once. Each one changes the answer.
| Anchor | Why it decides the answer | Evidence |
|---|---|---|
| Mode | Quick question, design, review, implement, or evolve — sets retrieval depth and output shape | The ask |
| Surface | Proto-first, REST/OpenAPI-only, or both via transcoding — decides where wire facts come from | *.proto, buf.yaml, openapi*.y*ml, framework route files |
| Release status | Unreleased or live, and its stability level. On a live API the "fix" can be the breaking change | Version paths, changelogs, known clients |
| Local standard | Team standards and existing-surface conventions can outrank AIPs (see Precedence) | docs/api*, .api-linter.yaml, .spectral.y*ml, sibling specs, org AIPs |
| Consumers | One team, an internal platform, or external — sets the ceremony tier | Ask |
| Domain | If you cannot name each resource's parent and the top use cases, ask before designing | — |
No AIP number, AIP link, or must / should / may attributed to Google appears in your output — prose, table, code comment, or review finding — unless that AIP was retrieved in this session and the retrieved text contains the claim, including its condition.
Retrieval methods, best first:
/aip-dev/google.aip.dev — verbatim AIP markdown with the
bold keywords intact. Chunks can omit an exception stated elsewhere on the
page, so read the page's Guidance section before a rule becomes
load-bearing. Results link GitHub blobs; cite the rendered
https://google.aip.dev/{n} instead.curl -fsSL https://raw.githubusercontent.com/aip-dev/google.aip.dev/master/aip/general/0158.md | grep -nE '^#{1,4} |\*\*(must|should|may)( not)?\*\*'.
Numbers are four-digit zero-padded; scoped AIPs live under
aip/{scope}/. Lines wrap, so read neighbours with sed -n.Extraction prompt: "From AIP-{n}, for each rule about {topic}: its sentence (quoted if short), the requirement keyword exactly as bolded (must, must not, should, should not, may), its section heading, what it constrains, and any condition or scope (management plane, declarative-friendly, 'if present', existing APIs only). List exceptions. Say 'silent' if the page does not address {question}. Give the page state (approved, draft, reviewing)."
Depth by mode:
references/aip-map.md.https://google.aip.dev/general
once per session. Note any task-relevant AIP missing from the map and every
Draft or Reviewing badge.Ledger. Keep one row per source: id · title · URL · state · retrieved (date, method) · claims used (keyword + condition). References are built from it. Never retrieve a page twice, except to verify a claim verbatim once it becomes load-bearing (a must, a blocker, a deviation).
On failure, keep the decision, write AIP-n (unverified: not retrieved YYYY-MM-DD) with no level, and list it under Open questions. Never
substitute memory or a search snippet. Never guess a URL or an anchor.
Retrieve before writing the sentence when any is true:
Do not search for domain modelling (ask the user), team conventions (grep the repo, then ask once), or anything already in the ledger.
Search mechanics: query google aip <AIP term> — bare "AIP" also
matches unrelated products. Restrict rule searches to google.aip.dev
(allowed_domains in Claude Code) and discard off-domain hits; the filter
leaks. Retry once with another AIP term, then scan the index titles. Open
the page before using it.
Priors known to be stale — check the map's stale-priors list before relying on recall for versioning (184/185), errors (193), custom-method verbs (136), update masks (134), soft delete (164), batch atomicity (233–235), or field behaviour (203).
Every justifying claim carries exactly one type. Only [AIP] may say must, should, may, or requires.
| Type | Use for | Write it as |
|---|---|---|
| [AIP] | A rule in an approved AIP, in the ledger | "A negative pageSize fails with INVALID_ARGUMENT (AIP-158, must)." Keep any condition. |
| [AIP-DRAFT] | A Draft or Reviewing AIP | "AIP-162 (draft) recommends …" — informative, never "requires" |
| [SPEC] | Wire facts AIPs delegate: ProtoJSON, google.rpc.Code, RFCs | Link the spec |
| [PRECEDENT] | What a beta or GA Google API does | "Vertex AI v1 exposes …:predict (link)." Shows feasibility, not conformance |
| [TEAM] | Team standard or existing-surface convention | Link the doc or file |
| [JUDGMENT] | Our tradeoff | "We choose X because Y; alternative Z." No AIP link. "AIPs are silent on X" is a valid claim |
references/design-doc.md.
AIP text is CC BY 4.0; AIP code samples are Apache 2.0.Floor — never overridden silently: correctness (errors are never 2xx; verbs keep their semantics), security (authorization before existence; nothing leaks), data integrity. If anything below conflicts with the floor, flag it and ask.
Then, highest first:
Rows 2–3 apply to existing surfaces only. Record every conflict in the Deviations table; never pick silently.
Adopt now what is breaking to add later; defer what is additive. Copy
no Google infrastructure — projects/*/locations/* parents, *.googleapis.com
names, Google IAM permission strings, X-Goog-* headers, google.cloud.*
packages — unless the org genuinely has those concepts; the map flags
Google-specific guidance. Every heavyweight feature (a hierarchy level, an
LRO, etags, request IDs, batch, soft delete) carries a one-line reason or
moves to "Future additive options". The tier table is in
references/design-doc.md.
#… to an AIP URL you have not seen.| Mode | Read | Output |
|---|---|---|
| Quick question | aip-map.md | Ten lines or fewer, claim types, one or two citations, no template |
| Design | aip-map.md, design-doc.md; rest-and-openapi.md for REST | The API section, per the template |
| Review | aip-map.md, review.md; rest-and-openapi.md for REST | Findings → top three → already right → References |
| Implement | implement.md, rest-and-openapi.md | Code, tests, and in-code citations |
| Evolve a live API | review.md § Evolving a live API, aip-map.md | Each change classified additive or breaking, with a migration path |
All files are under references/. A quick question that
turns out to imply a full design should say so and offer the design.
must|should|requires|required|mandat|per AIP.
Each hit is a cited [AIP] claim, or it gets reworded.system
skill from this plugin
(../system/communication.md#picking-a-shape).
This skill starts once a request/response API is the chosen shape.../system/reliability.md#idempotency-keys).
This skill owns the request field and its promised semantics; system
owns the mechanism.202 + Location + Retry-After job
polling belongs to system
(../system/communication.md#asynchronous-request-reply).
When the API follows AIPs, the long-running-operation AIP governs the
contract and system governs the worker behind it.codebase-design for code-level interfaces.python:library-patterns or
typescript:library-patterns. An SDK for an AIP-style API mirrors the
server's field names.omniagents-reviewer. This skill grades a contract
against AIPs, borrowing the reviewer severity scale; it does not emit
reviewer JSON or join /review.writing:markdown-conventions;
persuasive framing is writing:measured-persuasion. This skill supplies
the API section's content and its citations.The map was verified against google.aip.dev at upstream commit 615875b
(2026-10-07) on 2026-10-11. Re-read the index when the map is more than six
months old or the index lists AIPs the map lacks. New Google facts belong in
the map as rows or stale-prior prompts — never as stances in this file.
What SKILL.md sets; muted values are Claude Code's defaults
Trigger for .proto files, OpenAPI or Swagger specs, endpoint lists, the API section of a design doc or RFC, and asks like "design an endpoint", "review this API", "is this a breaking change", "how should List paginate", "which error code", or "cite the AIP". Do not design or review an API contract from memory; load this skill first.
npx claudepluginhub gao-hongnan/omniagents --plugin omniagents-design-patterns4 skills in this plugin
/codebase-designUse when designing or improving a module's interface, judging whether a wrapper or layer earns its keep, deciding where a seam belongs, or making code testable through its interface. Supplies the interface-depth vocabulary — deep vs shallow modules, information hiding, the deletion test, seams, design it twice. The depth lens that complements the pattern catalogue: it answers "is this interface earning its complexity?", not "which pattern?"./softwareUse when designing or reviewing Python code shape inside one service: module/class boundaries, GoF patterns, DDD, functional Result/Option/ADT shapes, in-process concurrency, package architecture, code smells, anti-patterns, refactors, "what pattern?", "where should X live?", or "how should I model this?". For cross-service or distributed concerns, use the system skill instead.Other plugins' skills for the same job
/system