Skip to content

API Patterns Guide

Guides agents through API design choices: REST vs GraphQL vs tRPC, responses, versioning, auth and rate limits

Stars
49,023
Licence
MIT
Files
12 files

What it does

This skill gives an AI agent a structured playbook for designing web APIs (the interfaces that apps use to talk to servers). Once installed, the agent asks about who will consume the API, helps choose between REST, GraphQL and tRPC, and follows consistent guidance on response formats, error handling, pagination, versioning, authentication and rate limiting. It also includes a small Python script that does a rough, regex-based scan of API source files for common issues; it is a triage hint, not a real validator.

Great for

  • Backend developers designing a new endpoint or API contract
  • Teams deciding between REST, GraphQL or tRPC for known consumers
  • Developers reviewing pagination, error format or versioning decisions

Skip it if

  • Running a formal security audit or penetration test, since the skill only gives guidance and the script is heuristic, not authoritative
  • Replacing OpenAPI schema validation or compatibility testing, because the script explicitly does not validate schemas
  • Non-developers looking for a finished, deployable API, as it is design guidance rather than code generation

Try asking

  • “Help me choose between REST and GraphQL for a mobile app with three client teams.”
  • “Design a paginated order list endpoint that handles records inserted while clients page through it.”
  • “Review our API's error responses and suggest a consistent envelope format.”
  • “Scan our project's API route files for obvious issues using the validator script.”
Step-by-step guide: how to use API Patterns GuideInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 12 original files, the MIT licence and an attribution note.

    api-patterns.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip api-patterns.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip api-patterns.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Give the agent your real consumers, deployed versions and payload sizes first; the skill asks for these before recommending a style.
  • Treat the validator output as a list of things to look at, and confirm findings yourself; it reads at most 15 matching files.
  • Run security-testing guidance only against systems you are authorised to test, using isolated test accounts.

What's inside

  • api-style.md
  • auth.md
  • documentation.md
  • graphql.md
  • rate-limiting.md
  • response.md
  • rest.md
  • scripts/api_validator.py
  • security-testing.md
  • SKILL.md
  • trpc.md
  • versioning.md

Redistributed unmodified from sickn33/agentic-awesome-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.