Agent skill · Backend & API

api-design

REST and GraphQL API design principles, versioning, error handling, and documentation patterns

Cosmic Stack3,294★ · 2 repos on radarProfile →
claude-codeMIT
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill api-design --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 7 KB
Bundled scripts: none
Version: 1.0.0
Declared author: cosmicstack-labs
Path: categories/backend/api-design/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 364
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# API Design Design APIs that are intuitive, consistent, and a joy to integrate with. ## Core Principles ### 1. Consistency Over Cleverness Your API should be predictable. If one resource uses `POST /users`, another shouldn't use `POST /createUser`. Patterns should be uniform across the entire surface. ### 2. Resources, Not Actions URLs name resources. HTTP verbs name actions. `/users` is a resource. `POST /users` creates one. `DELETE /users/123` removes one. ### 3. Developer Experience First Your API's consumers are developers. Good DX means clear errors, thorough documentation, predictable responses, and sensible defaults. ### 4. Backward Compatibility Once a field or endpoint is public, removing it breaks consumers. Version carefully. Add fields, don't remove them. Deprecate before deleting. --- ## API Quality Scorecard | Dimension | Poor | Good | Excellent | |-----------|------|------|-----------| | **URL structure** | `/getUsers`, `/create_user` | `/users`, `POST /users` | `/users`, `/users/:id`, with HATEOAS links | | **HTTP methods** | All POST | CRUD mapped properly | Proper status codes, idempotency | | **Error format** | HTML or plain text | JSON with message | RFC 7807 P

What's inside
Steps it walks through
  1. Core Principles
  2. 1. Consistency Over Cleverness
  3. 2. Resources, Not Actions
  4. 3. Developer Experience First
  5. 4. Backward Compatibility
  6. API Quality Scorecard
  7. Actionable Guidance
  8. RESTful URL Design
  9. HTTP Methods and Status Codes
  10. Error Response Format
  11. Pagination
  12. Versioning
  13. GraphQL Considerations
  14. API Documentation
More from mercury-agent-skills
All skills →
About this skill
What does the api-design skill do?

REST and GraphQL API design principles, versioning, error handling, and documentation patterns

How do I install it?

Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill api-design --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From cosmicstack-labs/mercury-agent-skills, a repository with 364 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going