SKILL · multi-agent-orchestration

Skill: agent-callable API review

A review skill that audits an API against the agent-readiness bar: intent-revealing operations, RFC 9457 errors with recovery hints, idempotency keys, rate-limit headers, and programmatic auth.

✓ verified 2026-07-18 · stack: claude-code · source

APIs designed for developers reading docs fail quietly when the caller is an agent: the intent is buried in CRUD choreography, errors explain nothing actionable, and retries duplicate orders. The readiness bar is specific (zuplo), which makes it reviewable. This prompt turns it into a repeatable audit; run it against an OpenAPI spec or a controller package.

.claude/skills/api-agent-review/SKILL.md
---
description: Audit an API surface for agent-callability. Use when asked
to review an API, an OpenAPI spec, or controllers for use by AI agents
or MCP tools. Produces a findings table against the six-point bar.
---
Audit the given API surface against six criteria. For each: PASS, GAP
(with the specific endpoint), or N/A. Finish with the three highest-value
fixes.
1. Intent-revealing operations. Business capabilities, not CRUD
choreography: an agent should not need to discover that placing an
order means POST /carts then three more calls. Look for missing
capability endpoints (e.g. POST /orders/place) and operation
descriptions that say when and why, not just what.
2. RFC 9457 errors. Every error response carries application/problem+json
with a stable type identifier, a human-readable explanation, recovery
suggestions that tell the caller what to try next, and field-level
validation detail. An error an agent cannot act on is a dead end.
3. Idempotency. All state-changing endpoints accept an idempotency key,
so a retried request cannot double-charge or double-create. Check the
retry story endpoint by endpoint.
4. Rate-limit legibility. X-RateLimit-Remaining and Retry-After on
responses; burst room for multi-step workflows; agent traffic
distinguishable from human traffic.
5. Programmatic auth. Token or API key flows with no browser redirect in
the path; credentials that can be provisioned, scoped, and rotated
without a human clicking.
6. Schema completeness. Request/response schemas with examples for every
operation; enums closed; nullable stated; pagination described where
lists can grow.
Rules: cite the spec or code line for every GAP; never propose breaking
changes as fixes when an additive path exists; if the surface is an MCP
server, apply the same bar to tool descriptions and error returns.

What it does

  • Converts the readiness gap into six binary checks with the burden of evidence on the reviewer: every GAP names its endpoint and line, so the output is a work list rather than an opinion.
  • Criterion 1 is the architectural one: “an agent shouldn’t need to figure out that ‘placing an order’ requires calling POST /carts”. Capability endpoints are additive; the review recommends them without breaking the CRUD surface underneath.
  • Criterion 2 encodes the RFC 9457 contract including the part teams skip: “recovery suggestions that tell the agent what to try next”. A stable type URI plus a next-step hint is what turns an error into a plan.
  • Criterion 3 is the money one: “all state-changing endpoints should support idempotency keys”, because agents retry by design and a retry without idempotency is a duplicate side effect.
  • The MCP rule at the end matters for this site’s stack: tool descriptions and tool errors are the same surface in miniature, and the agent-callable APIs pattern carries the full argument.

Failure modes

  • A checklist pass is not an integration test. The audit reads specs and code; it cannot observe a live gateway stripping headers or a proxy swallowing problem+json bodies. Confirm the top findings against real responses before spending on fixes.
  • Idempotency theatre. Accepting the header is not honouring it; a GAP only closes when a repeated request with the same key provably returns the original result. Ask for the test, not the header.
  • Skill scope. As a skill this loads on demand and costs nothing until used; it audits what it is pointed at, so name the spec file or package explicitly when invoking, or it will sample and miss endpoints.

Verified against the intent-revealing endpoint, RFC 9457, idempotency, rate-limit header, and programmatic-auth prescriptions at zuplo.com/learning-center/api-readiness-gap-agent-callable-apis, 2026-07-18.