affaan-m avatar

Api Design

Solid reference for REST API conventions that covers the stuff you actually need: resource naming (plural nouns, kebab-case), proper HTTP status codes (not everything is a 200), pagination strategies (offset vs cursor), and error response formatting. The status code table alone saves you from second-guessing whether to return 400 or 422. Includes practical examples of filtering with bracket notation, sorting with minus prefixes, and rate limiting headers. The cursor-based pagination section is especially useful since offset-based falls apart at scale but most tutorials only show the simple approach. Good for both designing new APIs and reviewing existing ones to spot inconsistencies.

skills.sh installs
6.6K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add affaan-m/ecc --skill api-design --agent claude-code

Installs into .claude/skills of the current project.

Files

API Design Patterns

Conventions and best practices for designing consistent, developer-friendly REST APIs.

When to Activate

  • Designing new API endpoints
  • Reviewing existing API contracts
  • Adding pagination, filtering, or sorting
  • Implementing error handling for APIs
  • Planning API versioning strategy
  • Building public or partner-facing APIs

Resource Design

URL Structure

# Resources are nouns, plural, lowercase, kebab-case
GET    /api/v1/users
GET    /api/v1/users/:id
POST   /api/v1/users
PUT    /api/v1/users/:id
PATCH  /api/v1/users/:id
DELETE /api/v1/users/:id

# Sub-resources for relationships
GET    /api/v1/users/:id/orders
POST   /api/v1/users/:id/orders

# Actions that don't map to CRUD (use verbs sparingly)
POST   /api/v1/orders/:id/cancel
POST   /api/v1/auth/login
POST   /api/v1/auth/refresh

Naming Rules

# GOOD
/api/v1/team-members          # kebab-case for multi-word resources
/api/v1/orders?status=active  # query params for filtering
/api/v1/users/123/orders      # nested resources for ownership

Sponsors

Details

Repository
github.com/affaan-m/ecc
Categories
Backend & APIs, Code Review & Quality, Debugging, Design & UI/UX
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263
1aws avatarenabling-lambda-vpc-internet-accessaws/agent-toolkit-for-awsEnables internet access for AWS Lambda functions deployed in VPC subnets by creating NAT Gateway infrastructure, configuring public/private subnet routing, and 6.5Kskills.sh installs
2aws avataramazon-aurora-mysqlaws/agent-toolkit-for-awsAmazon Aurora MySQL — creates, modifies, and advises on Aurora MySQL clusters specifically (MySQL-compatible engine, Aurora serverless, parallel query). Trigger5.7Kskills.sh installs
3affaan-m avatarmcp-server-patternsaffaan-m/eccBuild MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest A5.6Kskills.sh installs
4affaan-m avatarx-apiaffaan-m/eccX/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native co5.4Kskills.sh installs
5wordpress avatarwp-abilities-apiwordpress/agent-skillsUse when working with the WordPress Abilities API (wp_register_ability, wp_register_ability_category, /wp-json/wp-abilities/v1/*, @wordpress/abilities) includin4.6Kskills.sh installs
6agricidaniel avatarads-server-side-trackingagricidaniel/claude-adsAudit server-side paid-media measurement including server-side tag management, platform conversion APIs, event taxonomy, browser/server deduplication, consent, 3.6Kskills.sh installs