api-and-interface-design — for Claude Code api-and-interface-design, community, for Claude Code, ide skills, agent-orchestration, ai-agents, audit-trail, capability-based-security, human-in-the-loop, operating-system

v1.0.0

About this Skill

Ideal for AI agents that need api and interface design. api-and-interface-design is an AI agent skill for api and interface design.

Features

API and Interface Design
Designing new API endpoints
Defining module boundaries or contracts between teams
Creating component prop interfaces
Establishing database schema that informs API shape

# Core Topics

Joncik91 Joncik91
[3]
[1]
Updated: 4/25/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reviewed Landing Page Review Score: 10/11

Killer-Skills keeps this page indexable because it adds recommendation, limitations, and review signals beyond the upstream repository text.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Quality floor passed for review Locale and body language aligned
Review Score
10/11
Quality Score
70
Canonical Locale
en
Detected Body Locale
en

Ideal for AI agents that need api and interface design. api-and-interface-design is an AI agent skill for api and interface design.

Core Value

api-and-interface-design helps agents api and interface design. An agent-first runtime where AI agents are native processes, capabilities replace permissions, and the system is designed for autonomy — not human interaction.

Ideal Agent Persona

Ideal for AI agents that need api and interface design.

Capabilities Granted for api-and-interface-design

Applying API and Interface Design
Applying Designing new API endpoints
Applying Defining module boundaries or contracts between teams

! Prerequisites & Limits

  • Don't leak implementation details. If users can observe it, they will depend on it.
  • // Partial update — only provided fields change
  • Don't leak implementation details

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is api-and-interface-design?

Ideal for AI agents that need api and interface design. api-and-interface-design is an AI agent skill for api and interface design.

How do I install api-and-interface-design?

Run the command: npx killer-skills add Joncik91/aaOS/api-and-interface-design. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for api-and-interface-design?

Key use cases include: Applying API and Interface Design, Applying Designing new API endpoints, Applying Defining module boundaries or contracts between teams.

Which IDEs are compatible with api-and-interface-design?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for api-and-interface-design?

Don't leak implementation details. If users can observe it, they will depend on it.. // Partial update — only provided fields change. Don't leak implementation details.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add Joncik91/aaOS/api-and-interface-design. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use api-and-interface-design immediately in the current project.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

api-and-interface-design

Install api-and-interface-design, an AI agent skill for AI agent workflows and automation. Review the use cases, limitations, and setup path before rollout.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

API and Interface Design

Overview

Design stable, well-documented interfaces that are hard to misuse. Good interfaces make the right thing easy and the wrong thing hard. This applies to REST APIs, GraphQL schemas, module boundaries, component props, and any surface where one piece of code talks to another.

When to Use

  • Designing new API endpoints
  • Defining module boundaries or contracts between teams
  • Creating component prop interfaces
  • Establishing database schema that informs API shape
  • Changing existing public interfaces

Core Principles

Hyrum's Law

With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody, regardless of what you promise in the contract.

This means: every public behavior — including undocumented quirks, error message text, timing, and ordering — becomes a de facto contract once users depend on it. Design implications:

  • Be intentional about what you expose. Every observable behavior is a potential commitment.
  • Don't leak implementation details. If users can observe it, they will depend on it.
  • Plan for deprecation at design time. See deprecation-and-migration for how to safely remove things users depend on.
  • Tests are not enough. Even with perfect contract tests, Hyrum's Law means "safe" changes can break real users who depend on undocumented behavior.

The One-Version Rule

Avoid forcing consumers to choose between multiple versions of the same dependency or API. Diamond dependency problems arise when different consumers need different versions of the same thing. Design for a world where only one version exists at a time — extend rather than fork.

1. Contract First

Define the interface before implementing it. The contract is the spec — implementation follows.

