.agents/skills/fastapi-templates/SKILL.md
Production-ready FastAPI project templates and patterns. Use when starting new FastAPI projects, services, or adding standard components like auth, DB connection, or middleware.
npx skillsauth add jidohyun/NOD fastapi-templatesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides production-ready templates and scaffolding patterns for FastAPI applications.
Recommended structure for scalable FastAPI apps:
src/
├── api/
│ ├── v1/
│ │ ├── endpoints/ # Route handlers
│ │ └── api.py # Router aggregation
│ └── deps.py # Dependencies (get_current_user, etc.)
├── core/
│ ├── config.py # Pydantic BaseSettings
│ └── security.py # JWT & Password hashing
├── db/
│ ├── models/ # SQLAlchemy models
│ ├── session.py # DB engine and session factory
│ └── base.py # Import all models here
├── schemas/ # Pydantic models (Request/Response)
├── services/ # Business logic
└── main.py # App entrypoint
from fastapi import APIRouter, Depends, HTTPException
from sqlalchemy.ext.asyncio import AsyncSession
from src.api import deps
from src.schemas.item import ItemCreate, Item
from src.services import item_service
router = APIRouter()
@router.post("/", response_model=Item)
async def create_item(
item_in: ItemCreate,
db: AsyncSession = Depends(deps.get_db),
current_user = Depends(deps.get_current_user),
) -> Item:
"""
Create a new item.
"""
return await item_service.create(db, obj_in=item_in, owner_id=current_user.id)
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
PROJECT_NAME: str = "FastAPI App"
DATABASE_URL: str
SECRET_KEY: str
class Config:
case_sensitive = True
env_file = ".env"
settings = Settings()
from sqlalchemy import Column, Integer, String
from src.db.base_class import Base
class Item(Base):
id = Column(Integer, primary_key=True, index=True)
title = Column(String, index=True)
description = Column(String, nullable=True)
development
Develop custom native UI libraries based on Flutter widgets for WebF. Create reusable component libraries that wrap Flutter widgets as web-accessible custom elements.
development
Advanced design intelligence for professional UI/UX. Use for implementing modern design patterns (Glassmorphism, Bento Grid), ensuring accessibility, and generating tailored design systems for web and mobile.
development
Manages Terraform state operations such as importing, moving, and removing resources. Use this skill when the user needs to refactor Terraform state, import existing infrastructure, fixing state drift, or migrate backends without destroying resources.
development
Expert guidance for creating, managing, and using Terraform modules. Use this skill when the user wants to create reusable infrastructure components, standardize Terraform patterns, or needs help with module structure and best practices for AWS, GCP, or Azure.