api-design

api-design is a skill for Claude Code from krzysztofsurdy/code-virtuoso. It costs 35 tokens per session (2,788 once invoked), scanned A, original, MIT.

Guidance for designing REST and GraphQL APIs, which are interfaces that let software exchange data. It covers consistent behavior, versioning, errors, and pagination.

In plain words
What is it for?
Use it to design or review an API, choose between REST and GraphQL, plan version changes, define error formats, or set team-wide API rules.
Why use it?
It helps prevent confusing endpoints and unpredictable responses that make integrations difficult to build and maintain.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the knowledge-virtuoso plugin — 18 skills shipped together

Good fit Use it to design or review an API, choose between REST and GraphQL, plan version changes, define error formats, or set team-wide API rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/krzysztofsurdy/code-virtuoso/api-design
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 krzysztofsurdy/code-virtuoso --skill api-design
Clone the repo
git clone --depth 1 https://github.com/krzysztofsurdy/code-virtuoso

Made for: Claude Code.

Or install knowledge-virtuoso, the plugin that ships this one along with the rest of its 18 skills.

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 api-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/api-design/github.svg)](https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/api-design)
Your own site
<a href="https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/api-design"><img src="https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/api-design/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 api-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/api-design"><img src="https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/api-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,788 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.00035 $0.02788
Opus 5.5 $0.00014 $0.01115
Sonnet 5.5 $0.00007 $0.00558
Haiku 4.5 $0.00003 $0.00279

Measured 4d ago against content hash 0e3a00fa7dcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-design 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 4d 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.

skills/knowledge/api-design/SKILL.md · 265 lines

How it starts

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

API Design

Principles and patterns for designing APIs that are consistent, predictable, and easy to evolve. Applies to any language or framework. The focus is protocol-level design decisions, not implementation details.

Treat the API surface as a product: consumers should be able to predict behavior, recover from errors, and integrate without reading source code.

When to use

  • Designing a new public or internal API from scratch
  • Reviewing an existing API for consistency and usability
  • Choosing between REST and GraphQL for a project
  • Planning API versioning or migration strategy
  • Defining error response contracts across services
  • Establishing API standards for a team or organization

REST vs GraphQL

Aspect REST GraphQL
Best for CRUD-heavy, resource-oriented domains Complex, interconnected data with varied client needs
Data fetching Fixed response shapes per endpoint Client specifies exact fields needed
Over-fetching Common, endpoints return full resources Eliminated, clients request only what they need
Under-fetching Common, requires multiple round trips Eliminated, a single query can span relations
Caching Built-in HTTP caching (ETags, Cache-Control) Requires custom caching (normalized stores, persisted queries)
File uploads Native multipart support Requires workarounds (multipart spec or separate endpoint)
Real-time Webhooks, SSE, or polling Subscriptions built into the spec
Tooling maturity Mature: OpenAPI, Postman, HTTP clients Growing: Apollo, Relay, GraphiQL
Learning curve Lower, builds on existing HTTP knowledge Higher: schema language, resolvers, query optimization
Error handling HTTP status codes + response body Executed operations usually return 200 with errors in the response errors array; request errors can use 4xx (GraphQL over HTTP, still a draft)
Versioning URL path, headers, or query params Schema evolution via deprecation + additive changes

Read the full file on GitHub · 265 lines

Files

What ships with it

3 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.

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. 4d ago Changed · +4 lines · -59 tokens per session 0e3a00fa7dcd
  2. 1mo ago First seen · 261 lines · 94 tokens per session scan A 1fe3d606e39b

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository krzysztofsurdy/code-virtuoso (36 stars, last pushed 2d ago), licensed MIT. It adds 35 tokens to every session and 2,788 once invoked, about $0.0001 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.