rest-api-best-practices

rest-api-best-practices is a skill for Claude Code, Codex from OKHP3/skillz. It costs 70 tokens per session (1,774 once invoked), scanned A, original, MIT.

Guidance for designing and reviewing REST APIs, which are web interfaces that let programs exchange data through standard HTTP requests. It covers URLs, request methods, status codes, errors, pagination, versioning, and access controls.

In plain words
What is it for?
Use it to design endpoints, choose HTTP methods and status codes, format errors, add filtering or pagination, plan versions, and review API security.
Why use it?
It helps APIs remain understandable and predictable for the programs that use them. It reduces confusion around resource names, errors, compatibility, and common web behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design endpoints, choose HTTP methods and status codes, format errors, add filtering or pagination, plan versions, and review API security.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/okhp3/skillz/rest-api-best-practices
View source ↗ OKHP3/skillz
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add OKHP3/skillz --skill rest-api-best-practices
Clone the repo
git clone --depth 1 https://github.com/OKHP3/skillz

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rest-api-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/okhp3/skillz/rest-api-best-practices/github.svg)](https://agentmods.dev/skills/okhp3/skillz/rest-api-best-practices)
Your own site
<a href="https://agentmods.dev/skills/okhp3/skillz/rest-api-best-practices"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/rest-api-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rest-api-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/okhp3/skillz/rest-api-best-practices"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/rest-api-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,774 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.01774
Opus 5 $0.00035 $0.00887
Sonnet 5 $0.00014 $0.00355
Haiku 4.5 $0.00007 $0.00177

Measured 6d ago against content hash 032eeb989790, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

rest-api-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

community/rest-api-best-practices/SKILL.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

REST API Best Practices

Use this skill when the main question is how to design, review, or improve a REST API — from URL structure to error formats to security.

Working Style

  1. Start from what the consumer needs, not from what the database looks like.
  2. Use HTTP as designed — methods, status codes, and headers carry meaning.
  3. Express domain capabilities, not data operations.
  4. Make errors as informative as successes.
  5. Design for change: version early, break compatibility deliberately.

Design Workflow

  1. Define the resources.

    • What are the concepts the consumer needs to interact with?
    • Name them with nouns, in plural form.
    • Avoid verbs in URLs — the HTTP method is the verb.
  2. Choose the right HTTP method.

    • GET for retrieval (safe, idempotent, cacheable)
    • POST for creation or non-idempotent operations
    • PUT for full replacement (idempotent)
    • PATCH for partial update
    • DELETE for removal (idempotent)
  3. Design the URL.

    • Keep paths flat where possible — at most two levels of nesting.
    • Use query parameters for filtering, sorting, and pagination.
    • Use task URLs (POST /orders/{id}/cancel) for domain operations that aren't simple CRUD.
  4. Define response shapes.

    • Choose a consistent field naming convention (camelCase or snake_case) and stick to it.
    • Return only what the consumer needs.
    • Use HTTP headers for metadata (pagination, rate limits).
  5. Define error responses.

    • Use the right 4xx or 5xx status code — never return 200 for errors.
    • Return a structured error body with a machine-readable code and a human-readable message.
    • Follow RFC 9457 (Problem Details, which obsoletes RFC 7807) when the team needs a standard.
  6. Add versioning.

    • Default to URL versioning (/v1/).
    • Treat a breaking change as a reason to bump the version, not to patch silently.

Heuristics

Resource Naming

Nouns, plural, lowercase, kebab-case for multi-word: /user-profiles, /order-items.

Read the full file on GitHub · 149 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 149 lines · 70 tokens per session scan A 032eeb989790

Subscribe to this mod's changes

rest-api-best-practices is a skill published in the GitHub repository OKHP3/skillz (3 stars, last pushed yesterday), licensed MIT. It adds 70 tokens to every session and 1,774 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

feature-workflow

Phased workflow for delivering a Drupal feature or non-trivial change: plan, implement, review, test, finalize. Use when building a new custom module, adding a route/form/plugin, changing entity structure or schema, or any task touching more than a couple of files. Do NOT use for typo fixes, CSS tweaks, or single-line…

siva01c/claude-plugins · 101 tokens

drupal-module-development

Use when creating or extending Drupal 11 custom modules, including scaffolding, service architecture, and dependency injection best practices.

siva01c/claude-plugins · 29 tokens

scale-to-millions

Use this skill whenever the user is designing, reviewing, debugging, or answering interview questions about system/software architecture and scalability — e.g. "scale my app", "how do I handle more traffic", "design a URL shortener / news feed / chat system", "my API is slow under load", "should I shard my database"…

Rudra-narayan-muduli-001/Scale-to-Millions · 130 tokens

houtu-dependencies

Skill "houtu-dependencies" from lujiafa/houtu-project-skills, covering houtu framework — ai agent coding guide, core principles, code generation workflow (must be executed in order), step 1 — detect version & dependencies and step 2 — identify scenario & select module.

lujiafa/houtu-project-skills · 283 tokens

web-auth-integrator

Integrate authentication and authorization flows with provider-specific setup and RBAC safeguards.

0x-Professor/Agent-Skills-Hub · 20 tokens

web-backend-builder

Scaffold backend API, data models, ORM setup, and endpoint inventory with OpenAPI output.

0x-Professor/Agent-Skills-Hub · 24 tokens