api-design-patterns

When to use this skill

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "api-design-patterns" with this command: npx skills add sraloff/gravityboots/sraloff-gravityboots-api-design-patterns

API Design Patterns

When to use this skill

  • Designing new API endpoints.

  • Documenting APIs (OpenAPI/Swagger).

  • Implementing authentication strategies.

  1. RESTful Conventions
  • Nouns: Use nouns for resources (/users , not /getUsers ).

  • Verbs: Use correct HTTP methods (GET read, POST create, PUT replace, PATCH update, DELETE remove).

  • Status Codes: 200 OK, 201 Created, 400 Bad Request, 401 Unauth, 403 Forbidden, 404 Not Found, 422 Validation Error.

  1. Response Structure
  • Envelope: Standardize response JSON. { "data": { ... }, "meta": { "pagination": ... } }

  • Errors: Return structured error objects, not just plain strings.

  1. Versioning
  • URL: /api/v1/resource is preferred for explicit versioning.

  • Breaking Changes: Never introduce breaking changes to an existing version. Create v2.

  1. Authentication
  • Bearer Token: Use Authorization: Bearer <token> (JWT or Opaque).

  • Stateless: API should rarely rely on session cookies (CSRF issues) unless it is a first-party SPA.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

apache-lamp-config

No summary provided by upstream source.

Repository SourceNeeds Review
General

caddy-modern-config

No summary provided by upstream source.

Repository SourceNeeds Review
General

postgresql-query-opt

No summary provided by upstream source.

Repository SourceNeeds Review