Agent skill

API Design

by KbWen in KbWen/agentic-os

Design or review REST/GraphQL APIs when endpoints or contracts change.

MITAuto-check passedBackend & APIs

Install API Design

skills CLI
$ npx skills add KbWen/agentic-os --skill api-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install KbWen/agentic-os api-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/KbWen/agentic-os.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/api-design .claude/skills/api-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-design
GitHub stars
206
Token cost
~1k tokens
SKILL.md length
422 words
Files
2
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Design or review REST/GraphQL APIs when endpoints or contracts change.

  • Tasks that involve API design
  • SKILL.md covers When to Apply, Conventions, Checklist and Heading-Scoped Read Note, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve GraphQL

What it does

API Design is an agent skill from KbWen/agentic-os. Design or review REST/GraphQL APIs when endpoints or contracts change.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Backend & APIs, covering API design and GraphQL. The repository describes itself as: Governance framework for AI coding agents. It runs them through a five-step workflow (plan, build, review, test, ship) where no step counts as done without evidence. Drop-in… The licence is MIT.

When your agent uses it

  • Tasks that involve API design
  • Tasks that involve GraphQL

Example prompts

  • “/api-design”

What it can do on your machine

Read from SKILL.md and the folder at commit 81a4034. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Design loads about 1k tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 422 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from KbWen/agentic-os at commit 81a4034, republished under its MIT licence (© KbWen). 422 words, ~1,017 tokens.

Download SKILL.mdSave it as .claude/skills/api-design/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
api-design
description
Design or review REST/GraphQL APIs when endpoints or contracts change.
<!-- This is a SCAFFOLD skill -->

API Design

When to Apply

  • Classification: feature, architecture-change, hotfix (if touching API endpoints)
  • Phase: /implement (design & build), /review (compliance check), /test (contract verification)
  • Trigger: Task involves creating, modifying, or deprecating API endpoints

Conventions

Customize after /app-init: Replace these generic conventions with your project's ADR decisions.

Endpoint Naming
  • Use nouns for resources, not verbs: GET /users not GET /getUsers
  • Plural resource names: /users, /orders, /products
  • Nested resources for relationships: /users/:id/orders
  • Use kebab-case for multi-word paths: /order-items
HTTP Methods
ActionMethodSuccess StatusIdempotent
ListGET200Yes
Get oneGET200Yes
CreatePOST201No
Full updatePUT200Yes
Partial updatePATCH200No
DeleteDELETE204Yes
Error Response Format
json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Email is required",
    "details": {
      "field": "email",
      "constraint": "required"
    }
  }
}
Standard Error Codes
HTTP StatusWhenError Code Pattern
400Invalid inputVALIDATION_ERROR, INVALID_FORMAT
401Not authenticatedUNAUTHORIZED
403Not permittedFORBIDDEN
404Resource not foundNOT_FOUND
409Conflict (duplicate)CONFLICT, DUPLICATE
422Business rule violationUNPROCESSABLE
429Rate limitedRATE_LIMITED
500Server errorINTERNAL_ERROR
Pagination
json
{
  "data": [...],
  "pagination": {
    "total": 100,
    "page": 1,
    "per_page": 20,
    "has_next": true
  }
}
Versioning
  • URL path versioning: /api/v1/users
  • Breaking changes require new version
  • Deprecation: add Sunset header with date, keep old version for N months
Input Validation
  • Validate at the controller/route level BEFORE business logic
  • Return ALL validation errors at once (batch), not one at a time
  • Sanitize strings: trim whitespace, escape HTML where applicable
  • Enforce max lengths on all string fields
Show full SKILL.md (205 more words)Show less

Checklist

During /implement:

  • Every endpoint has input validation
  • Every endpoint returns consistent error format
  • Every endpoint has proper auth check (or explicit public annotation)
  • Pagination for list endpoints
  • Rate limiting consideration (at least documented in spec)
  • No sensitive data in URL parameters (use body or headers)
  • Request/response examples in spec match implementation

During /review:

  • No N+1 query patterns in list endpoints
  • Proper HTTP status codes (not everything is 200)
  • Idempotency for PUT/DELETE
  • Error messages don't leak internal details (stack traces, SQL, paths)
  • CORS configured per ADR policy

Heading-Scoped Read Note

For phase-entry loading, read only:

  • When to Apply
  • Checklist

Load Conventions, Anti-Patterns, and References on full read or cache miss only.

Anti-Patterns

  • God endpoint: One endpoint that does everything based on query params. Split into specific endpoints.
  • Verb in URL: POST /createUser → POST /users
  • Inconsistent naming: Mixing /user and /products (singular vs plural)
  • Swallowing errors: Catching exceptions and returning 200 with { success: false }
  • Leaking internals: Returning DB column names directly as API fields without mapping
  • Missing 404: Returning empty 200 instead of 404 when resource doesn't exist
  • Unbounded lists: List endpoints without pagination or default limits

