Agent skill

API Design

by cohen-liel in cohen-liel/hivemind

REST API design principles and best practices. An agent skill from cohen-liel/hivemind.

Apache-2.0Auto-check passedBackend & APIs

Install API Design

skills CLI
$ npx skills add cohen-liel/hivemind --skill api-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cohen-liel/hivemind api-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cohen-liel/hivemind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/api-design .claude/skills/api-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-design
GitHub stars
110
Used in
1 other repo
Token cost
~857 tokens
SKILL.md length
84 words
Files
1
Skills in repo
33
Repo updated
First seen
Licence
Apache-2.0

At a glance

REST API design principles and best practices. An agent skill from cohen-liel/hivemind.

  • Designing API endpoints
  • SKILL.md covers URL Structure, Status Codes, Request / Response Format and Filtering & Pagination, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Request/response schemas

What it does

API Design is an agent skill from cohen-liel/hivemind. REST API design principles and best practices. Use when designing API endpoints, request/response schemas, versioning, error formats, or reviewing API design.

Its SKILL.md is about 860 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering API design and REST APIs. The repository describes itself as: One prompt. A full AI engineering team. Go lie on the couch. 🧠. The licence is Apache-2.0.

When your agent uses it

  • Designing API endpoints
  • Request/response schemas
  • Reviewing API design

Example prompts

  • “/api-design”

What it can do on your machine

Read from SKILL.md and the folder at commit 918dd9b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Design loads about 857 tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 84 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~857

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cohen-liel/hivemind at commit 918dd9b, republished under its Apache-2.0 licence (© cohen-liel). 84 words, ~857 tokens.

Download SKILL.mdSave it as .claude/skills/api-design/SKILL.md (or your agent's skills folder).
name
api-design
description
REST API design principles and best practices. Use when designing API endpoints, request/response schemas, versioning, error formats, or reviewing API design.

REST API Design Patterns

URL Structure

# Resources (nouns, plural, lowercase-kebab)
GET    /api/v1/users           # List users
POST   /api/v1/users           # Create user
GET    /api/v1/users/{id}      # Get user
PUT    /api/v1/users/{id}      # Replace user
PATCH  /api/v1/users/{id}      # Update user partially
DELETE /api/v1/users/{id}      # Delete user

# Nested resources
GET    /api/v1/users/{id}/posts        # User's posts
POST   /api/v1/users/{id}/posts        # Create post for user

# Actions (when CRUD doesn't fit)
POST   /api/v1/users/{id}/activate
POST   /api/v1/auth/login
POST   /api/v1/auth/logout
POST   /api/v1/auth/refresh

# Search / filtering
GET    /api/v1/posts?status=published&author=123&sort=-created_at&page=2&limit=20

Status Codes

200 OK              — GET/PATCH/PUT success with body
201 Created         — POST success (include Location header)
204 No Content      — DELETE success
400 Bad Request     — Invalid input (validation error)
401 Unauthorized    — Not authenticated (no/invalid token)
403 Forbidden       — Authenticated but not allowed
404 Not Found       — Resource doesn't exist
409 Conflict        — Duplicate email, version conflict
422 Unprocessable   — Semantically invalid (used by FastAPI for validation)
429 Too Many Reqs   — Rate limit exceeded
500 Server Error    — Unexpected error (never expose details)

Request / Response Format

json
// List response with pagination
{
  "data": [...],
  "pagination": {
    "total": 248,
    "page": 2,
    "limit": 20,
    "has_next": true
  }
}

// Single resource
{
  "data": { "id": 1, "email": "user@example.com", "name": "Alice" }
}

// Error response (consistent across ALL endpoints)
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid input",
    "details": [
      { "field": "email", "message": "Invalid email format" },
      { "field": "password", "message": "Must be at least 8 characters" }
    ]
  }
}

Filtering & Pagination

# Filtering
GET /posts?status=published&tag=python&author_id=123

# Sorting (- prefix for DESC)
GET /posts?sort=-created_at,title

# Pagination
GET /posts?page=2&limit=20

# Field selection (reduce payload)
GET /users?fields=id,name,email

# Search
GET /posts?q=fastapi+tutorial

Versioning

# URL path versioning (simplest, most visible)
/api/v1/users
/api/v2/users

# When to version: breaking changes only
# Non-breaking changes (adding fields, new endpoints) = no new version needed

Response Headers

Content-Type: application/json
X-Request-ID: uuid  # For distributed tracing
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1711234567
Location: /api/v1/users/123  # After POST 201

Rules

  • Use nouns for resources, verbs only for actions
  • Be consistent: same error format everywhere
  • Always version the API
  • Never expose internal IDs in public APIs (use UUIDs or slugs)
  • Include created_at/updated_at in all resource responses
  • Use ISO 8601 for all dates: 2024-03-15T10:30:00Z
  • Paginate ALL list endpoints (even if only 10 items now)
  • Document with OpenAPI/Swagger (FastAPI auto-generates this)
  • Make POST idempotent with client-provided idempotency keys for payments

© cohen-liel, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/api-design of cohen-liel/hivemind.

