fastapi-templates

Generates FastAPI project structures with async patterns and CRUD service layers.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Theopsguide/claude-agents --skill fastapi-templates
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fastapi-templates
Source: https://github.com/Theopsguide/claude-agents/tree/main/plugins/api-scaffolding/skills/fastapi-templates
Command: npx skills add https://github.com/Theopsguide/claude-agents --skill fastapi-templates

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fastapi, uvicorn, pydantic, sqlalchemy, asyncpg, python-jose, passlib, httpx, and includes assets (resource) and references (resource) components.

What problem does it solve?

This Skill provides production-ready FastAPI project structures, solving the challenge of setting up new API projects with best practices from scratch. It ensures your applications are built with async patterns, proper dependency injection, and comprehensive error handling, saving development time and reducing boilerplate.

Core Features & Use Cases

  • Structured Project Layout: Get a clear, scalable directory structure for your FastAPI applications.
  • Dependency Injection: Leverage FastAPI's powerful DI for database sessions, authentication, and services.
  • Async Patterns: Implement high-performance I/O-bound operations with async/await for databases and external APIs.
  • CRUD Repository & Service Layers: Separate data access from business logic for maintainable code.
  • Use Case: Quickly scaffold a new REST API for a mobile application, complete with user authentication, database integration, and a clean, testable codebase.

Quick Start

Example: main.py for FastAPI App

from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from contextlib import asynccontextmanager

@asynccontextmanager async def lifespan(app: FastAPI): await database.connect() yield await database.disconnect()

app = FastAPI(title="API Template", lifespan=lifespan) app.add_middleware( CORSMiddleware, allow_origins=[""], allow_credentials=True, allow_methods=[""], allow_headers=["*"], ) from app.api.v1.router import api_router app.include_router(api_router, prefix="/api/v1")