fastapi-guideline
Installation
SKILL.md
FastAPI Skill
Production-ready FastAPI with async-first patterns, Granian as the server, and native SSE streaming.
Base patterns sourced from:
npx skills add https://github.com/wshobson/agents --skill fastapi-templatesExtended with Granian server, native SSE (FastAPI 0.135.0+), and additional async conventions.
Core rules — apply always
- Every function must be
async def. No sync route handlers, no sync service methods, no sync repository methods. If you call a blocking library, wrap it withasyncio.to_thread(). - Granian is the server. Never use
uvicornorfastapi dev. Seereferences/granian.md. - SSE streaming uses the native
EventSourceResponsefromfastapi.sse(added in FastAPI 0.135.0). Never use third-partysse-starlette. Seereferences/sse.md. - Always use
uvfor dependency management. Never pip, poetry, or pipenv. - No ORM. Database access uses psycopg directly via
AsyncConnectionPool. Follow thepostgres-best-practicesskill for all DB patterns (queries in.sqlfiles,pg_*helpers,PostgresTableModel, named parameters).
Project structure
Related skills
More from bmsuisse/skills
autoresearch
>
15codeunit-analyzer
>
14deslop
>
14coding-guidelines-python
>
13init-app-stack
Use this skill whenever the user wants to bootstrap, scaffold, or initialize a new full-stack app with a Vite + React + TanStack + shadcn/ui frontend and a FastAPI + Postgres backend. Triggers on requests like "create a new app", "set up a project", "scaffold a full-stack app", "init a new project", or anything involving starting a fresh React/FastAPI application from scratch.
12databricks-sql-autotuner
>
12