OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add wispbit-ai/skills --skill sqlalchemy-alembic-expert-best-practices-code-review
SQLAlchemy ORM and Alembic migration best practices for building safe, performant database schemas. This skill should be used when writing, reviewing, or refactoring SQLAlchemy models, Alembic migrations, or database query patterns. Triggers on tasks involving SQLAlchemy ORM, Alembic migrations, database schema changes, or query optimization.
npx skills add wispbit-ai/skills --skill sqlalchemy-alembic-expert-best-practices-code-review
Simple, pragmatic, opinionated. Only what matters for writing production-grade SQLAlchemy and Alembic code.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Index Management | CRITICAL-HIGH | only-concurrent-indexes, verify-query-patterns-are-indexed |
| 2 | Constraint Safety | HIGH | unique-constraint, split-foreign-key, change-column-type |
| 3 | Optimization | MEDIUM | split-check-constraint, limit-non-unique-index |
| 4 | Index Efficiency | LOW | ensure-index-not-covered |
only-concurrent-indexes - Always use postgresql_concurrently=True with autocommit blocks for index operationsverify-query-patterns-are-indexed - Ensure SQLAlchemy queries have appropriate indexes definedunique-constraint - Split unique constraint creation into concurrent index + constraint stepssplit-foreign-key - Add foreign keys with NOT VALID first, then validate separatelychange-column-type - Use multi-step approach for column type changes to avoid table lockssplit-check-constraint - Add check constraints with NOT VALID first, then validate separatelylimit-non-unique-index - Limit non-unique indexes to maximum three columns for efficiencyensure-index-not-covered - Prevent redundant indexes that are already covered by composite indexesRead individual rule files for detailed explanations and code examples:
Each rule file contains: