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 skills add ancoleman/ai-design-components --skill implementing-api-patternsgit clone --depth 1 https://github.com/ancoleman/ai-design-componentsWrote 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/ancoleman/ai-design-components/implementing-api-patterns)<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/implementing-api-patterns"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/implementing-api-patterns/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.
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/implementing-api-patterns"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/implementing-api-patterns.svg" alt="Reviewed on agentmods" width="80" 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.00127 | $0.03056 |
| Opus 5.5 | $0.00051 | $0.01222 |
| Sonnet 5.5 | $0.00025 | $0.00611 |
| Haiku 4.5 | $0.00013 | $0.00306 |
Grade A, and why
implementing-api-patterns 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 354 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Patterns Skill
Purpose
Design and implement APIs using the optimal pattern and framework for the use case. Choose between REST, GraphQL, gRPC, and tRPC based on API consumers, performance requirements, and type safety needs.
When to Use This Skill
Use when:
- Building backend APIs for web, mobile, or service consumers
- Connecting frontend components (forms, tables, dashboards) to databases
- Implementing pagination, rate limiting, or caching strategies
- Generating OpenAPI documentation automatically
- Choosing between REST, GraphQL, gRPC, or tRPC patterns
- Integrating authentication and authorization
- Optimizing API performance and scalability
Quick Decision Framework
WHO CONSUMES YOUR API?
├─ PUBLIC/THIRD-PARTY DEVELOPERS → REST with OpenAPI
│ ├─ Python → FastAPI (auto-docs, 40k req/s)
│ ├─ TypeScript → Hono (edge-first, 50k req/s, 14KB)
│ ├─ Rust → Axum (140k req/s, <1ms latency)
│ └─ Go → Gin (100k+ req/s, mature ecosystem)
│
├─ FRONTEND TEAM (same org)
│ ├─ TypeScript full-stack? → tRPC (E2E type safety)
│ └─ Complex data needs? → GraphQL
│ ├─ Python → Strawberry
│ ├─ Rust → async-graphql
│ ├─ Go → gqlgen
│ └─ TypeScript → Pothos
│
├─ SERVICE-TO-SERVICE (microservices)
│ └─ High performance → gRPC
│ ├─ Rust → Tonic
│ ├─ Go → Connect-Go (browser-friendly)
│ └─ Python → grpcio
│
└─ MOBILE APPS
├─ Bandwidth constrained → GraphQL (request only needed fields)
└─ Simple CRUD → REST (standard, well-understood)
REST Framework Selection
Python: FastAPI (Recommended)
Key Features: Auto OpenAPI docs, Pydantic v2 validation, async/await, 40k req/s
Basic Example:
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
price: float
@app.post("/items")
async def create_item(item: Item):
return {"id": 1, **item.dict()}
See references/rest-design-principles.md for FastAPI patterns and examples/python-fastapi/.
What ships with it
24 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.
- examples/go-gin/README.md 2.0 KB
- examples/graphql-strawberry/README.md 2.1 KB
- examples/grpc-tonic/README.md 2.4 KB
- examples/python-fastapi/main.py 7.3 KB runs code
- examples/python-fastapi/README.md 2.3 KB
- examples/python-fastapi/requirements.txt 97 B
- examples/rust-axum/README.md 2.3 KB
- examples/typescript-hono/index.ts 6.9 KB runs code
- examples/typescript-hono/package.json 484 B
- examples/typescript-trpc/README.md 2.9 KB
- outputs.yaml 9.5 KB
- README.md 8.7 KB
- references/caching-patterns.md 14 KB
- references/graphql-schema-design.md 14 KB
- references/grpc-protobuf-guide.md 15 KB
- references/openapi-documentation.md 11 KB
- references/pagination-patterns.md 16 KB
- references/rate-limiting-strategies.md 11 KB
- references/rest-design-principles.md 12 KB
- references/trpc-setup-guide.md 16 KB
- references/versioning-strategies.md 15 KB
- scripts/benchmark_endpoints.py 6.7 KB runs code
- scripts/generate_openapi.py 3.8 KB runs code
- scripts/validate_api_spec.py 5.4 KB runs code
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.
- 2mo ago First seen · 354 lines · 127 tokens per session scan A 0695ad2f71ef
implementing-api-patterns is a skill published in the GitHub repository ancoleman/ai-design-components (526 stars, last pushed 10mo ago), licensed MIT. It adds 127 tokens to every session and 3,056 once invoked, about $0.0005 per session on Opus 5.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-08-30.
Other skills, from other repositories
form-strategy
Design forms that convert, validate well, resist spam, and integrate cleanly with downstream systems. Use this skill when designing or auditing any form (contact, signup, checkout, multi-step, embedded), planning validation logic, fighting spam, choosing form tooling, or improving form conversion. Triggers on form…
mcp-server-builder
Use to build, wire up, or debug an MCP (Model Context Protocol) server that gives Claude access to an internal API, database, or SaaS tool. Trigger when the user wants Claude to connect to their own system, asks for an MCP server, needs custom tools for Claude Code or the Claude app, or an existing server's tools are…
api-endpoint-scaffolder
Generate REST API endpoints with proper structure, validation, error handling, and types. Use when creating new API routes, endpoints, or backend services.
netlify-development
Best practices for building and deploying Netlify sites, covering serverless and edge functions, Netlify Blobs storage, the Image CDN, and build configuration. Use when writing Netlify Functions or Edge Functions, configuring netlify.toml or redirects/headers, managing environment variables across deploy contexts…
api-security-best-practices
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities.
apollo-graphql
Guidelines for developing GraphQL APIs and React applications using Apollo Client for state management, data fetching, and caching.