Sqlalchemy Postgres
Expert SQLAlchemy 2.0, Pydantic v2, and PostgreSQL guidance for async database layers, models, and migrations.
- CCM score
- 44 of 100
- skills.sh installs
- 517
- GitHub stars
- 17
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers database layer setup, model definition, Alembic migrations, and async query patterns for PostgreSQL only
- Includes reference docs on production patterns, repository and Unit of Work, and async session management with FastAPI
- Enforces separate
models/(ORM) andschemas/(Pydantic) layers,Mapped[]type annotations, andfrom_attributes=Trueon read schemas - Designed for FastAPI projects that use the asyncpg driver and need a repository pattern with session injection
Install
$ npx -y skills add cfircoo/claude-code-toolkit --skill sqlalchemy-postgres -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
<essential_principles>
SQLAlchemy 2.0 + Pydantic + PostgreSQL Best Practices
This skill provides expert guidance for building production-ready database layers.
Stack
- SQLAlchemy 2.0 with async support (asyncpg driver)
- Pydantic v2 for validation and serialization
- Alembic for migrations
- PostgreSQL only
Core Principles
1. Separation of Concerns
models/ # SQLAlchemy ORM models (database layer)
schemas/ # Pydantic schemas (API layer)
repositories/ # Data access patterns
services/ # Business logic
2. Type Safety First
Always use SQLAlchemy 2.0 style with Mapped[] type annotations:
from sqlalchemy.orm import Mapped, mapped_column
class User(Base):
__tablename__ = "users"
id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str] = mapped_column(String(100))
3. Async by Default Use async engine and sessions for FastAPI:
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
engine = create_async_engine("postgresql+asyncpg://...")
Details
- Repository
- github.com/cfircoo/claude-code-toolkit
- Categories
- Databases, Python, Backend & APIs
- First seen
- Jun 3, 2026
Questions
What does the sqlalchemy-postgres skill help with?
The sqlalchemy-postgres skill gives expert guidance for building database layers with SQLAlchemy 2.0, Pydantic v2 and PostgreSQL. It covers setting up the database layer, defining models, creating Alembic migrations, and async query patterns. It is activated automatically when database-related work comes up.
How do I install the sqlalchemy-postgres skill?
Run this command in a project: npx -y skills add cfircoo/claude-code-toolkit --skill sqlalchemy-postgres -y. After that, the agent can follow the skill's SQLAlchemy and PostgreSQL practices when you work on models, migrations or queries.
Who is the sqlalchemy-postgres skill for?
It is for developers building Python applications that use SQLAlchemy with PostgreSQL, especially async FastAPI services. It assumes the stack of SQLAlchemy 2.0 with asyncpg, Pydantic v2 and Alembic. The skill sets out a separate layout for models, schemas, repositories and services.
What does the sqlalchemy-postgres skill need to run?
The skill's own files list no separate tools, accounts or API keys. It expects a Python project using SQLAlchemy 2.0, Pydantic v2, Alembic and the asyncpg driver against a PostgreSQL database. The connection string format it shows is postgresql+asyncpg with user, password, host and database name.
Where does the sqlalchemy-postgres skill stand in the Databases category?
On Claude Marketplaces it sits in the Databases category, next to supabase-postgres-best-practices and several Prisma skills such as prisma-client-api and prisma-postgres. Its focus is the Python stack of SQLAlchemy, Pydantic and PostgreSQL rather than JavaScript or hosted database platforms.
Similar to Sqlalchemy Postgres
More Databasessqlalchemy-orm-expertmanutej/luxor-claude-marketplace473 installsReusable SQLAlchemy 2.0 ORM guide for building customer support data models with async and PostgreSQL support.
sqlalchemy-ormbobmatnyc/claude-mpm-skills873 installsPython SQL toolkit and ORM skill covering query building, relationship mapping, and Alembic migrations.
fastapi-pythonmindrally/skills14.2K installsExpert FastAPI guidance for async Python APIs with modular structure and explicit error-handling conventions.
postgres-drizzleccheney/robust-skills1.6K installsStructured guidance for PostgreSQL schemas, queries, migrations, and Drizzle ORM work, scoped to the installed API version.
python-backendyonatangross/orchestkit245 installsProduction async Python patterns for FastAPI, SQLAlchemy 2.0, asyncio, and connection pooling with runtime guardrails.
drizzle-ormmindrally/skills1.1K installsLightweight type-safe TypeScript ORM guidelines covering schemas, connections, queries, migrations, and performance.