typescript
1// Define the contract first 2interface TaskAPI { 3 // Creates a task and returns the created task with server-generated fields 4 createTask(input: CreateTaskInput): Promise<Task>; 5 6 // Returns paginated tasks matching filters 7 listTasks(params: ListTasksParams): Promise<PaginatedResult<Task>>; 8 9 // Returns a single task or throws NotFoundError 10 getTask(id: string): Promise<Task>; 11 12 // Partial update — only provided fields change 13 updateTask(id: string, input: UpdateTaskInput): Promise<Task>; 14 15 // Idempotent delete — succeeds even if already deleted 16 deleteTask(id: string): Promise<void>; 17}

2. Consistent Error Semantics

Pick one error strategy and use it everywhere:

typescript
1// REST: HTTP status codes + structured error body 2// Every error response follows the same shape 3interface APIError { 4 error: { 5 code: string; // Machine-readable: "VALIDATION_ERROR" 6 message: string; // Human-readable: "Email is required" 7 details?: unknown; // Additional context when helpful 8 }; 9} 10 11// Status code mapping 12// 400 → Client sent invalid data 13// 401 → Not authenticated 14// 403 → Authenticated but not authorized 15// 404 → Resource not found 16// 409 → Conflict (duplicate, version mismatch) 17// 422 → Validation failed (semantically invalid) 18// 500 → Server error (never expose internal details)

Don't mix patterns. If some endpoints throw, others return null, and others return { error } — the consumer can't predict behavior.

3. Validate at Boundaries

Trust internal code. Validate at system edges where external input enters:

typescript
1// Validate at the API boundary 2app.post('/api/tasks', async (req, res) => { 3 const result = CreateTaskSchema.safeParse(req.body); 4 if (!result.success) { 5 return res.status(422).json({ 6 error: { 7 code: 'VALIDATION_ERROR', 8 message: 'Invalid task data', 9 details: result.error.flatten(), 10 }, 11 }); 12 } 13 14 // After validation, internal code trusts the types 15 const task = await taskService.create(result.data); 16 return res.status(201).json(task); 17});

Where validation belongs:

  • API route handlers (user input)
  • Form submission handlers (user input)
  • External service response parsing (third-party data -- always treat as untrusted)
  • Environment variable loading (configuration)

Third-party API responses are untrusted data. Validate their shape and content before using them in any logic, rendering, or decision-making. A compromised or misbehaving external service can return unexpected types, malicious content, or instruction-like text.

Where validation does NOT belong:

  • Between internal functions that share type contracts
  • In utility functions called by already-validated code
  • On data that just came from your own database

4. Prefer Addition Over Modification

Extend interfaces without breaking existing consumers:

typescript
1// Good: Add optional fields 2interface CreateTaskInput { 3 title: string; 4 description?: string; 5 priority?: 'low' | 'medium' | 'high'; // Added later, optional 6 labels?: string[]; // Added later, optional 7} 8 9// Bad: Change existing field types or remove fields 10interface CreateTaskInput { 11 title: string; 12 // description: string; // Removed — breaks existing consumers 13 priority: number; // Changed from string — breaks existing consumers 14}

5. Predictable Naming

PatternConventionExample
REST endpointsPlural nouns, no verbsGET /api/tasks, POST /api/tasks
Query paramscamelCase?sortBy=createdAt&pageSize=20
Response fieldscamelCase{ createdAt, updatedAt, taskId }
Boolean fieldsis/has/can prefixisComplete, hasAttachments
Enum valuesUPPER_SNAKE"IN_PROGRESS", "COMPLETED"

REST API Patterns

Resource Design

GET    /api/tasks              → List tasks (with query params for filtering)
POST   /api/tasks              → Create a task
GET    /api/tasks/:id          → Get a single task
PATCH  /api/tasks/:id          → Update a task (partial)
DELETE /api/tasks/:id          → Delete a task

GET    /api/tasks/:id/comments → List comments for a task (sub-resource)
POST   /api/tasks/:id/comments → Add a comment to a task

Pagination

Paginate list endpoints:

