skills/by-role/engineer/api-design/SKILL.md
Design clean and consistent APIs. Use when the user says "design an API", "API design review", "design these endpoints", "REST API for X", "GraphQL schema", "API contract", "how should this endpoint work", "review my API design", or wants to create or improve an API interface - even if they don't explicitly say "API design".
npx skillsauth add qa-aman/claude-skills api-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Based on "A Philosophy of Software Design" by John Ousterhout. Ousterhout's key principle: modules should be deep - simple interface, powerful implementation. Applied to APIs: the surface area exposed to callers should be as small as possible, while the behavior provided should be as rich as possible. A leaky abstraction (where callers need to understand implementation details) is a design failure.
Before designing any endpoint, state what the API enables:
Ousterhout: if callers need to know how the API works internally to use it correctly, the API is leaky.
REST:
/users, /orders not /getUsers, /createOrder/users/{id}/orders (orders owned by a user)GraphQL:
For each endpoint:
Endpoint: [METHOD] /path/{param}
Purpose: [one sentence]
Auth: [required scope or token type]
Request:
Path params: [required identifiers]
Query params: [optional filters, pagination]
Body: [JSON schema with required/optional fields]
Response (200):
[JSON schema]
Errors:
400 - [validation failure - which fields, why]
401 - [unauthenticated]
403 - [unauthorized - caller lacks permission]
404 - [resource not found]
409 - [conflict - e.g. duplicate]
422 - [unprocessable entity - valid syntax, invalid semantics]
500 - [internal error]
Pick conventions and apply them everywhere:
2026-03-03T14:30:00Z){ error: { code, message, details } }Inconsistency is the top complaint from API consumers.
Ousterhout's information hiding principle: don't expose implementation artifacts.
Every public API needs a versioning strategy before it ships:
/v1/users (most common, most visible)API-Version: 2026-01-011. Verbs in resource paths
Bad: POST /createUser, GET /getUserById
Good: POST /users, GET /users/{id}
2. Inconsistent error shapes
Bad: Some endpoints return { error: "message" }, others return { message: "error" }.
Good: One error schema, applied everywhere.
3. Leaking implementation details
Bad: /api/db/users_table/row/42
Good: /api/users/42
4. No versioning plan on day 1 Bad: Ship v1 with no versioning, then break callers when you need to change the contract. Good: Version from the first public release. Breaking changes require a new version.
development
Plan a webinar end-to-end using April Dunford's Obviously Awesome positioning framework to find the topic angle that makes the webinar obviously valuable to the right audience. Produces topic positioning, abstract, speaker brief, registration page, promotion sequence, day-of run-of-show, and post-webinar follow-up. Use when the user asks to plan a webinar, virtual event, online workshop, "we need a webinar on X", host a webinar, online masterclass, or any live virtual event with promotion and follow-up. Reads ICP, services, and brand voice from knowledge/.
development
Write long-form thought leadership articles, opinion pieces, industry POV essays, and CEO/founder bylines using the Made to Stick SUCCESs framework (Chip and Dan Heath). Use when the user asks for a long-form article, executive byline, opinion piece, industry POV, manifesto, "explain our point of view on X", or wants to publish an authority-building piece (1200-2500 words). Reads brand voice and positioning from knowledge/.
development
Plan a monthly content calendar across channels using the Content Marketing Matrix (Dave Chaffey, Smart Insights) - Entertain/Inspire/Educate/Convince. Every post gets a quadrant label. The monthly calendar must hit 40% Educate, 40% Inspire+Convince, 20% Entertain. Produces a week-by-week posting schedule with topics, formats, channels, and asset links. Use when the user says "content calendar", "social calendar", "plan next month's content", "what should we post", "content plan", "editorial calendar", "schedule posts for the month", or wants a structured posting plan for LinkedIn, Twitter, email, or blog. Reads brand voice, ICP, and past learnings from knowledge/.
development
Write SEO-optimized long-form articles targeting specific keywords using the They Ask You Answer Big 5 framework (Marcus Sheridan). Articles are categorized by Big 5 type (Cost, Problems, Versus, Best/Reviews, How-To) and structured accordingly. The "answer first" rule applies to every article. Use when the user asks for an SEO article, blog post for ranking, "rank for keyword X", organic content, search-optimized post, pillar page, or content for organic traffic. Includes keyword targeting, search intent matching, internal linking suggestions, and meta tags.