api-development

Meta-skill that orchestrates the full API development lifecycle — from design through documentation — by coordinating specialized skills, agents, and commands into a seamless build workflow.

7 stars

Best use case

api-development is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Meta-skill that orchestrates the full API development lifecycle — from design through documentation — by coordinating specialized skills, agents, and commands into a seamless build workflow.

Teams using api-development should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/api-development/SKILL.md --create-dirs "https://raw.githubusercontent.com/wpank/ai/main/skills/api/api-development/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/api-development/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How api-development Compares

Feature / Agentapi-developmentStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Meta-skill that orchestrates the full API development lifecycle — from design through documentation — by coordinating specialized skills, agents, and commands into a seamless build workflow.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# API Development

Orchestrate the full API development lifecycle by coordinating design, implementation, testing, and documentation into a single workflow.

## When to Use This Skill

- Building a new API from scratch
- Adding endpoints to an existing API
- Redesigning or refactoring an API
- Planning API versioning and migration
- Running a complete API development cycle (design → build → test → document → deploy)


## Installation

### OpenClaw / Moltbot / Clawbot

```bash
npx clawhub@latest install api-development
```


---

## Orchestration Flow

Follow these steps in order. Each step routes to the appropriate skill or tool.

### 1. Design the API

Load the `api-design` skill to establish resource models, URL structure, HTTP method semantics, error formats, and pagination strategy.

**Deliverables:** Resource list, endpoint map, request/response schemas, error format

### 2. Generate OpenAPI Spec

Produce a machine-readable OpenAPI 3.x specification from the design. Use the OpenAPI template in `api-design/assets/openapi-template.yaml` as a starting point.

**Deliverables:** `openapi.yaml` with all endpoints, schemas, auth schemes, and examples

### 3. Scaffold Endpoints

Generate route files, request/response types, and validation schemas for each endpoint. Group routes by resource.

**Deliverables:** Route files, type definitions, validation schemas per resource

### 4. Implement Business Logic

Write service-layer logic with input validation, authorization checks, database queries, and proper error propagation. Keep controllers thin — business logic lives in the service layer.

**Deliverables:** Service modules, repository layer, middleware (auth, rate limiting, CORS)

### 5. Test

Write tests at three levels:
- **Unit tests** — service logic, validation, error handling
- **Integration tests** — endpoint behavior with real DB
- **Contract tests** — response shapes match OpenAPI spec

**Deliverables:** Test suite with coverage for happy paths, error cases, edge cases, and auth

### 6. Document

Generate human-readable API documentation with usage examples and SDK snippets. Ensure every endpoint has description, parameters, request/response examples, and error codes.

**Deliverables:** API docs, changelog, authentication guide

### 7. Version and Deploy

Apply a versioning strategy, tag the release, update changelogs, and deploy through the pipeline. Follow the `api-versioning` skill for deprecation and migration guidance.

**Deliverables:** Version tag, changelog entry, deployment confirmation

---

## API Design Decision Table

Choose the right paradigm for your use case.

| Criteria | REST | GraphQL | gRPC |
|----------|------|---------|------|
| **Best for** | CRUD-heavy public APIs | Complex relational data, client-driven queries | Internal microservices, high-throughput |
| **Data fetching** | Fixed response shape per endpoint | Client specifies exact fields | Strongly typed protobuf messages |
| **Over/under-fetching** | Common problem | Solved by design | Minimal — schema is explicit |
| **Caching** | Native HTTP caching (ETags, Cache-Control) | Requires custom caching | No built-in HTTP caching |
| **Real-time** | Polling or WebSockets | Subscriptions (built-in) | Bidirectional streaming |
| **Tooling** | Mature — OpenAPI, Postman, curl | Growing — Apollo, Relay, GraphiQL | Mature — protoc, grpcurl, Buf |
| **Learning curve** | Low | Medium | Medium-High |
| **Versioning** | URL or header versioning | Schema evolution with `@deprecated` | Package versioning in `.proto` |

**Rule of thumb:** Default to REST for public APIs. Use GraphQL when clients need flexible queries across related data. Use gRPC for internal service-to-service communication.

---

## API Checklist

Run through this checklist before marking any API work as complete.

### Authentication & Authorization

- [ ] Authentication mechanism chosen (JWT, OAuth2, API key)
- [ ] Authorization rules enforced at every endpoint
- [ ] Tokens validated and scoped correctly
- [ ] Secrets stored securely (never in code or logs)

### Rate Limiting

- [ ] Rate limits configured per endpoint or consumer tier
- [ ] `RateLimit-*` headers included in responses
- [ ] `429 Too Many Requests` returned with `Retry-After` header
- [ ] Rate limit strategy documented for consumers

### Pagination

- [ ] All collection endpoints paginated
- [ ] Pagination style chosen (cursor-based or offset-based)
- [ ] `page_size` bounded with a sensible maximum
- [ ] Total count or `hasNextPage` indicator included

### Filtering & Sorting

- [ ] Filter parameters validated and sanitized
- [ ] Sort fields allow-listed (no arbitrary column sorting)
- [ ] Default sort order defined and documented

### Error Handling

- [ ] Consistent error response schema across all endpoints
- [ ] Correct HTTP status codes (4xx for client, 5xx for server)
- [ ] Validation errors return field-level detail
- [ ] Internal errors never leak stack traces or sensitive data