References

  • Project ADR: docs/adr/ADR-002-project-architecture.md § API Design
  • Security guardrails: .agent/rules/security_guardrails.md (A01: Access Control, A03: Injection)
  • Spec template: .agentcortex/templates/spec-app-feature.md § API Contract

© KbWen, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/api-design of KbWen/agentic-os.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 81a4034

Compare with similar skills

API Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Design this skillKbWen/agentic-os206—~1kAutomated safety check: PassMIT
API DesignerJeffallan/claude-skills12k2 repos~2kAutomated safety check: PassMIT
Nodejs Backend Patternsever-works/ever-works15817 repos~4kAutomated safety check: PassAGPL-3.0
API And Interface Designdzhalaevd/Donatello1359 repos~2.6kAutomated safety check: PassApache-2.0
API Design Principlesjh941213/my-cc-harness12619 repos~3.4kAutomated safety check: PassNone
Designing APIsCloudAI-X/claude-workflow-v21.4k2 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • Nodejs Backend Patterns

    ever-works/ever-works

    Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices.

    158 GitHub starsUsed in 17 repos~4k tokens
    Backend & APIsAuto-check passed
  • API And Interface Design

    dzhalaevd/Donatello

    Guides stable API and interface design. An agent skill from dzhalaevd/Donatello.

    135 GitHub starsUsed in 9 repos~2.6k tokens
    Backend & APIsAuto-check passed
  • API Design Principles

    jh941213/my-cc-harness

    REST 및 GraphQL API 설계 원칙 가이드. An agent skill from jh941213/my-cc-harness.

    126 GitHub starsUsed in 19 repos~3.4k tokens
    Backend & APIsAuto-check passed
  • Designing APIs

    CloudAI-X/claude-workflow-v2

    Designs REST and GraphQL APIs including endpoints, error handling, versioning, and documentation.

    1.4k GitHub starsUsed in 2 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • GraphQL Architect

    Jeffallan/claude-skills

    Designs GraphQL schemas and Apollo Federation graphs, with DataLoader resolvers, subscriptions, query complexity limits and caching.

    12k GitHub starsUsed in 1 repo~1.3k tokens
    Backend & APIsAuto-check passed

More from KbWen/agentic-os

All 12 skills in this repo
  • Frontend Patterns

    KbWen/agentic-os

    Apply frontend conventions when components, pages, forms, or client state change.

    206 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Karpathy Principles

    KbWen/agentic-os

    Behavioral guidelines to reduce common LLM coding mistakes — Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution.

    206 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Production Readiness

    KbWen/agentic-os

    Use at review and ship, automatically for feature or architecture changes and on request for error handling, logging, crash reporting, or observability; verify errors reach production monitoring.

    206 GitHub stars~938 tokensUpdated yesterday
    Auto-check passed
  • Doc Lookup

    KbWen/agentic-os

    Check official docs when framework APIs or configuration may be version-sensitive.

    206 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: warnings
  • Systematic Debugging

    KbWen/agentic-os

    A skill your agent uses when investigating a bug, test failure, flaky test, unexpected behavior, or a hotfix, or an unexplained or failed fix; find the root cause first.

    206 GitHub stars~496 tokensUpdated yesterday
    Auto-check passed
  • Database Design

    KbWen/agentic-os

    Design schemas and migrations when persistent data structures change.

    206 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about API Design

What does API Design do?

Design or review REST/GraphQL APIs when endpoints or contracts change. API Design is an agent skill from KbWen/agentic-os. Design or review REST/GraphQL APIs when endpoints or contracts change.

When should I use API Design?

API Design fits situations like: tasks that involve API design; tasks that involve GraphQL.

How do I install API Design in Claude Code?

Run `npx skills add KbWen/agentic-os --skill api-design -a claude-code`. Or copy the skill folder (.agents/skills/api-design in KbWen/agentic-os) into .claude/skills/api-design in your project. Claude Code loads it when a task matches its description.

How do I install API Design in Codex?

Run `npx skills add KbWen/agentic-os --skill api-design -a codex`. Or copy the skill folder (.agents/skills/api-design in KbWen/agentic-os) into .agents/skills/api-design in your project. Codex loads it when a task matches its description.

Can I use API Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add KbWen/agentic-os --skill api-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-design, .gemini/skills/api-design, .github/skills/api-design and .opencode/skills/api-design in your project.

What does API Design need to run?

SKILL.md names no scripts, command-line tools or credentials: API Design is instructions for the agent only.

Does API Design access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Design use?

API Design is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Design use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Design?

Skills that share tags, products or a category with API Design: API Designer (Jeffallan/claude-skills, 12k stars), Nodejs Backend Patterns (ever-works/ever-works, 158 stars), API And Interface Design (dzhalaevd/Donatello, 135 stars) and API Design Principles (jh941213/my-cc-harness, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Design?

KbWen (a GitHub user) maintains it in KbWen/agentic-os, which has 206 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 6, 2026.

Source: KbWen/agentic-os on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.