Agent skill · software engineering · aiskillstore

sqlalchemy-2-0

Modern async ORM with type-safe models and efficient queries

Why this skill is useful

Provides domain-specific knowledge on async ORM patterns and type-safe model definitions that the AI wouldn't reliably generate on its own.

What it needs

Requires asyncpg, sqlalchemy installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

SQLAlchemy 2.0+ Skill Quick Start Basic Setup Basic CRUD Operations Common Patterns Models Annotated Type-Safe Models (Recommended) Classic Style Models Relationships One-to-Many Many-to-Many Queries Basic Select Relationship Loading Pagination Aggregations Sessions Management Context Manager Pattern Dependency Injection (FastAPI) Scoped Sessions Advanced Patterns Write-Only Relationships (Memory Efficient) Custom Session Classes Connection Routing Raw SQL Performance Tips 1. Use selectinload for collections: More efficient than lazy loading 2. Batch operations: Use addall() for bulk inserts 3. Connection pooling: Configure pool size based on load 4. Index columns: Add indexes for frequently queried columns 5. Use streaming: For large result sets, use stream() Requirements Database URLs PostgreSQL: postgresql+asyncpg://user:pass@localhost/db SQLite: sqlite+aiosqlite:///database.db MySQL: mysql+aiomysql://user:pass@localhost/db Migration Integration Use Alembic for database migrations:

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/sqlalchemy-2-0

View the source on GitHub

Browse the @skills marketplace