agentsclimarketplace

Api design

Skill subhansh-dev/agent-maxxing/engineering/api-design

REST API design patterns — naming, versioning, error handling, pagination, authentication.From its SKILL.md

Install
npx -y skills add subhansh-dev/agent-maxxing --skill 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

  • 2 stars2 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

1.7 KB, 460 tokens by cl100k_base, as published. Nobody here has run it

API Design Patterns

Naming

  • Use nouns, not verbs: /users not /getUsers
  • Use plural: /users not /user
  • Use kebab-case for multi-word: /user-profiles
  • Nest for relationships: /users/123/posts

HTTP Methods

  • GET — read (idempotent)
  • POST — create
  • PUT — replace (idempotent)
  • PATCH — partial update
  • DELETE — remove (idempotent)

Status Codes

  • 200 — OK
  • 201 — Created
  • 204 — No Content (successful DELETE)
  • 400 — Bad Request (validation error)
  • 401 — Unauthorized (no token)
  • 403 — Forbidden (no permission)
  • 404 — Not Found
  • 409 — Conflict (duplicate)
  • 422 — Unprocessable (valid JSON, invalid data)
  • 429 — Too Many Requests
  • 500 — Internal Server Error

Error Response

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Email is required",
    "details": [
      { "field": "email", "message": "Required" }
    ]
  }
}

Pagination

GET /users?page=2&limit=20

{
  "data": [...],
  "pagination": {
    "page": 2,
    "limit": 20,
    "total": 150,
    "totalPages": 8
  }
}

Authentication

  • Use Bearer tokens: Authorization: Bearer <token>
  • Return 401 for missing/invalid tokens
  • Return 403 for insufficient permissions

Versioning

  • URL path: /v1/users (simplest, most common)
  • Header: Accept: application/vnd.api.v1+json

Rate Limiting

Return headers:

  • X-RateLimit-Limit: max requests per window
  • X-RateLimit-Remaining: requests left
  • X-RateLimit-Reset: when the window resets

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. 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.