api-patterns

A set of guidelines for designing web API routes, which are the URLs that software uses to exchange data. It covers input checks, response errors, route structure, and access control.

In plain words
What is it for?
Use it when adding or changing API endpoints, request handling, middleware, validation, error responses, or authorization checks.
Why use it?
It helps prevent invalid requests, confusing errors, exposed internal details, and users accessing someone else’s data.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/anatomia-dev/anatomia/api-patterns
Any agent
npx skills add anatomia-dev/anatomia --skill api-patterns
Clone the repo
git clone --depth 1 https://github.com/anatomia-dev/anatomia

Made for: Claude Code, Codex.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 203 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00032 $0.00203
Opus 5 $0.00016 $0.00102
Sonnet 5 $0.00006 $0.00041
Haiku 4.5 $0.00003 $0.00020

Measured 2d ago against content hash bc52e26cbe7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 2d 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.

packages/cli/templates/.claude/skills/api-patterns/SKILL.md · 22 lines

What it actually says

API Patterns

Detected

Rules

  • Validate all input at the API boundary. Parse request bodies, query params, and path params with the project's validation library before any processing.
  • Return a consistent error response shape from every endpoint. Never leak stack traces, database errors, or internal paths in production responses.
  • Keep route handlers thin. Validation, then service call, then response. Business logic and data access belong in separate modules.
  • Verify the requesting user owns the requested resource. An authenticated user should not access another user's data by changing an ID in the URL.

Gotchas

Not yet captured. Add as you discover them during development.

Examples

Not yet captured. Add short snippets showing the RIGHT way.

Files

What ships with it

1 file 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.

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. 2d ago First seen · 22 lines · 32 tokens per session scan A bc52e26cbe7f

Subscribe to this mod's changes

api-patterns is a skill published in the GitHub repository anatomia-dev/anatomia (32 stars, last pushed 29d ago), licensed MIT. It adds 32 tokens to every session and 203 once invoked, about $0.0002 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-08-30.

Related

Other skills, from other repositories

neus-integrate

Add NEUS access control to a host app. Install the SDK, drop in the gate widget, wire the server check, and test the flow. Use when a developer wants to gate content, sell access, or add proof-based checks to their application.

neus/network · 56 tokens

neus-trust-workflow

Checks identity, permissions, and reusable proofs before sensitive assistant actions. Use when verifying authority, mounting a Trusted Agent, managing Vault secrets, or when the user asks for NEUS Verify.

neus/network · 44 tokens

neus-setup

Add the hosted NEUS endpoint, sign in, and reuse profile, agents, and proofs.

neus/network · 24 tokens

integrated-browser

Use this when working on the VS Code integrated browser ("browserView") to understand its architecture and mental model. Covers the embedded Chromium browser, its editor tab, navigation, overlay/layout, sessions, and agent browser tools under src/vs/platform/browserView and src/vs/workbench/contrib/browserView.

microsoft/vscode · 68 tokens

agent-host-e2e-tests

Use when writing, recording, updating, or troubleshooting the agent host end-to-end tests under src/vs/platform/agentHost/test/node/e2e (black-box tests that drive the whole agent host over the AHP protocol, using a CapiReplayProxy record/replay system for Claude/Copilot/Codex). Covers adding a cross-provider test…

microsoft/vscode · 104 tokens

schema-exploration

Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.

langchain-ai/deepagents · 57 tokens