advanced-alchemy-services
Installation
SKILL.md
Services
Execution Workflow
- Start from the repository and wrap it with
SQLAlchemyAsyncRepositoryServiceorSQLAlchemySyncRepositoryService. - Define schema types for create, update, and read flows only where service boundaries need validation or conversion.
- Set
repository_type, loader options, andmatch_fieldsexplicitly. - Override
create(),update(), orto_model()only for real domain rules such as slug generation or multi-model coordination. - Convert outbound models with
to_schema()instead of leaking ORM instances to transport layers.
Implementation Rules
- Keep services responsible for business rules, not controller or router concerns.
- Accept dictionaries or schema objects, but normalize them consistently through the service.
- Use schema conversion intentionally: Pydantic, Msgspec, and attrs are all supported.
- Keep multi-repository workflows atomic and explicit about commit behavior.