← ClaudeAtlas

design-apilisted

Design RESTful and GraphQL APIs following best practices. Use when designing APIs, creating endpoints, structuring responses, or planning API architecture.
kensaurus/cursor-kenji · ★ 4 · Web & Frontend · score 80
Install: claude install-skill kensaurus/cursor-kenji
# 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: