plugins/advanced-alchemy/skills/advanced-alchemy-types/SKILL.md
Apply Advanced Alchemy custom SQLAlchemy types such as `DateTimeUTC`, encrypted fields, `GUID`, `JsonB`, password hashing, and stored file objects with backend-aware behavior and migration compatibility. Use when modeling non-trivial persistence concerns, securing sensitive columns, or choosing database-portable data types. Do not use for general model design that does not require custom column behavior.
npx skillsauth add alti3/litestar-skills advanced-alchemy-typesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
DateTimeUTC for timezone-aware timestamps that must normalize to UTC.EncryptedString or EncryptedText only after choosing the encryption backend and key source.GUID, JsonB, PasswordHash, and StoredObject where the database contract truly requires them.from advanced_alchemy.types import DateTimeUTC, EncryptedString, GUID, JsonB
class User(DefaultBase):
__tablename__ = "users"
id: Mapped[UUID] = mapped_column(GUID, primary_key=True)
created_at: Mapped[datetime] = mapped_column(DateTimeUTC)
secret: Mapped[str] = mapped_column(EncryptedString(key="secret-key"))
preferences: Mapped[dict] = mapped_column(JsonB)
advanced-alchemy-modeling to place these types on the right models.advanced-alchemy-caching when custom type configuration affects SQLAlchemy cacheability.advanced-alchemy-litestar if file-object or DTO behavior must line up with Litestar transport contracts.development
Build Litestar WebSocket endpoints with low-level websocket handlers, websocket listeners, websocket streams, dependency injection, custom websocket classes, transport-mode control, and graceful connection lifecycle handling. Use when implementing bidirectional real-time communication, reactive websocket message handling, or proactive server push over WebSockets. Do not use for server-side pub/sub fanout that is better expressed with channels alone.
tools
Test Litestar applications with TestClient, AsyncTestClient, create_test_client, websocket test helpers, dependency overrides, mocked dependencies, lifecycle-aware fixtures, and deterministic success and failure assertions. Use when adding or fixing Litestar test coverage, including exception contracts, override precedence, websocket behavior, event-bus side effects, or live-server-only response patterns. Do not use as a substitute for production observability or runtime debugging strategy.
development
Configure Litestar templating with `TemplateConfig`, Jinja/Mako/MiniJinja engines, file-or-string `Template` responses, request and CSRF-aware context, template callables, and custom engine integration. Use when implementing or fixing server-rendered HTML in Litestar. Do not use for static asset serving or pure JSON API endpoints.
development
Configure Litestar stores and the store registry for caching, server-side sessions, rate limiting, and other key-value state with explicit backend selection, bytes-safe data handling, TTL and renewal policy, namespacing, registry wiring, and lifecycle cleanup. Use when a Litestar app depends on `MemoryStore`, `FileStore`, `RedisStore`, `ValkeyStore`, or `StoreRegistry`. Do not use for relational persistence, domain repositories, or response-caching policy details that belong in database or caching-focused skills.