### Versioning

- [ ] Versioning strategy selected and applied uniformly
- [ ] Breaking vs non-breaking change policy documented
- [ ] Deprecation timeline communicated via `Sunset` header

### CORS

- [ ] Allowed origins configured (no wildcard `*` in production with credentials)
- [ ] Allowed methods and headers explicitly listed
- [ ] Preflight (`OPTIONS`) requests handled correctly

### Documentation

- [ ] OpenAPI / Swagger spec generated and up to date
- [ ] Every endpoint has description, parameters, and example responses
- [ ] Authentication requirements documented
- [ ] Error codes and meanings listed
- [ ] Changelog maintained for each version

### Security

- [ ] Input validation on all fields
- [ ] SQL injection prevention
- [ ] HTTPS enforced
- [ ] Sensitive data never in URLs or logs
- [ ] CORS configured correctly

### Monitoring

- [ ] Structured logging with request IDs
- [ ] Error tracking configured (Sentry, Datadog, etc.)
- [ ] Performance metrics collected (latency, error rate)
- [ ] Health check endpoint available (`/health`)
- [ ] Alerts configured for error rate spikes

---

## Skill Routing Table

| Need | Skill | Purpose |
|------|-------|---------|
| API design principles | `api-design` | Resource modeling, HTTP semantics, pagination, error formats |
| Versioning strategy | `api-versioning` | Version lifecycle, deprecation, migration patterns |
| Authentication | `auth-patterns` | JWT, OAuth2, sessions, RBAC, MFA |
| Error handling | `error-handling` | Error types, retry patterns, circuit breakers, HTTP errors |
| Rate limiting | `rate-limiting` | Algorithms, HTTP headers, tiered limits, distributed limiting |
| Caching | `caching` | Cache strategies, HTTP caching, invalidation, Redis patterns |
| Database migrations | `database-migrations` | Schema evolution, zero-downtime patterns, rollback strategies |

---

## NEVER Do

1. **NEVER skip the design phase** — jumping straight to code produces inconsistent APIs that are expensive to fix
2. **NEVER expose database schema directly** — API resources are not database tables; design around consumer use cases
3. **NEVER ship without authentication** — every production endpoint must have an auth strategy
4. **NEVER return inconsistent error formats** — every error response must follow the same schema
5. **NEVER break a published API without a versioning plan** — breaking changes require a new version, migration guide, and deprecation timeline
6. **NEVER deploy without tests and documentation** — untested APIs ship bugs, undocumented APIs frustrate developers

Related Skills

subagent-driven-development

7
from wpank/ai

Execute implementation plans by dispatching a fresh subagent per task with two-stage review (spec compliance then code quality). Use when you have an implementation plan with mostly independent tasks and want high-quality, fast iteration within a single session.

context-driven-development

7
from wpank/ai

Treat project context as a managed artifact alongside code. Use structured context documents (product.md, tech-stack.md, workflow.md) to enable consistent AI interactions and team alignment. Essential for projects using AI-assisted development.

schema-markup

7
from wpank/ai

Add, fix, or optimize schema markup and structured data. Use when the user mentions schema markup, structured data, JSON-LD, rich snippets, schema.org, FAQ schema, product schema, review schema, or breadcrumb schema.

prompt-engineering

7
from wpank/ai

Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production. Use when optimizing prompts, improving LLM outputs, designing production prompt templates, or building AI-powered features.

professional-communication

7
from wpank/ai

Write effective professional messages for software teams. Use when drafting emails, Slack/Teams messages, meeting agendas, status updates, or translating technical concepts for non-technical audiences. Triggers on email, slack, teams, message, meeting agenda, status update, stakeholder communication, escalation, jargon translation.

persona-docs

7
from wpank/ai

Create persona documentation for a product or codebase. Use when asked to create persona docs, document target users, define user journeys, document onboarding flows, or when starting a new product and needing to define its audience. Persona docs should be the first documentation created for any product.

mermaid-diagrams

7
from wpank/ai

Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system.

game-changing-features

7
from wpank/ai

Find 10x product opportunities and high-leverage improvements. Use when the user wants strategic product thinking, mentions 10x, wants to find high-impact features, or asks what would make a product dramatically more valuable.

clear-writing

7
from wpank/ai

Write clear, concise prose for humans — documentation, READMEs, API docs, commit messages, error messages, UI text, reports, and explanations. Combines Strunk's rules for clearer prose with technical documentation patterns, structure templates, and review checklists.

brainstorming

7
from wpank/ai

Explore ideas before implementation through collaborative dialogue. Use before any creative work — creating features, building components, adding functionality, or modifying behavior. Turns ideas into fully formed designs and specs through structured conversation.

Article Illustrator

7
from wpank/ai

When the user wants to add illustrations to an article or blog post. Triggers on: "illustrate article", "add images to article", "generate illustrations", "article images", or requests to visually enhance written content. Analyzes article structure, identifies positions for visual aids, and generates illustrations using a Type x Style two-dimension approach.

skill-judge

7
from wpank/ai

Evaluate Agent Skill quality against official specifications. Use when reviewing SKILL.md files, auditing skill packages, improving skill design, or checking if a skill follows best practices. Provides 8-dimension scoring (120 points) with actionable improvements. Triggers on review skill, evaluate skill, audit skill, improve skill, skill quality, SKILL.md review.