design-api

Solid

Design RESTful and GraphQL APIs following current best practices for naming, versioning, error shapes, and auth patterns. Use when the user says "design an API", "create endpoints", "structure my API responses", "plan API architecture", "REST vs GraphQL", or "API contract". Covers OpenAPI spec, pagination, rate limiting, and backwards-compatible evolution. Pairs with backend-patterns, audit-security.

API & Backend 6 stars 0 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
28
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# API Design Skill Design clean, consistent, and developer-friendly APIs. ## MANDATORY: Pre-Design Checks **BEFORE designing any API, you MUST:** ### 1. Check Existing API Documentation ``` http://localhost:8080/api-docs (if backend running) http://localhost:8080/naming-conventions (naming standards) src/api/_api-README.md (frontend API layer docs) ``` ### 2. Verify Database Schema Use Supabase MCP to understand existing data structure: ```sql -- Check table schema SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE table_name = 'your_table'; -- Check enum values SELECT enum_range(NULL::your_enum_name); -- Check foreign keys SELECT tc.constraint_name, kcu.column_name, ccu.table_name AS foreign_table FROM information_schema.table_constraints tc JOIN information_schema.key_column_usage kcu ON tc.constraint_name = kcu.constraint_name JOIN information_schema.constraint_column_usage ccu ON tc.constraint_name = ccu.constraint_name WHERE tc.table_name = 'your_table' AND tc.constraint_type = 'FOREIGN KEY'; ``` ### 3. Check for Existing Endpoints Use `Grep` to search for similar endpoints already implemented: ``` Grep: "router.get|router.post" to find existing route patterns Grep: "useQuery|useMutation" to find existing frontend integrations ``` ### 4. Verification Statement (REQUIRED) Before designing, state: ``` "Pre-design check: - Existing API docs reviewed: [YES/NO] - Database schema verified: [tables/enums checked] - Similar endpoints found:...

Details

Author
kensaurus
Repository
kensaurus/cursor-kenji
Created
5 months ago
Last Updated
3 days ago
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category