AgentStack
SKILL verified MIT Self-run

Api Patterns

skill-besync-labs-antigravity-ai-kit-api-patterns · by besync-labs

RESTful API design patterns and best practices

No reviews yet
0 installs
18 views
0.0% view→install

Install

$ agentstack add skill-besync-labs-antigravity-ai-kit-api-patterns

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Api Patterns? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

API Patterns Skill

> Purpose: Apply professional RESTful API design principles


Overview

This skill provides guidance for designing clean, consistent, and scalable APIs following industry best practices.


Core Principles

1. Resource-Oriented Design

  • Use nouns for resources: /users, /orders, /products
  • Use HTTP verbs for actions: GET, POST, PUT, PATCH, DELETE
  • Avoid verbs in URLs: ❌ /getUsers → ✅ /users

2. Consistent Naming

GET    /api/v1/users          # List users
POST   /api/v1/users          # Create user
GET    /api/v1/users/:id      # Get user
PATCH  /api/v1/users/:id      # Update user
DELETE /api/v1/users/:id      # Delete user

3. Versioning

  • Use URL versioning: /api/v1/, /api/v2/
  • Or header versioning: Accept: application/vnd.api+json;version=1

Response Structure

Success Response

{
  "data": { ... },
  "meta": {
    "timestamp": "2026-02-06T00:00:00Z",
    "requestId": "uuid"
  }
}

Error Response

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

Status Codes

| Code | Usage | | :--- | :-------------------- | | 200 | Success | | 201 | Created | | 204 | No Content (delete) | | 400 | Bad Request | | 401 | Unauthorized | | 403 | Forbidden | | 404 | Not Found | | 409 | Conflict | | 422 | Unprocessable Entity | | 500 | Internal Server Error |


Pagination

{
  "data": [...],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 100,
    "totalPages": 5
  }
}

Quick Reference

| Pattern | Example | | :------ | :--------------------------- | | List | GET /users | | Create | POST /users | | Get | GET /users/123 | | Update | PATCH /users/123 | | Delete | DELETE /users/123 | | Nested | GET /users/123/orders | | Filter | GET /users?status=active | | Search | GET /users?q=john | | Sort | GET /users?sort=-createdAt |

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.