Litestar data services
Skill litestar-org/litestar-skills/skills/litestar-data-services
Opinionated first-party agent skills, plugins, subagents, slash commands, and MCP servers for the Litestar framework ecosystem — publishable to Claude Code, Gemini CLI, Codex CLI, Cursor, OpenCode, and VS Code/Copilot from a single repo.
npx -y skills add litestar-org/litestar-skills --skill litestar-data-servicesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 13 stars13 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Auto-activate for SQLAlchemyAsyncRepositoryService, SQLSpecAsyncService, create_filter_dependencies, LimitOffsetFilter, OffsetPagination, filters, or CRUD services. Not for raw drivers.
SKILL.md
2.2 KB, as published. Nobody here has run it
Litestar Data Services
Use this skill for repositories, service layers, CRUD boundaries, filters, and pagination.
Code Style Rules
- Match the existing persistence stack before choosing patterns.
- Keep handlers out of query construction and transaction management.
- Use filter dependency objects rather than ad hoc query params.
- Return typed pagination envelopes for collection endpoints.
Quick Reference
- Service patterns: services.md
- Pagination and filters: pagination.md
- Advanced Alchemy details: advanced-alchemy
- sqlspec details: sqlspec
Workflow
- Identify the project's data stack.
- Put persistence operations behind a service boundary.
- Add filters and pagination through the stack's native pattern.
- Return DTO-ready data to Controllers.
Guardrails
- Do not mix repository stacks in one feature.
- Do not place SQL or ORM session handling in route handlers.
- Do not hand-roll pagination query params.
- Do not return persistence internals when DTOs are required.
Validation Checkpoint
- Service methods own data access.
- Filters and pagination match the selected stack.
- Controller code stays thin.
- DTO conversion is explicit or handled by the service stack.
Example
class UserService(SQLAlchemyAsyncRepositoryService[User]):
repository_type = UserRepository
</example>
References Index
Official References
- https://docs.litestar.dev/ - Litestar documentation
- https://docs.litestar.dev/latest/reference/ - Litestar API reference