FastAPI Project Templates
Scaffolds production FastAPI projects with async patterns, DI, and pytest setup.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/fastapi-templates-wshobson/— the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Gives Claude a production-ready FastAPI project blueprint: a layered app structure (api/core/models/schemas/services/repositories), FastAPI dependency injection with Depends for DB sessions and auth, and idiomatic async route, database, and middleware patterns. Includes a working async test harness using pytest, httpx AsyncClient, and an in-memory SQLite session with dependency overrides. Reach for it when starting a new FastAPI service or microservice and you want correct structure and testing wired in from the start.
What this skill does
What it does: Provides reference patterns and templates for standing up a production-ready FastAPI backend with async support, clean layering, and tests.
- Recommends a layered project layout separating API routes (versioned endpoints + router), core config/security/database, models, Pydantic schemas, services, and repositories
- Covers FastAPI's built-in dependency injection via
Dependsfor database session management, authentication/authorization, shared logic, and config injection - Shows idiomatic async patterns for route handlers, database operations, background tasks, and middleware
- Includes a complete async test setup: pytest fixtures, httpx
AsyncClient, an in-memory SQLite (aiosqlite) session, andapp.dependency_overridesto swap the DB dependency - Points to a
references/details.mdfile with deeper implementation patterns and worked examples beyond the navigation summary
Related skills
Generative Code Art
anthropics
Create algorithmic art with p5.js using randomness and interactive parameters.
Poster & Visual Design
anthropics
Create original posters and visual art in PNG and PDF formats.
Claude API Helper
anthropics
Build, debug, and optimize Claude API applications with caching and model migration support.
MCP Server Builder
anthropics
Build protocol servers that connect language models to external APIs and services.