Agent skill · software engineering · aiskillstore

sqlmodel-crud

Use when creating SQLModel database models, CRUD operations, queries with joins, or relationships. NOT when non-database operations, plain SQL, or unrelated data handling. Triggers: "SQLModel", "database model", "CRUD", "create/read/update/delete", "query", "ForeignKey", "relationship".

Why this skill is useful

Provides specific patterns and examples for SQLModel CRUD operations and relationships that the AI wouldn't reliably generate on its own.

What it needs

About 8k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

SQLModel CRUD Skill Overview Expert guidance for SQLModel database models and CRUD operations, including Pydantic integration, async session management, query building with joins, and relationship configuration for ERP entities like Student, Fee, and Attendance. When This Skill Applies This skill triggers when users request: Models: "Student model", "SQLModel", "database model", "table=True" CRUD Operations: "Create student", "Read fees", "Update attendance", "Delete record" Query Building: "Query with join", "select statement", "where clause", "pagination" Relationships: "ForeignKey", "backpopulates", "relationship", "linked models" Validation: "Pydantic validators", "field constraints", "indexes" Core Rules 1. Models: table=True with Pydantic Validation Requirements: Use table=True for database tables Add index=True for frequently queried fields Use unique=True for email and other unique fields Add foreignkey for relationships Use Pydantic validators (minlength, maxlength, pattern, ge, gt) Use Relationship with backpopulates for bidirectional links Include createdat and updatedat timestamps 2. CRUD Operations: Async Session Management Requirements: Use AsyncSession for async database operations Use select(), where(), offset(), limit(), orderby() Return Optional[T] for single items, List[T] for lists Use scalaroneornone() for single results Use scalars().all() for list results Handle transactions with commit/rollback Update updatedat timestamp on modifications 3. Query Building: Joins, Filters, Pagination Requirements: Use selectinload() for eager loading relationships Use subquery for complex filtering Use and()/or() for compound conditions Use func.count(), func.sum() for aggregations Use case() for conditional aggregation Use ilike() for case-insensitive search Use orderby() for sorting Use offset()/limit() for pagination 4. …

How to use it

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

@skills aiskillstore/sqlmodel-crud

View the source on GitHub

Browse the @skills marketplace