alti3/litestar-skills/advanced-alchemy-fastapi
Claude Code and agent skill by alti3/litestar-skills
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Integrate Advanced Alchemy with FastAPI using the extension, request-scoped session dependencies, repository and service providers, typed response models, and router composition. Use when building FastAPI CRUD APIs backed by Advanced Alchemy or replacing handwritten SQLAlchemy session handling with its extension patterns. Do not use for non-FastAPI framework integrations.
Install
npx vskill@latest install alti3/litestar-skills/advanced-alchemy-fastapiSKILL.md
The same SKILL.md was published earlier as alti3/litestar-skills/advanced-alchemy-fastapi.
FastAPI
Execution Workflow
- Configure
SQLAlchemyAsyncConfigand attachAdvancedAlchemyto the FastAPI app. - Build request-scoped session dependencies with
Depends(alchemy.provide_session()). - Provide services through async generators and
Service.new(session=...)context managers. - Keep routers thin and return service-converted schema objects or paginated schema collections.
- Register routers only after the service and dependency layer is coherent.
Implementation Rules
- Use
AnnotatedplusDependsfor session and service injection to keep signatures explicit. - Set
commit_modeintentionally; do not rely on implicit transaction assumptions. - Keep
response_modelaligned with the schema returned byto_schema(). - Avoid passing ORM instances directly through FastAPI responses.
Example Pattern
Validation Checklist
- Confirm the session dependency is request-scoped and closes after each request.
- Confirm service providers yield the expected service type and release resources.
- Confirm response models match the schema conversion output.
- Confirm routers are mounted only once and startup or shutdown lifecycle is not duplicated.
Cross-Skill Handoffs
- Use
advanced-alchemy-routingfor CRUD endpoint shape. - Use
advanced-alchemy-servicesfor service-backed FastAPI handlers. - Use
advanced-alchemy-cliif the project needs Advanced Alchemy migration commands alongside the app.
Advanced Alchemy References
- https://advanced-alchemy.litestar.dev/latest/usage/frameworks/fastapi.html
- https://github.com/litestar-org/advanced-alchemy/blob/main/README.md
Security
- Security scanPassed, 100 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 repositoryCheckingplugins/advanced-alchemy/skills/advanced-alchemy-fastapi/SKILL.md
Popularity
- 7-day trend score
- 5
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/alti3/litestar-skills/advanced-alchemy-fastapi)