Skip to content
alinaqi avatar

Database Schema

Schema-first guardrail that makes Claude read and verify database schemas before writing queries.

CCM score
52 of 100
skills.sh installs
275
GitHub stars
712
last updated
Jun 3, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers schema reading, column and type verification, and type generation across Drizzle, Prisma, Supabase, SQLAlchemy, TypeORM, and raw SQL
  • Includes a pre-code checklist, a _project_specs/schema-reference.md template, and per-stack type generation examples
  • Enforces creating the schema file first when none exists, and TDD steps that catch column mismatches with tsc --noEmit or mypy
  • Designed for projects where schema drift causes wrong column names, missing fields, or incorrect types mid-session

Install

$ npx -y skills add alinaqi/maggy --skill database-schema -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Database Schema Awareness Skill

Problem: Claude forgets schema details mid-session - wrong column names, missing fields, incorrect types. TDD catches this at runtime, but we can prevent it earlier.


Core Rule: Read Schema Before Writing Database Code

MANDATORY: Before writing ANY code that touches the database:

┌─────────────────────────────────────────────────────────────┐
│  1. READ the schema file (see locations below)              │
│  2. VERIFY columns/types you're about to use exist          │
│  3. REFERENCE schema in your response when writing queries  │
│  4. TYPE-CHECK using generated types (Drizzle/Prisma/etc)   │
└─────────────────────────────────────────────────────────────┘

If schema file doesn't exist → CREATE IT before proceeding.


Schema File Locations (By Stack)

Details

Repository
github.com/alinaqi/maggy
Categories
Databases, Code Review & Quality
First seen
Jun 3, 2026

Questions

What does the database-schema skill do?

The database-schema skill makes Claude read the schema file before writing any database code, so it uses correct column names, types and relationships. It covers stacks such as Drizzle, Prisma, Supabase, SQLAlchemy, TypeORM and raw SQL. It also suggests keeping a schema reference file for quick lookup.

How do I install the database-schema skill?

Run npx -y skills add alinaqi/maggy --skill database-schema -y inside your project. Once installed, Claude checks the schema before it writes queries or changes data models.

Which skills lead the Databases category next to database-schema?

The other top skills in the Databases category are supabase-postgres-best-practices, prisma-client-api, prisma-database-setup, prisma-cli and prisma-postgres. Database-schema differs by focusing on schema awareness and type generation so Claude avoids column errors before running code.

What does the skill need to work?

The skill needs a schema file in your project, such as schema.ts, prisma/schema.prisma or a migrations folder, and it creates one if it is missing. It also relies on generated types from your stack, such as npx prisma generate or supabase gen types.

More from alinaqi/maggy

All 54

Similar to Database Schema

More Databases