Agent skill · data analytics · aiskillstore
database-fundamentals
Auto-invoke when reviewing schema design, database queries, ORM usage, or migrations. Enforces normalization, indexing awareness, query optimization, and migration safety.
Why this skill is useful
Provides domain-specific knowledge on database design principles, query optimization techniques, and migration safety that the AI wouldn't reliably generate on its own.
What it needs
About 4k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Database Fundamentals Review "Your database is the foundation. Build it wrong, and everything above it will crack." When to Apply Activate this skill when reviewing: Schema design and migrations SQL/NoSQL queries ORM model definitions Data relationships Index creation Query performance --- Review Checklist Schema Design [ ] Normalization: Is data normalized appropriately (no excessive duplication)? [ ] Denormalization justified: If denormalized, is there a performance reason? [ ] Primary keys: Does every table have a clear primary key? [ ] Foreign keys: Are relationships enforced at the database level? [ ] Data types: Are appropriate types used (not everything TEXT)? Indexes [ ] Query-based: Are indexes created for frequently queried columns? [ ] Composite indexes: Are multi-column queries covered? [ ] Not over-indexed: Are there unnecessary indexes slowing writes? [ ] Unique constraints: Are unique fields enforced at DB level? Queries [ ] No N+1: Are related records fetched in bulk? [ ] Select specific fields: Are we avoiding SELECT ? [ ] Pagination: Do list queries limit results? [ ] Parameterized: Are all queries parameterized (no string concatenation)? Migrations [ ] Reversible: Can this migration be rolled back? [ ] No data loss: Will existing data survive the migration? [ ] Tested: Has this been tested against production-like data? [ ] Incremental: Are large changes broken into smaller migrations? --- Common Mistakes (Anti-Patterns) 1. The N+1 Query Problem 2. Missing Indexes 3. SELECT Everywhere 4. String Concatenation (SQL Injection) 5. Destructive Migrations --- Socratic Questions Ask the junior these questions instead of giving answers: 1. Schema: "Why did you choose this data type?" 2. Relationships: "What happens if this related record is deleted?" 3. Indexes: "Which columns are queried together? Are they indexed?" 4. N+1: "How many queries does this operation execute?" 5. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/database-fundamentals