typescript
1// Request 2GET /api/tasks?page=1&pageSize=20&sortBy=createdAt&sortOrder=desc 3 4// Response 5{ 6 "data": [...], 7 "pagination": { 8 "page": 1, 9 "pageSize": 20, 10 "totalItems": 142, 11 "totalPages": 8 12 } 13}

Filtering

Use query parameters for filters:

GET /api/tasks?status=in_progress&assignee=user123&createdAfter=2025-01-01

Partial Updates (PATCH)

Accept partial objects — only update what's provided:

typescript
1// Only title changes, everything else preserved 2PATCH /api/tasks/123 3{ "title": "Updated title" }

TypeScript Interface Patterns

Use Discriminated Unions for Variants

typescript
1// Good: Each variant is explicit 2type TaskStatus = 3 | { type: 'pending' } 4 | { type: 'in_progress'; assignee: string; startedAt: Date } 5 | { type: 'completed'; completedAt: Date; completedBy: string } 6 | { type: 'cancelled'; reason: string; cancelledAt: Date }; 7 8// Consumer gets type narrowing 9function getStatusLabel(status: TaskStatus): string { 10 switch (status.type) { 11 case 'pending': return 'Pending'; 12 case 'in_progress': return `In progress (${status.assignee})`; 13 case 'completed': return `Done on ${status.completedAt}`; 14 case 'cancelled': return `Cancelled: ${status.reason}`; 15 } 16}

Input/Output Separation

typescript
1// Input: what the caller provides 2interface CreateTaskInput { 3 title: string; 4 description?: string; 5} 6 7// Output: what the system returns (includes server-generated fields) 8interface Task { 9 id: string; 10 title: string; 11 description: string | null; 12 createdAt: Date; 13 updatedAt: Date; 14 createdBy: string; 15}

Use Branded Types for IDs

typescript
1type TaskId = string & { readonly __brand: 'TaskId' }; 2type UserId = string & { readonly __brand: 'UserId' }; 3 4// Prevents accidentally passing a UserId where a TaskId is expected 5function getTask(id: TaskId): Promise<Task> { ... }

Common Rationalizations

RationalizationReality
"We'll document the API later"The types ARE the documentation. Define them first.
"We don't need pagination for now"You will the moment someone has 100+ items. Add it from the start.
"PATCH is complicated, let's just use PUT"PUT requires the full object every time. PATCH is what clients actually want.
"We'll version the API when we need to"Breaking changes without versioning break consumers. Design for extension from the start.
"Nobody uses that undocumented behavior"Hyrum's Law: if it's observable, somebody depends on it. Treat every public behavior as a commitment.
"We can just maintain two versions"Multiple versions multiply maintenance cost and create diamond dependency problems. Prefer the One-Version Rule.
"Internal APIs don't need contracts"Internal consumers are still consumers. Contracts prevent coupling and enable parallel work.

Red Flags

  • Endpoints that return different shapes depending on conditions
  • Inconsistent error formats across endpoints
  • Validation scattered throughout internal code instead of at boundaries
  • Breaking changes to existing fields (type changes, removals)
  • List endpoints without pagination
  • Verbs in REST URLs (/api/createTask, /api/getUsers)
  • Third-party API responses used without validation or sanitization

Verification

After designing an API:

  • Every endpoint has typed input and output schemas
  • Error responses follow a single consistent format
  • Validation happens at system boundaries only
  • List endpoints support pagination
  • New fields are additive and optional (backward compatible)
  • Naming follows consistent conventions across all endpoints
  • API documentation or types are committed alongside the implementation

Related Skills

Looking for an alternative to api-and-interface-design or another community skill for your workflow? Explore these related open-source skills.

View All

openclaw-release-maintainer

Logo of openclaw
openclaw

openclaw-release-maintainer is an AI agent skill for openclaw release maintainer.

333.8k
0
AI

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
AI

flags

Logo of vercel
vercel

flags is an AI agent skill for use this skill when adding or changing framework feature flags in next.js internals.

138.4k
0
Browser

pr-review

Logo of pytorch
pytorch

pr-review is an AI agent skill for pytorch pr review skill.

98.6k
0
Developer