API Design Patterns (REST)
A REST API playbook that keeps resource naming, status codes, pagination, error formats, versioning, and rate limiting consistent when you design or review endpoints.
Web & APIIntermediate★ 316,622⑂ 46,367AI score 8/10Last updated: Dec 1, 2026
What it does
- Enforces URL and resource naming rules (plural, kebab-case, no verbs) with good/bad examples.
- Picks the right HTTP method (idempotent/safe semantics) and status code across 200/201/204/400/401/403/404/409/422/429/5xx.
- Standardizes success, paginated collection, and field-level error response JSON.
- Compares offset vs cursor pagination with a decision table, plus filtering, sorting, search, and sparse fieldset conventions.
- Covers bearer/API-key auth, ownership and role-based authorization, rate-limit headers and tiers.
- Gives a URL-path versioning strategy with deprecation timeline, Sunset header, and 410 Gone.
- Ends with a 12-item pre-ship checklist.
Who it's for
- Backend engineers and teams shipping public or partner-facing APIs.
- Tech leads who want consistent API contracts during code review.
- Developers on Next.js (TypeScript), Django REST Framework, or Go net/http.
Example uses
- "Design an orders list endpoint" →
/api/v1/orderswith cursor pagination and filter query conventions. - "Review the response format in this PR" → flags 200-for-everything responses and rewrites them as 404/422 with a unified error schema.
- "Do we need v2?" → adding fields is non-breaking so stay on v1; removing fields triggers a new version plus a Sunset timeline.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/affaan-m/ECC/HEAD/.agents/skills/api-design/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the .agents/skills/api-design folder from the GitHub repo affaan-m/ECC into my ~/.claude/skills/api-design/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/affaan-m/ECC /tmp/ECC && mkdir -p ~/.claude/skills && cp -r /tmp/ECC/.agents/skills/api-design ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repository into a temp folder:
git clone https://github.com/affaan-m/ECC /tmp/ECC - Create the skills directory if needed:
mkdir -p ~/.claude/skills - Copy the skill over:
cp -r /tmp/ECC/.agents/skills/api-design ~/.claude/skills/ - Verify that
~/.claude/skills/api-design/SKILL.mdexists. - Restart Claude Code, then ask something like "review this REST endpoint design" to trigger it.
View source on GitHub ↗License: MIT