API Design Principles

Software development skill, available on Zeplik

API Design Principles is a ready-to-run software development skill on Zeplik. Not for overall system architecture (use architecture). Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer.

The API Design Principles skill loads automatically when your request matches it, or you can invoke it directly by typing /api-design-principles in any chat. It works with attachments, connectors, and any model that supports the task, so you get the same expert method every time without setting anything up.

What the API Design Principles skill can do

Try these prompts on Zeplik

Pick a prompt to open it in the Zeplik app. If you are not signed in yet, your prompt is waiting for you the moment you do.

How the API Design Principles skill works

/api-design-principles

Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers and stand the test of time. Deliver API specs, schemas, and example requests/responses as chat artifacts; ask the user to paste their existing spec or endpoint list when reviewing.

When to Use This Skill

  • Designing new REST or GraphQL APIs
  • Refactoring existing APIs for better usability
  • Establishing API design standards for your team
  • Reviewing API specifications before implementation
  • Migrating between API paradigms (REST to GraphQL, etc.)
  • Creating developer-friendly API documentation
  • Optimizing APIs for specific use cases (mobile, third-party integrations)

Core Concepts

1. RESTful Design Principles

Resource-Oriented Architecture

  • Resources are nouns (users, orders, products), not verbs
  • Use HTTP methods for actions (GET, POST, PUT, PATCH, DELETE)
  • URLs represent resource hierarchies
  • Consistent naming conventions

HTTP Methods Semantics:

  • GET: retrieve resources (idempotent, safe)
  • POST: create new resources
  • PUT: replace entire resource (idempotent)
  • PATCH: partial resource updates
  • DELETE: remove resources (idempotent)

2. GraphQL Design Principles

Schema-First Development

  • Types define your domain model
  • Queries for reading data
  • Mutations for modifying data
  • Subscriptions for real-time updates

Query Structure:

  • Clients request exactly what they need
  • Single endpoint, multiple operations
  • Strongly typed schema
  • Introspection built-in

3. API Versioning Strategies

URL Versioning:

/api/v1/users
/api/v2/users

Header Versioning:

Accept: application/vnd.api+json; version=1

Query Parameter Versioning:

/api/users?version=1

Best Practices

REST APIs

  1. Consistent Naming: use plural nouns for collections (/users, not /user)
  2. Stateless: each request contains all necessary information
  3. Use HTTP Status Codes Correctly: 2xx success, 4xx client errors, 5xx server errors
  4. Version Your API: plan for breaking changes from day one
  5. Pagination: always paginate large collections
  6. Rate Limiting: protect your API with rate limits
  7. Documentation: use OpenAPI/Swagger for interactive docs

GraphQL APIs

  1. Schema First: design schema before writing resolvers
  2. Avoid N+1: use DataLoaders for efficient data fetching
  3. Input Validation: validate at schema and resolver levels
  4. Error Handling: return structured errors in mutation payloads
  5. Pagination: use cursor-based pagination (Relay spec)
  6. Deprecation: use the @deprecated directive for gradual migration
  7. Monitoring: track query complexity and execution time

Common Pitfalls

  • Over-fetching/Under-fetching (REST): fixed in GraphQL but requires DataLoaders
  • Breaking Changes: version APIs or use deprecation strategies
  • Inconsistent Error Formats: standardize error responses
  • Missing Rate Limits: APIs without limits are vulnerable to abuse
  • Poor Documentation: undocumented APIs frustrate developers
  • Ignoring HTTP Semantics: POST for idempotent operations breaks expectations
  • Tight Coupling: API structure shouldn't mirror database schema

Deliverables

When designing an API in chat, produce as artifacts:

  • The resource model or GraphQL type definitions
  • Endpoint table (method, path, purpose, status codes) or query/mutation list
  • Example request/response payloads including the standardized error format
  • An OpenAPI (YAML) or GraphQL SDL spec when the user wants a formal contract

Usage

/api-design-principles $ARGUMENTS

How to use the API Design Principles skill

  1. Sign in to Zeplik

    Create a free Zeplik account or sign in. New accounts start with free credits, so you can try the API Design Principles skill right away.

  2. Describe your software development task

    Ask in plain language, or type /api-design-principles to invoke the skill directly. Zeplik recognizes the API Design Principles skill and applies its method.

  3. Review and refine the result

    Zeplik returns a clear, structured answer. Ask follow-ups in the same chat to refine it or take the next step.

Source and credit

Author
wshobson
License
MIT

Adapted from the open-source wshobson/agents project and tuned to run natively on Zeplik. View source on GitHub.

Frequently asked questions

What is the API Design Principles skill?
API Design Principles is a ready-to-run software development skill on Zeplik. Not for overall system architecture (use architecture). Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer.
How do I use API Design Principles on Zeplik?
Sign in to Zeplik and ask in plain language, or type /api-design-principles in any chat to invoke it directly. The skill applies its method and returns a result you can refine in the same conversation.
Which AI model does the API Design Principles skill use?
Any model you choose. Zeplik works across every model in one chat, so the API Design Principles skill runs on your preferred model for the task.
Where does the API Design Principles skill come from?
The API Design Principles skill is adapted from the open-source wshobson/agents project (MIT) and tuned to run natively on Zeplik. The original source is linked on this page.
How much does the API Design Principles skill cost?
Using the skill is free to start. You only spend Zeplik credits when the assistant runs, and new accounts begin with free credits.

Related software development skills

More on Zeplik

Try API Design Principles on Zeplik

Every model, one chat. Bring the API Design Principles skill into your next conversation and let the assistant do the work.

Browse all skills
API Design Principles - Software development skill for Zeplik AI | Zeplik Chat