api-patterns
Guidelines and best practices for structured RESTful API endpoint design.
Install
mkdir -p .claude/skills/api-patterns-besync-labs && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9725" && unzip -o skill.zip -d .claude/skills/api-patterns-besync-labs && rm skill.zipInstalls to .claude/skills/api-patterns-besync-labs
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
RESTful API design patterns and best practicesKey capabilities
- →Resource-oriented naming
- →Standardized response structures
- →Versioning strategies
- →Pagination implementation
How it works
It provides patterns for naming, versioning, and structuring responses to ensure consistent and scalable REST APIs.
Inputs & outputs
When to use api-patterns
- →Designing clean API endpoints
- →Implementing consistent error responses
- →Structuring pagination logic
- →Defining resource naming standards
About this skill
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 |
When not to use it
- →Non-RESTful API architectures
Limitations
- →Requires team-wide adoption of patterns
How it compares
It enforces professional design standards rather than ad-hoc endpoint creation.
Compared to similar skills
api-patterns side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| api-patterns (this skill) | 0 | 6mo | No flags | Intermediate |
| fastapi-templates | 520 | 2mo | No flags | Intermediate |
| android-kotlin-development | 268 | 5mo | Review | Advanced |
| fastapi-pro | 79 | 4mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
android-kotlin-development
aj-geddes
Develop native Android apps with Kotlin. Covers MVVM with Jetpack, Compose for modern UI, Retrofit for API calls, Room for local storage, and navigation architecture.
fastapi-pro
sickn33
Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.
telegram-bot-builder
davila7
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.
telegram-mini-app
davila7
Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.
stripe-integration
wshobson
Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.