Skip to main content
skill CX Codex

rest-api-design · aj-geddes — Claude Code skill: design REST APIs

This skill gives your agent rules for resource naming, HTTP methods, status codes and versioning when you build new endpoints or clean up old ones.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill rest-api-design -a claude-code
Open on GitHub

What rest-api-design does

The skill loads into your agent and steers REST API structure: resources are nouns in plural, methods and status codes match the operation, collections get pagination, filtering and sorting. It ships a quick start with good and bad endpoint names plus reference guides in references/: resource naming, request examples, query parameters, response formats, HTTP status codes, versioning, authentication, rate limiting headers and OpenAPI documentation. One file walks through a complete Express.js example.

It earns its place when an API has drifted — singular and plural mixed in the same route tree, errors returned with a 200. The skill lists what to avoid: verbs in paths, nesting past two levels, internal IDs leaking into responses. Dates should follow ISO 8601.

The reference guides are separate files, so if the agent never opens references/, you get only the general advice from the main file. Install runs through npx skills add; GitHub Copilot uses gh skill install instead.

What it helps with

  • sketch endpoint structure for a new service
  • rename resources and strip verbs out of paths
  • pick proper status codes instead of 200 on every error
  • add pagination, filtering and sorting to collections
  • write an OpenAPI spec and plan API versioning

Example prompts for the agent

  • Design a REST API for orders: resources, methods, status codes
  • Review the endpoints in routes/ and flag naming violations
  • Write an OpenAPI spec for the current routes and add pagination

How to install rest-api-design

1Skills CLI (Vercel)

npx skills add aj-geddes/useful-ai-prompts --skill rest-api-design -a claude-code

2Manually: put the files in place

~/.claude/skills/rest-api-design/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/rest-api-design/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about rest-api-design

How do I install rest-api-design in Claude?

Run npx skills add aj-geddes/useful-ai-prompts --skill rest-api-design -a claude-code. The skill lands in ~/.claude/skills/rest-api-design/SKILL.md.

What does rest-api-design do?

It guides the agent through REST API design: resource naming, HTTP methods, status codes, versioning, authentication and OpenAPI documentation.

How is it different from just asking the agent?

It pulls from the guides in references/, from request examples to a full Express.js walkthrough, so answers stay specific instead of generic.

Source text

SKILL.md · MIT
---
name: rest-api-design
description: >
  Design RESTful APIs following best practices for resource modeling, HTTP
  methods, status codes, versioning, and documentation. Use when creating new
  APIs, designing endpoints, or improving existing API architecture.
---

# REST API Design

## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)

## Overview

Design REST APIs that are intuitive, consistent, and follow industry best practices for resource-oriented architecture.

## When to Use

- Designing new RESTful APIs
- Creating endpoint structures
- Defining request/response formats
- Implementing API versioning
- Documenting API specifications
- Refactoring existing APIs

## Quick Start

Minimal working example:

```
✅ Good Resource Names (Nouns, Plural)
GET    /api/users
GET    /api/users/123
GET    /api/users/123/orders
POST   /api/products
DELETE /api/products/456

❌ Bad Resource Names (Verbs, Inconsistent)
GET    /api/getUsers
POST   /api/createProduct
GET    /api/user/123  (inconsistent singular/plural)
```

## Reference Guides

Detailed implementations in the `references/` directory:

| Guide | Contents |
|---|---|
| [Resource Naming](references/resource-naming.md) | Resource Naming, HTTP Methods & Operations |
| [Request Examples](references/request-examples.md) | Request Examples |
| [Query Parameters](references/query-parameters.md) | Query Parameters |
| [Response Formats](references/response-formats.md) | Response Formats |
| [HTTP Status Codes](references/http-status-codes.md) | HTTP Status Codes, API Versioning, Authentication & Security, Rate Limiting Headers |
| [OpenAPI Documentation](references/openapi-documentation.md) | OpenAPI Documentation |
| [Complete Example: Express.js](references/complete-example-expressjs.md) | const express = require("express"); |

## Best Practices

### ✅ DO

- Use nouns for resources, not verbs
- Use plural names for collections
- Be consistent with naming conventions
- Return appropriate HTTP status codes
- Include pagination for collections
- Provide filtering and sorting options
- Version your API
- Document thoroughly with OpenAPI
- Use HTTPS
- Implement rate limiting
- Provide clear error messages
- Use ISO 8601 for dates

### ❌ DON'T

- Use verbs in endpoint names
- Return 200 for errors
- Expose internal IDs unnecessarily
- Over-nest resources (max 2 levels)
- Use inconsistent naming
- Forget authentication
- Return sensitive data
- Break backward compatibility without versioning

© aj-geddes · MIT · aj-geddes/useful-ai-prompts

Similar skills

Everything for Backend and APIs →

rest-api-design by other authors comes first.

rest-api-design secondsky This skill hands your agent a set of REST conventions: resource names, HTTP methods, status codes and JSON response shape. Useful when you start a new API or want existing endpoints to match. CX Codex +1 586installs rest-api-design-patterns manutej A reference skill for designing REST APIs: resource modeling, versioning, pagination, HATEOAS and HTTP method semantics. CX Codex +1 525installs public-api-design-review Samuel Berthe Walks a REST API surface through a checklist: resource naming, methods, status codes, pagination, error shape. Findings land in Must-change or Improvement. CX Codex +1 7,800installs api-design Agent Skills Team This skill designs or refactors REST and GraphQL contracts, covering operations, errors, compatibility, and contract artifacts for implementation. CX Codex +1 387installs agentmemory-rest-api rohitg00 Documents the REST surface of the agentmemory server: saving and searching memories over HTTP. Useful when MCP is unavailable or your host does not speak it. CX Codex +1 10,800installs api-designer https://github.com/Jeffallan Skill for REST and GraphQL API architecture with OpenAPI 3.1 specification generation. Models resources, plans versioning strategies, and establishes error handling standards. CX Codex +1 6,500installs api-design-patterns agent-skills A skill with 38 REST API rules covering resources, errors, security, pagination and versioning. Useful when an agent writes or reviews endpoints. CX Codex +1 929installs

From the same set118

nodejs-express-server A skill that guides your agent through building Express.js servers: routing, middleware chains, JWT auth, database integration. Useful for REST APIs in Node.js. CX Codex +1 3,300installs code-review-analysis A skill that walks the agent through a systematic review: code quality, security, performance, tests. Useful when you are checking a pull request before merge. CX Codex +1 2,400installs architecture-diagrams Generates system architecture diagrams, data flows, and C4 models using code formats like Mermaid and PlantUML. Useful when documenting service design directly inside your coding agent. CX Codex +1 2,000installs jenkins-pipeline A skill that helps write Jenkinsfiles: declarative and scripted pipelines with stages, agents, parameters and plugins. CX Codex +1 2,000installs ansible-automation An Ansible skill for your coding agent: write playbooks, roles and inventory, deploy apps and patch servers. CX Codex +1 1,800installs android-kotlin-development A skill that steers your coding agent through native Android work in Kotlin: MVVM, Compose, Retrofit, Room. CX Codex +1 1,500installs ios-swift-development A skill for building native iOS apps in Swift: MVVM, SwiftUI, URLSession networking, Combine and Core Data persistence. CX Codex +1 1,500installs flask-api-development Builds modular Flask REST APIs using blueprints, SQLAlchemy ORM, and JWT authentication. It helps organize microservices and validate incoming request payloads. CX Codex +1 1,400installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor