alti3/litestar-skills/advanced-alchemy-modeling
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.
Design Advanced Alchemy SQLAlchemy models using its base classes, mixins, unique-record helpers, relationship patterns, and declarative base customization. Use when building or refactoring database models, choosing UUID or bigint key strategies, adding slugs or audit columns, or simplifying deduplicated many-to-many workflows. Do not use for repository or HTTP endpoint logic.
Install
npx vskill@latest install alti3/litestar-skills/advanced-alchemy-modelingSKILL.md
The same SKILL.md was published earlier as alti3/litestar-skills/advanced-alchemy-modeling.
Modeling
Execution Workflow
- Choose a base class around key shape and audit needs:
BigIntBase,BigIntAuditBase,UUIDBase,UUIDv7Base, or related variants. - Add mixins intentionally:
SlugKeyfor URL slugs, audit columns when timestamps are required, andUniqueMixinwhen get-or-create semantics matter. - Model relationships with explicit loading strategy such as
selectinorjoinedinstead of relying on defaults. - Use
UniqueMixinto collapse duplicate creation logic for tags, lookup tables, and many-to-many helper models. - Customize the declarative base only when the built-in bases do not fit an existing schema or database-specific requirement.
Implementation Rules
- Pick one primary-key strategy per bounded context and keep it consistent.
- Let mixins own their concern; do not duplicate slug or audit columns by hand.
- Implement both
unique_hash()andunique_filter()wheneverUniqueMixinis used. - Keep model classes transport-agnostic and leave request or response shaping to services or framework layers.
Example Pattern
Validation Checklist
- Confirm the base class matches the database key and migration strategy.
- Confirm relationship loading avoids obvious N+1 behavior in hot paths.
- Confirm
UniqueMixincriteria match actual uniqueness guarantees. - Confirm timestamps, slugs, and indexes align with the expected query patterns.
Cross-Skill Handoffs
- Use
advanced-alchemy-typesfor custom column types on model fields. - Use
advanced-alchemy-repositoriesfor CRUD and filtering over these models. - Use
advanced-alchemy-serviceswhen the model requires schema conversion or business rules.
Advanced Alchemy References
- https://advanced-alchemy.litestar.dev/latest/usage/modeling.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-modeling/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-modeling)