plugins/advanced-alchemy/skills/advanced-alchemy-flask/SKILL.md
Integrate Advanced Alchemy with Flask using sync or async configs, Flask session access helpers, multiple binds, FlaskServiceMixin, JSON serialization helpers, and Flask CLI database commands. Use when adding Advanced Alchemy persistence to Flask applications or refactoring Flask SQLAlchemy code toward repository and service patterns. Do not use for framework-agnostic repository or model work.
npx skillsauth add alti3/litestar-skills advanced-alchemy-flaskInstall 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.
SQLAlchemySyncConfig by default, or SQLAlchemyAsyncConfig only when Flask async routes are intentional and supported.AdvancedAlchemy with the app and use its session helpers rather than global engine state.bind_key only when the application truly needs multiple databases.FlaskServiceMixin when its jsonify() helper meaningfully simplifies responses.flask database commands once migrations are wired through the extension.commit_mode explicit: manual, autocommit, or autocommit_include_redirect.from advanced_alchemy.extensions.flask import AdvancedAlchemy, SQLAlchemySyncConfig
from flask import Flask
app = Flask(__name__)
alchemy = AdvancedAlchemy(
SQLAlchemySyncConfig(connection_string="sqlite:///local.db", commit_mode="autocommit"),
app,
)
flask database --help exposes migration commands when expected.FlaskServiceMixin.jsonify() returns the intended serialization format.advanced-alchemy-repositories and advanced-alchemy-services for the persistence layer itself.advanced-alchemy-cli for migration command semantics behind Flask CLI wrappers.advanced-alchemy-database-seeding for fixture loading during app initialization or admin workflows.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.