designing-apis_skill

This skill helps you design robust REST and GraphQL APIs by outlining resources, endpoints, error handling, versioning, and documentation.
  • Python

1.2k

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill cloudai-x/claude-workflow-v2 --skill designing-apis

  • OPENAPI-TEMPLATE.md3.4 KB
  • SKILL.md4.4 KB

Overview

This skill designs REST and GraphQL APIs with clear endpoint structures, error handling, versioning, authentication, and documentation. It provides practical patterns, response schemas, and validation checklists to produce consistent, secure, and maintainable API contracts.

How this skill works

I inspect resource models and relationships, then produce RESTful URLs or GraphQL schemas and recommended request/response formats. I specify HTTP status codes, standard error payloads, versioning strategy, authentication patterns, rate limit headers, and an OpenAPI-ready spec template. I also run the design through a validation checklist and a security checklist to catch common issues.

When to use it

  • Creating a new REST or GraphQL API from domain models
  • Designing or reviewing endpoint structure and naming
  • Defining consistent request/response and pagination formats
  • Specifying error handling, status codes, and rate limiting
  • Preparing an OpenAPI spec or GraphQL schema for documentation

Best practices

  • Use resource-based (noun) URLs for REST and operations mapped to proper HTTP methods
  • Return consistent response envelopes with data, meta, and links for lists
  • Provide structured error objects with codes, messages, and field-level details
  • Version APIs explicitly (URL versioning recommended) and document changes
  • Apply authentication, authorization, input validation, HTTPS, and rate limiting
  • Document everything with OpenAPI for REST or a clear schema and payload types for GraphQL

Example use cases

  • Designing /users and nested /users/:id/orders endpoints with pagination and filtering
  • Drafting an OpenAPI 3.0 spec including success, list, and error response examples
  • Converting CRUD endpoints to support PATCH/PUT semantics and proper status codes
  • Creating a GraphQL schema with Query and Mutation types and payload error handling
  • Defining JWT or API key authentication and rate limit headers in responses

FAQ

URL versioning is recommended for clarity and caching; use header versioning when you need silent version negotiation or fewer URL changes.

How should errors be returned?

Return structured error objects with a machine-friendly code, human message, and optional field-level details and include a requestId in meta for tracing.

When is GraphQL a better fit than REST?

Use GraphQL when clients need flexible queries with nested relationships and reduced over-fetching; use REST for simpler resource-centric operations and predictable caching.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational