rest-api-designer
minagayid/Agents/skills/library/rest-api-designer/SKILL.md
Design clean, consistent REST API endpoints (resources, methods, status codes, errors, pagination). Use when the user asks to design an API, add endpoints, or review API shape.
Skill1 starsChanged 3 months ago
What's in it
- REST API Designer
- Principles
- Status codes
- Conventions
- Deliverable
---
name: rest-api-designer
description: Design clean, consistent REST API endpoints (resources, methods, status codes, errors, pagination). Use when the user asks to design an API, add endpoints, or review API shape.
---
# REST API Designer
Design HTTP APIs that are predictable and easy to consume.
## Principles
- **Resources are nouns, plural**: `/orders`, `/orders/{id}`, `/orders/{id}/items`.
- **Methods carry the verb**: `GET` (read), `POST` (create), `PUT`/`PATCH` (replace/update), `DELETE`.
- **GET is safe and idempotent**; never mutate on GET.
## Status codes
- `200 OK`, `201 Created` (+ `Location`), `204 No Content`.
- `400` invalid input · `401` unauthenticated · `403` forbidden · `404` not found ·
`409` conflict · `422` validation · `429` rate limited · `500` server error.
## Conventions
- **Errors**: consistent JSON body, e.g. `{ "error": { "code": "...", "message": "...", "details": [...] } }`.
- **Pagination**: cursor-based preferred (`?limit=&cursor=`), return `next_cursor`.
- **Filtering/sorting**: `?status=open&sort=-created_at`.
- **Versioning**: prefix (`/v1/...`) or header; be explicit and stable.
- **Idempotency**: support an `Idempotency-Key` header for non-idempotent creates.
- Use ISO-8601 timestamps, `snake_case` or `camelCase` consistently, and stable field names.
## Deliverable
Produce an endpoint table (method · path · purpose · request · response · status codes) and,
if useful, an OpenAPI sketch. Call out auth, rate limits, and breaking-change risks.
More agent context in minagayid/Agents
25 other files this repository gives its agents.
Skill
- agent-project-scaffoldskills/agent-project-scaffold/SKILL.md
- accessibility-auditskills/library/accessibility-audit/SKILL.md
- changelog-keeperskills/library/changelog-keeper/SKILL.md
- code-review-checklistskills/library/code-review-checklist/SKILL.md
- conventional-commitsskills/library/conventional-commits/SKILL.md
- data-cleaningskills/library/data-cleaning/SKILL.md
- debugging-methodologyskills/library/debugging-methodology/SKILL.md
- dependency-auditskills/library/dependency-audit/SKILL.md
- dockerfile-authorskills/library/dockerfile-author/SKILL.md
- exploratory-data-analysisskills/library/exploratory-data-analysis/SKILL.md
- github-actions-ciskills/library/github-actions-ci/SKILL.md
- incident-postmortemskills/library/incident-postmortem/SKILL.md
- kubernetes-manifestskills/library/kubernetes-manifest/SKILL.md
- pr-descriptionskills/library/pr-description/SKILL.md
- prompt-engineeringskills/library/prompt-engineering/SKILL.md
- react-componentskills/library/react-component/SKILL.md
- readme-generatorskills/library/readme-generator/SKILL.md
- refactoringskills/library/refactoring/SKILL.md
- secure-coding-reviewskills/library/secure-coding-review/SKILL.md
- sql-optimizerskills/library/sql-optimizer/SKILL.md
- technical-writingskills/library/technical-writing/SKILL.md
- terraform-moduleskills/library/terraform-module/SKILL.md
- threat-modelskills/library/threat-model/SKILL.md
- unit-test-writerskills/library/unit-test-writer/SKILL.md
- web-performanceskills/library/web-performance/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

