From aj-geddes-useful-ai-prompts-4
Builds high-performance FastAPI apps with async routes, Pydantic validation, dependency injection, JWT security, SQLAlchemy integration, and auto OpenAPI docs. For modern async Python APIs.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4This skill uses the workspace's default tool permissions.
- [Overview](#overview)
references/api-routes-with-async-endpoints.mdreferences/async-database-models-and-queries.mdreferences/fastapi-application-setup.mdreferences/pydantic-models-for-validation.mdreferences/security-and-jwt-authentication.mdreferences/service-layer-for-business-logic.mdscripts/validate-api.shtemplates/api-scaffold.yamlSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Create fast, modern Python APIs using FastAPI with async/await support, automatic API documentation, type validation using Pydantic, dependency injection, JWT authentication, and SQLAlchemy ORM integration.
Minimal working example:
# main.py
from fastapi import FastAPI, HTTPException, status
from fastapi.middleware.cors import CORSMiddleware
from contextlib import asynccontextmanager
import logging
# Setup logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
# Create FastAPI instance
app = FastAPI(
title="API Service",
description="A modern FastAPI application",
version="1.0.0",
docs_url="/api/docs",
openapi_url="/api/openapi.json"
)
# Add CORS middleware
app.add_middleware(
CORSMiddleware,
allow_origins=["http://localhost:3000"],
allow_credentials=True,
allow_methods=["*"],
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| FastAPI Application Setup | FastAPI Application Setup |
| Pydantic Models for Validation | Pydantic Models for Validation |
| Async Database Models and Queries | Async Database Models and Queries |
| Security and JWT Authentication | Security and JWT Authentication |
| Service Layer for Business Logic | Service Layer for Business Logic |
| API Routes with Async Endpoints | API Routes with Async Endpoints |