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.
npx agentmods add skills/j4flmao/agent-skills/api-designnpx skills add j4flmao/agent-skills --skill api-designgit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote 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.
[](https://agentmods.dev/skills/j4flmao/agent-skills/api-design)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/api-design"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/api-design.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00118 | $0.07764 |
| Opus 5 | $0.00059 | $0.03882 |
| Sonnet 5 | $0.00024 | $0.01553 |
| Haiku 4.5 | $0.00012 | $0.00776 |
Grade A, and why
backend-api-design scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
Problem: Devs testing in browser, curl, or Postman can't see the version easily. API documentation tools (Swagger UI) may not support header-based versioning. How it starts
The opening of the file, as written. The whole thing — 909 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backend API Design
Purpose
Design consistent, production-grade REST or GraphQL APIs. Every endpoint must follow the same conventions for URLs, requests, responses, errors, and pagination.
Agent Protocol
Trigger
Exact user phrases: "API design", "REST API", "GraphQL schema", "endpoint design", "API conventions", "URL structure", "HTTP methods", "response format", "API versioning", "pagination", "design an endpoint", "API contract".
Input Context
Before activating, verify:
- The resource or feature being designed is known.
- The tech-spec for the feature exists or the user has described the resource.
- The chosen API style (REST/GraphQL) is known. If not, ask: "REST or GraphQL?"
Output Artifact
No file output unless the user requests it. Produces endpoint specifications as text.
Response Format
For each endpoint:
{method} {path}
Auth: {required/optional/none}
Request: {schema reference}
Response 2xx: {schema reference}
Errors: {list of error codes}
For a full API design, group by resource:
## {resource}
{list of endpoints}
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output. No explanations of REST principles.
Completion Criteria
- All resources follow the naming conventions below.
- Every endpoint has: method, path, auth requirement, request schema, response schema, error codes.
- List endpoints are paginated.
- Response envelope is consistent across all endpoints.
- Error responses follow the standard format.
- No verbs in URL paths.
Max Response Length
Per endpoint: 6 lines. Per resource: unlimited.
Architecture Decision Trees
REST vs GraphQL Decision Tree
What is the primary client type?
├── Public API with many consumers
│ ├── REST — broadest compatibility, cache-friendly, CDN-friendly
│ └── GraphQL only if clients need flexible data shapes
├── Single-page application (SPA)
│ ├── REST + BFF — simpler, more performant, better caching
│ └── GraphQL — if client needs to compose multiple resources
├── Mobile application
│ ├── REST + BFF — smaller payloads, server-controlled shapes
│ └── GraphQL — if network round-trips are the bottleneck
└── Service-to-service (internal)
├── REST — simple, familiar, good enough
└── gRPC — if latency-critical or streaming needed
What ships with it
11 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/api-design-advanced.md 19 KB
- references/api-design-documentation.md 4.2 KB
- references/api-design-fundamentals.md 14 KB
- references/api-design-performance.md 5.3 KB
- references/api-design-security.md 4.3 KB
- references/api-documentation-portal.md 56 KB
- references/api-error-handling.md 3.0 KB
- references/api-pagination-filtering.md 2.9 KB
- references/api-testing-contract-testing.md 59 KB
- references/graphql-conventions.md 2.4 KB
- references/rest-conventions.md 1.2 KB
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.
- 6d ago First seen · 909 lines · 118 tokens per session scan A bb21d2c76a5b
backend-api-design is a skill published in the GitHub repository j4flmao/agent-skills (20 stars, last pushed today), licensed MIT. It adds 118 tokens to every session and 7,764 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
sandbox-bench
Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app (rps, latency, p95; TTFB, RSS and document/Flight bytes when the Next side captures them) and, for React changes, through…
v8-jit
V8 JIT optimization patterns for writing high-performance JavaScript in Next.js server internals. Use when writing or reviewing hot-path code in app-render, stream-utils, routing, caching, or any per-request code path. Covers hidden classes / shapes, monomorphic call sites, inline caches, megamorphic deopt, closure…
dce-edge
DCE-safe require() patterns and edge runtime constraints. Use when writing conditional require() calls, guarding Node-only imports (node:stream etc.), or editing define-env-plugin.ts / app-render / stream-utils for edge builds. Covers if/else branching for webpack DCE, TypeScript definite assignment, the NEXTRUNTIME…
ccxt-rust
CCXT cryptocurrency exchange library for Rust developers. Covers both REST API (standard) and WebSocket API (real-time). Helps install CCXT, connect to exchanges, fetch market data, place orders, stream live tickers/orderbooks, handle authentication, and manage errors in Rust projects. Use when working with crypto…
scalar-docs
Skill for writing and updating scalar.config.json — Scalar Docs configuration reference for users and LLMs.
openapi-glossary
Use consistent OpenAPI terminology and definitions when writing documentation, educational material, and tooling guidance.