phantanphatdgteam-gif/snagon-dev-mods/fastapi-patterns
Claude Code and agent skill by phantanphatdgteam-gif/snagon-dev-mods
- community
Checking that the SKILL.md file is still in the repository.
FastAPI best practices covering project structure, Pydantic v2 schemas, dependency injection, async handlers, authentication, authorization, transactional service layers, and testing with httpx and pytest. Use when building or reviewing FastAPI apps — Pydantic schemas, dependencies, async handlers, auth, or tests.
Install
npx vskill@latest install phantanphatdgteam-gif/snagon-dev-mods/fastapi-patternsSKILL.md
The same SKILL.md was published earlier as phantanphatdgteam-gif/snagon-dev-mods/fastapi-patterns.
FastAPI Patterns
Modern, production-grade FastAPI development: project layout, Pydantic v2 schemas, dependency injection, async patterns, auth, transactional service methods, and testing.
Project Structure
App Factory and Lifespan
Configuration with pydantic-settings
Pydantic Schemas (v2)
Dependency Injection
Router and Endpoint Design
Service Layer
Note on Database Design: Application-level unique handling requires an underlying unique database index (e.g.,unique=Trueon your SQLAlchemy mapping attributes). Without underlying constraints, application layer error-catching cannot safely prevent concurrent race conditions.
Testing with httpx and pytest
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/fastapi-patterns/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/phantanphatdgteam-gif/snagon-dev-mods/fastapi-patterns)