agentsclimarketplace

Restful api design

Skill AtulPurohit/Antigravity-Awesome-Skills/skills/restful-api-design

Installable GitHub library of 300+ professional agentic skills for Claude Code, Antigravity IDE, Gemini CLI, Cursor, and Copilot. Features a custom NPX installer, 9 stack-specific bundles, validation schemas, security auditing, and an interactive catalog explorer app.

Install
npx -y skills add AtulPurohit/Antigravity-Awesome-Skills --skill restful-api-design

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

3 things to look at

  • 26 days oldThe repository was created 26 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 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.

What its author says it does

Copied from the file, not written here

Design professional RESTful APIs following HTTP standards, REST constraints, and industry best practices. Covers versioning, pagination, filtering, and HATEOAS.

SKILL.md

4.6 KB, as published. Nobody here has run it

RESTful API Design Expert

Purpose

Design RESTful APIs that are intuitive, consistent, well-documented, and follow HTTP standards and REST architectural constraints.

Operating Mode

You are a REST API design authority. You produce OpenAPI specs, enforce consistency, and ensure APIs are developer-friendly.

Core REST Principles

1️⃣ Resource-Oriented Design

# ✅ Good: noun-based resources
GET    /users              # List users
GET    /users/123          # Get specific user
POST   /users              # Create user
PATCH  /users/123          # Partial update
PUT    /users/123          # Full replace
DELETE /users/123          # Delete user

# Sub-resources
GET    /users/123/orders   # User's orders
POST   /users/123/orders   # Create order for user

# ❌ Bad: verb-based
POST /createUser
GET  /getUserById?id=123
POST /deleteUser

2️⃣ HTTP Status Codes (Complete Reference)

200 OK          - Successful GET, PATCH, PUT
201 Created     - Successful POST (include Location header)
204 No Content  - Successful DELETE
400 Bad Request - Invalid request body/params
401 Unauthorized - No or invalid auth token
403 Forbidden    - Authenticated but not authorized
404 Not Found    - Resource doesn't exist
409 Conflict     - Duplicate resource, version conflict
422 Unprocessable - Validation errors
429 Too Many Requests - Rate limited
500 Internal Server Error
503 Service Unavailable

3️⃣ Request/Response Standards

// ✅ Consistent response envelope
// Success (single resource)
{
  "data": {
    "id": "123",
    "type": "users",
    "attributes": {
      "name": "John Doe",
      "email": "[email protected]",
      "createdAt": "2026-07-10T10:00:00Z"
    },
    "relationships": {
      "orders": { "links": { "related": "/users/123/orders" } }
    }
  },
  "meta": { "requestId": "abc123" }
}

// Success (collection)
{
  "data": [...],
  "meta": {
    "total": 100,
    "page": 1,
    "perPage": 20,
    "totalPages": 5
  },
  "links": {
    "self": "/users?page=1",
    "next": "/users?page=2",
    "last": "/users?page=5"
  }
}

// Error response (RFC 7807)
{
  "type": "https://api.example.com/errors/validation",
  "title": "Validation Failed",
  "status": 422,
  "detail": "One or more fields failed validation",
  "errors": {
    "email": ["Email is already taken"],
    "name": ["Name is required"]
  }
}

4️⃣ Filtering, Sorting & Pagination

# Filtering
GET /products?status=active&category=electronics
GET /orders?created_after=2026-01-01&min_total=100

# Sorting (prefix with - for descending)
GET /products?sort=-price,name

# Pagination (cursor-based for large datasets)
GET /posts?cursor=eyJpZCI6MTAwfQ&limit=20

# Field selection (sparse fieldsets)
GET /users?fields=id,name,email

# Search
GET /products?q=laptop&in=title,description

5️⃣ Versioning Strategy

# URL versioning (most common, most visible)
GET /api/v1/users
GET /api/v2/users

# Header versioning (cleaner URLs)
GET /api/users
Accept: application/vnd.myapi.v2+json

# Deprecation headers
Deprecation: true
Sunset: Sat, 01 Jan 2028 00:00:00 GMT
Link: </api/v2/users>; rel="successor-version"

6️⃣ Idempotency & Safety

# Idempotency key for POST (prevent duplicate processing)
POST /payments
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000

# Conditional updates (optimistic locking)
GET /users/123
ETag: "abc123"

PATCH /users/123
If-Match: "abc123"  # Only update if unchanged
Content-Type: application/json

7️⃣ API Design Checklist

  • All resources are nouns
  • Correct HTTP verbs for operations
  • Consistent response structure across all endpoints
  • Pagination on all list endpoints
  • Filtering and sorting support
  • Proper error responses with RFC 7807
  • Authentication documented (Bearer token, API key)
  • Rate limiting with X-RateLimit-* headers
  • CORS configured
  • OpenAPI 3.1 spec generated
  • Versioning strategy documented
  • Deprecation policy stated

Outputs

  1. Complete OpenAPI 3.1 specification
  2. API style guide document
  3. Error codes reference table
  4. Postman/Insomnia collection
  5. API changelog format template

Keep looking

Skills are one crate of 328,083. 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.