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
- Design REST resource models with correct HTTP method semantics
- Draft GraphQL schemas with types, queries, mutations and subscriptions
- Recommend versioning, pagination and error format standards
- Generate OpenAPI YAML or GraphQL SDL specs with example payloads
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 resourcesPUT: replace entire resource (idempotent)PATCH: partial resource updatesDELETE: 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
- Consistent Naming: use plural nouns for collections (
/users, not/user) - Stateless: each request contains all necessary information
- Use HTTP Status Codes Correctly: 2xx success, 4xx client errors, 5xx server errors
- Version Your API: plan for breaking changes from day one
- Pagination: always paginate large collections
- Rate Limiting: protect your API with rate limits
- Documentation: use OpenAPI/Swagger for interactive docs
GraphQL APIs
- Schema First: design schema before writing resolvers
- Avoid N+1: use DataLoaders for efficient data fetching
- Input Validation: validate at schema and resolver levels
- Error Handling: return structured errors in mutation payloads
- Pagination: use cursor-based pagination (Relay spec)
- Deprecation: use the
@deprecateddirective for gradual migration - 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
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.
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.
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
- .NET BackendBuild ASP.NET Core 8+ backends with EF Core: auth, background jobs, production API patterns
- Advanced Git WorkflowsUse for advanced Git surgery: interactive rebase, cherry-pick, bisect, reflog recovery, and history cleanup before merging. Not for parallel worktree workflows (use using-git-worktrees).
- Adversarial Code ReviewHunt for bugs in code the user shares by assuming defects exist and attacking the code through several distinct lenses, then report severity-ranked findings with evidence. Use for "review this", "what could go wrong", "bug hunt", or pre-merge scrutiny of a change. Read-only, it reports problems and does not rewrite the code. Not for style cleanup (use simplify-code) or for writing new code.
- AI Agent FrameworksUse when building multi-agent systems or agent orchestration -- LangChain/LangGraph, agent team design, task coordination, pipelines. Not for authoring a Zeplik skill (use skill-creator).
- Algolia SearchAdd Algolia search: indexing strategies, React InstantSearch, relevance tuning, search-as-you-type
- Android CI/CDAutomate Android CI/CD to Google Play: keystore, GitHub Secrets, multi-stage release workflow for RN, Flutter, native
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.