Agent skill · software engineering · aiskillstore

api-route-design

Use when designing RESTful API endpoints in FastAPI or Python projects. Triggers for: creating GET/POST/PUT/DELETE endpoints, request validation with Pydantic, response formatting with JSON schemas, status code selection, pagination, filtering, or sorting parameters. NOT for: GraphQL APIs, WebSocket handlers, or non-RESTful endpoints.

Why this skill is useful

Provides specific patterns and examples for designing RESTful APIs with FastAPI that the AI wouldn't reliably generate on its own.

What it needs

About 4k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

API Route Design Skill Expert design and implementation of RESTful APIs with proper validation, response formatting, and HTTP semantics. Quick Reference Pattern Example Purpose --------- --------- --------- List resource @router.get("/fees/", responsemodel=List[FeeOut]) Retrieve collection Get by ID @router.get("/fees/{feeid}") Retrieve single resource Create @router.post("/fees/", responsemodel=FeeOut, statuscode=201) Create new resource Update @router.put("/fees/{feeid}") Full resource update Patch @router.patch("/fees/{feeid}") Partial resource update Delete @router.delete("/fees/{feeid}", statuscode=204) Remove resource URL Naming Conventions Rules: Use lowercase, hyphens for multi-word: /student-fees not /studentFees Use plural nouns for collections: /users not /user Use HTTP methods semantically: GET (read), POST (create), PUT/PATCH (update), DELETE (remove) HTTP Status Codes Code Usage Example ------ ------- --------- 200 OK Successful GET, PUT, PATCH 201 Created Successful POST (resource created) 202 Accepted Async operation started 204 No Content Successful DELETE 400 Bad Request Invalid input, validation failed 401 Unauthorized Missing or invalid auth 403 Forbidden Authenticated but not authorized 404 Not Found Resource doesn't exist 422 Unprocessable Entity Validation errors (Pydantic) 500 Internal Server Error Unexpected server error Request Validation Patterns Path Parameters Query Parameters (Pagination, Filtering, Sorting) Request Body (Pydantic Models) Response Models Standard Response Envelope Error Response Complete Endpoint Example Integration with Other Skills Skill Integration Point ------- ------------------- @fastapi-app Router registration in main.py @sqlmodel-crud Database operations in endpoints @jwt-auth Depends(getcurrentuser) for protected routes @api-client Consumer of this API design Quality Checklist [ ] Pagination standard: Use skip/limit with hasmore indicator [ ] Filtering: Query params for common filter fields [ ] Sorting: sortby …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/api-route-design

View the source on GitHub

Browse the @skills marketplace