Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Freebies — Rest API Endpoint Scaffold

    1

    Scaffold standardized RESTful API endpoints with validation, error handling, and consistent response envelopes.

    Free

    Security scanned
    Freebies — Rest API Endpoint Scaffold

    Freebies — Rest API Endpoint Scaffold

    Example session with this skill installed

    Scaffold a RESTful API for a "Product" resource using Python and FastAPI with Pydantic validation.

    • Read your context and instructions
    • Compiled the freebies

    I have generated the FastAPI scaffold for the `Product` resource, including Pydantic schemas for request validation and standardized HTTP response envelopes. ## FastAPI Product Resource Scaffold ```python from fastapi import APIRouter, HTTPException, status from pydantic import BaseModel, Field from typing import Optional, List, Any router = APIRouter(prefix="/products", tags=["products"]) # Request/Response Schemas class ProductBase(BaseModel): name: str = Field(..., min_length=1, max_length=100) price: float = Field(..., gt=0) description: Optional[str] = None class ProductCreate(ProductBase): pass class StandardResponse(BaseModel): success: bool data: Any = None error: Optional[str] = None meta: Optional[dict] = None # Endpoints @router.post("/", status_code=status.HTTP_201_CREATED, response_model=StandardResponse) async def create_product(product: ProductCreate): # Logic for saving product would go here return { "success": True, "data": {"id": "prod_123", **product.dict()}, "error": None, "meta": {"timestamp": "2024-05-20T12:00:00Z"} } @router.get("/{product_id}", response_model=StandardResponse) async def get_product(product_id: str): # Mock lookup if product_id != "prod_123": raise HTTPException( status_code=status.HTTP_404_NOT_FOUND, detail={"success": False, "data": None, "error": "Product not found", "meta": None} ) return { "success": True, "data": {"id": product_id, "name": "Sample Product", "price": 29.99}, "error": None, "meta": None } ``` **Next steps** 1. Add the database persistence logic inside the router functions. 2. Mount the `router` to your main FastAPI app instance. 3. Run the development server and verify the `/products` docs via Swagger UI.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Hand-coding boilerplate REST routes is repetitive and error-prone. This skill automates the creation of production-ready API controllers and routes using industry-standard patterns. ## What it does - **Standardize Routing** generates clean CRUD endpoints following absolute REST principles for resource management. - **Request Validation** implements schema-based input checking using Zod for Node.js or Pydantic for Python. - **Consistent Envelopes** wraps all responses in a uniform `{ success, data, error, meta }` structure for frontend predictability. - **Status Code Mapping** assigns correct HTTP codes like 201 for creation and 422 for validation failures. ## How it works 1. **Define Resource** by providing the entity name and required properties. 2. **Select Stack** between Node.js/Express, Python/FastAPI, or Go/Gin. 3. **Execute Scaffold** to generate the controller logic and route definitions. 4. **Verify Output** against the included project-scoped architectural patterns. ## Frameworks & tools Supports Node.js (Express with Zod), Python (FastAPI with Pydantic), and Go (Gin). ## Why this beats prompting it yourself Generic prompts often forget edge-case status codes or inconsistent response shapes. This skill enforces a deterministic workflow that ensures every endpoint follows the same enterprise-grade envelope and validation logic without manual oversight. ## Use cases - Scaffold a new User management resource with full CRUD. - Generate a FastAPI endpoint with strict Pydantic validation. - Standardize existing messy Express routes into a clean resource pattern. - Build a Go/Gin microservice skeleton with uniform error handling. ## Known limitations Generates clean backend controller and route code without handling database persistence layers or external dependencies. Restricted to project workspace operations.

    Focuses on controller/route scaffolding. Does not implement database ORM logic or external service integrations. Restricted to Node.js, Python, and Go stacks.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    • Free with an Agensi account

    Requires

    File System Read/Write (strictly scoped to current project workspace `./`).
    Zero global installation or elevated privileges required.

    Permissions

    Read Files

    Target Use Cases: - Scaffold a REST API router with validation in Express. - Create standard RESTful endpoints for user resources in FastAPI. - Build CRUD routes following REST status code conventions.

    Listed3 days ago

    What's inside

    Frequently Asked Questions

    This skill eliminates manual boilerplate by generating standardized CRUD routes, schema-based request validation (Zod/Pydantic), and consistent response envelopes, ensuring your API remains predictable and production-ready.

    The skill currently supports Node.js (Express), Python (FastAPI), and Go (Gin), providing language-specific validation patterns like Pydantic or Zod for each stack.

    No, this skill focuses on the controller and routing layer; you will need to map the generated 'data' objects to your preferred ORM or database logic separately.

    Once added to your AI agent's workspace, you simply provide the resource name and properties; the skill then generates the controller logic and route definitions directly into your project files.

    Yes, every generated endpoint follows a uniform { success, data, error, meta } structure, which allows your frontend team to build consistent data-fetching hooks without handling different shapes for every route.

    New in APIs & Backend