Open the folder on GitHubat commit 918dd9b

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in cohen-liel/hivemind, which our catalogue first saw on October 7, 2026.

Compare with similar skills

API Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Design this skillcohen-liel/hivemind1101 repos~857Automated safety check: PassApache-2.0
API DesignerJeffallan/claude-skills12k2 repos~2kAutomated safety check: PassMIT
Nodejs Backend Patternsever-works/ever-works15818 repos~4kAutomated safety check: PassAGPL-3.0
Pangolin CRUD Endpointsfosrl/pangolin23k—~461Automated safety check: PassCustom licence
Old Coder API DesignAmazingAng/old-coder7491 repos~3.4kAutomated safety check: PassMIT
REST API Contract Reviewdecebals/claude-code-java7511 repos~2.8kAutomated safety check: PassMIT

Similar skills

  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • Nodejs Backend Patterns

    ever-works/ever-works

    Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices.

    158 GitHub starsUsed in 18 repos~4k tokens
    Backend & APIsAuto-check passed
  • Use whenever asked to add, create, or scaffold a CRUD endpoint, router, or entity in this repo's server (create/list/get/update/delete handlers, new…

    23k GitHub stars~461 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Old Coder API Design

    AmazingAng/old-coder

    Reviews or designs an HTTP/JSON API's endpoints, auth, pagination, versioning and deprecations, guarding against inventing a bespoke interface or silently breaking consumers.

    749 GitHub starsUsed in 1 repo~3.4k tokens
    Backend & APIsAuto-check passed
  • REST API Contract Review

    decebals/claude-code-java

    Reviews REST API design for correct HTTP verbs, versioning, DTO use, consistent responses and backward compatibility before an API change ships.

    751 GitHub starsUsed in 1 repo~2.8k tokens
    Backend & APIsAuto-check passed
  • Backend Fundamentals

    DanielPodolsky/ownyourcode

    Reviews API design, REST conventions, and backend architecture.

    290 GitHub starsUsed in 1 repo~1.1k tokens
    Backend & APIsAuto-check passed

More from cohen-liel/hivemind

All 33 skills in this repo
  • Graphql API

    cohen-liel/hivemind

    GraphQL API design and implementation patterns. An agent skill from cohen-liel/hivemind.

    110 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Async Python

    cohen-liel/hivemind

    Python asyncio patterns for high-performance async code. An agent skill from cohen-liel/hivemind.

    110 GitHub stars~992 tokensUpdated 5 mo ago
    Auto-check passed
  • Celery Tasks

    cohen-liel/hivemind

    Celery background task patterns for Python apps. An agent skill from cohen-liel/hivemind.

    110 GitHub stars~1.1k tokensUpdated 5 mo ago
    Auto-check passed
  • Docker Deployment

    cohen-liel/hivemind

    Docker, docker-compose, and deployment configuration best practices.

    110 GitHub stars~674 tokensUpdated 5 mo ago
    Auto-check passed
  • E2E Testing

    cohen-liel/hivemind

    End-to-end testing patterns with Playwright. An agent skill from cohen-liel/hivemind.

    110 GitHub stars~1.2k tokensUpdated 5 mo ago
    Auto-check passed
  • Article Writing

    cohen-liel/hivemind

    Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance.

    110 GitHub starsUsed in 8 repos~786 tokens
    Auto-check passed

Categories

Questions about API Design

What does API Design do?

REST API design principles and best practices. An agent skill from cohen-liel/hivemind. API Design is an agent skill from cohen-liel/hivemind. REST API design principles and best practices.

When should I use API Design?

API Design fits situations like: designing API endpoints; request/response schemas; reviewing API design.

How do I install API Design in Claude Code?

Run `npx skills add cohen-liel/hivemind --skill api-design -a claude-code`. Or copy the skill folder (.claude/skills/api-design in cohen-liel/hivemind) into .claude/skills/api-design in your project. Claude Code loads it when a task matches its description.

How do I install API Design in Codex?

Run `npx skills add cohen-liel/hivemind --skill api-design -a codex`. Or copy the skill folder (.claude/skills/api-design in cohen-liel/hivemind) into .agents/skills/api-design in your project. Codex loads it when a task matches its description.

Can I use API Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cohen-liel/hivemind --skill api-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-design, .gemini/skills/api-design, .github/skills/api-design and .opencode/skills/api-design in your project.

What does API Design need to run?

SKILL.md names no scripts, command-line tools or credentials: API Design is instructions for the agent only.

Does API Design access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Design use?

API Design is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Design use?

About 857 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Design?

Skills that share tags, products or a category with API Design: API Designer (Jeffallan/claude-skills, 12k stars), Nodejs Backend Patterns (ever-works/ever-works, 158 stars), Pangolin CRUD Endpoints (fosrl/pangolin, 23k stars) and Old Coder API Design (AmazingAng/old-coder, 749 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Design?

cohen-liel (a GitHub user) maintains it in cohen-liel/hivemind, which has 110 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on April 18, 2026.

Source: cohen-liel/hivemind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.