ClaudeSQLDatabase
SQL Claude Rules
Claude rules for SQL and database design: schema conventions, query patterns, and migration safety.
CLAUDE.md
- Use snake_case for all table and column names; plural table names - Always add created_at and updated_at timestamps to all tables - Use UUIDs (uuid_generate_v4) or nanoid for primary keys in distributed systems - Write queries that select only needed columns; never SELECT * in production - Use materialized views for expensive aggregations that are read frequently - Index foreign key columns automatically; analyze query plans for slow queries - Use check constraints at the database level for enum-like values - Test migrations on a copy of production data before running in production
How to use with Claude
Create a `CLAUDE.md` file in your project root. Claude Code reads this on startup and follows your conventions throughout the session.
#sql#database#migrations#claude#coding-rules
Related Rules
React Claude Rules
ClaudeReact
Claude rules for React: component design, state patterns, performance, and testing conventions in CLAUDE.md.
Architecture
react · claudeCopy Ready
Next.js Claude Rules
ClaudeNext.js
Claude rules for Next.js App Router: streaming, server actions, caching, and production deployment patterns.
Architecture
nextjs · claudeCopy Ready
Go Claude Rules
ClaudeGo
Claude rules for Go: project structure, error handling, testing, and idiomatic Go patterns.
Architecture
go · golangCopy Ready
Rust Claude Rules
ClaudeRust
Claude rules for Rust: zero-cost abstractions, async with Tokio, error types, and high-performance Rust patterns.
Performance
rust · tokioCopy Ready