agentsclimarketplace

Mav bp api design

Skill thermiteau/maverick/skills/mav-bp-api-design

API design conventions for projects with API surfaces. Covers REST and GraphQL standards, versioning, error formats, pagination, documentation as code, and backwards compatibility. Applied when designing, implementing, or reviewing APIs.From its SKILL.md

Install
npx -y skills add thermiteau/maverick --skill mav-bp-api-design

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 11 stars11 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.6 KB, as published. Nobody here has run it

API Design Standards

Ensure all APIs (REST, GraphQL, or any other surface) are consistent, predictable, documented as code, and backwards compatible by default.

Maverick's Rules

  • Backwards compatible by default — additions are safe; removing/renaming fields, changing types or semantics, making optional fields required, changing URL structure, or removing endpoints requires a version bump. Support at minimum the current and previous version. Deprecate before removal: mark in the spec, send Deprecation/Sunset headers, log usage, communicate a timeline, remove only at zero usage.
  • One versioning strategy per project (URL path or Accept header), applied consistently; increment only for breaking changes.
  • Consistent error envelope on every error: machine-readable code (a string constant, not the HTTP status), user-safe message, optional field-level details, and a correlationId. Never expose stack traces, internal paths, or implementation details.
  • Documentation generated from source — OpenAPI generated from or validated against code; GraphQL via introspection. Never a separately maintained wiki (it drifts). Include examples, auth requirements, rate limits, and error codes.
  • Pagination on every list endpoint — cursor-based preferred (opaque cursors, cursor + limit params, documented maximum); offset-based only for small, stable datasets needing random page access.
  • Rate limiting on all public endpoints — return 429, include X-RateLimit-* and Retry-After headers, apply per-tier limits, document them.
  • Idempotency: PUT/DELETE idempotent by design; POST operations that must be idempotent (e.g., payments) require an Idempotency-Key header with cached-response replay and a TTL. Document which endpoints support it.
  • Validate at the boundary before business logic runs; reject unexpected fields rather than silently ignoring them; enforce size limits. See mav-bp-application-security.
  • GraphQL specifics: fields non-nullable by default (nullable only when absence is a valid state); enforce query depth/complexity limits; DataLoader or equivalent for N+1 prevention; persisted queries in production where possible.

Project Implementation Lookup

Check for docs/maverick/skills/api-design/SKILL.md. If present, read it and follow it — it wins on specifics (library, config, conventions). If missing, proceed with these standards and note the gap in your summary.

Detecting API Issues in Code Review

When reviewing code, flag these patterns:

PatternIssueFix
Verbs in URL paths (/getUser, /createOrder)REST anti-patternUse nouns with HTTP methods
200 OK returned for error conditionsIncorrect status codeUse appropriate 4xx/5xx codes
No input validation on request handlersSecurity and data integrity riskValidate at the boundary
Stack traces or internal paths in error responsesInformation disclosureUse standard error format, log details server-side
Inconsistent field naming (camelCase vs snake_case)Breaks predictabilityPick one convention and apply everywhere
Missing pagination on list endpointsPerformance risk at scaleAdd cursor or offset pagination
Breaking change without version bumpBackwards compatibility violationBump version or make the change additive
No rate limiting on public endpointsAbuse and availability riskImplement rate limiting with appropriate headers
No idempotency on payment/financial endpointsDuplicate processing riskRequire idempotency keys
API docs maintained separately from codeDocumentation driftGenerate docs from source (OpenAPI, introspection)
<!-- maverick-plugin-version: 4.0.1 -->

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.