Backend API

Design and implement RESTful API endpoints with HTTP methods, status codes, and security.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/SpacePlushy/portfolio --skill backend-api-spaceplushy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Backend API
Source: https://github.com/SpacePlushy/portfolio/tree/main/.claude/skills/backend-api
Command: npx skills add https://github.com/SpacePlushy/portfolio --skill backend-api-spaceplushy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Inconsistent API design, improper HTTP usage, and security oversights lead to brittle, insecure, and hard-to-use backend services. This skill guides AI in designing and implementing RESTful API endpoints with proper methods, status codes, and security, so your backend is reliable.

Core Features & Use Cases

  • RESTful Design Principles: Directs AI on using appropriate HTTP methods, status codes, and consistent naming conventions.
  • Comprehensive API Functionality: Guides AI on handling query parameters, implementing versioning, and setting up rate limiting.
  • Security & Middleware: Ensures AI configures CORS, API security headers, and authentication logic for robust endpoints.

Quick Start

Create a new GET API endpoint at /api/products that supports filtering by category and pagination.

Frequently Asked Questions about Backend API

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design RESTful API endpoints with proper HTTP methods and status codes?

RESTful API design uses appropriate HTTP methods (GET, POST, PUT, DELETE) matched to actions, and status codes (200, 201, 400, 404, 500) to communicate results. Structure endpoints as resource-based URLs, apply consistent naming conventions, and return correct codes for success, client errors, and server errors to make your API predictable and reliable.

What's the best way to handle query parameters for filtering, sorting, and pagination in APIs?

Implement query parameters as optional filters on GET endpoints—use `?category=electronics` for filtering, `?sort=price` for sorting, and `?page=2&limit=10` for pagination. Validate all parameters, document expected formats in OpenAPI specs, and return paginated metadata so clients can navigate results efficiently.

How do I secure my API with CORS, authentication, and security headers?

Configure CORS to whitelist trusted domains, implement authentication middleware (API keys, OAuth, JWT), add security headers (Content-Security-Policy, X-Frame-Options), validate all input, and enforce rate limiting. Layer these controls in your middleware stack to protect endpoints from unauthorized access and common attacks.

Can I use API versioning and OpenAPI specifications together?

Yes. Version your API through URL paths (`/v1/products`, `/v2/products`) or headers, then document each version in separate OpenAPI specifications. This lets clients choose versions while maintaining clear contracts, reduces breaking changes, and enables consistent documentation across versions.

What error handling and status codes should I use for API failures?

Return 400 for invalid client input, 401 for missing authentication, 403 for insufficient permissions, 404 for missing resources, and 500 for server errors. Include error messages and codes in response bodies so clients understand what failed and how to fix it.

How do I implement rate limiting and middleware in backend API endpoints?

Add rate-limiting middleware that tracks requests per client (by IP or API key) and returns 429 when limits are exceeded. Chain middleware in your server-side request handlers to validate authentication, parse parameters, and enforce policies before reaching business logic.