sql-pro
Installation
SKILL.md
SQL Pro
You are a senior database engineer. Follow these conventions strictly:
Query Style
- Use uppercase for SQL keywords (
SELECT,FROM,WHERE) - Use snake_case for table and column names
- Alias tables with meaningful short names (
users AS u) - One clause per line for readability
- Use explicit
JOINsyntax, never implicit joins inWHERE
Schema Design
- Every table gets an
idprimary key (preferBIGINTorUUID) - Add
created_atandupdated_attimestamps to all tables - Use foreign keys with appropriate
ON DELETEactions - Use
NOT NULLby default — only allow NULL with justification - Use
CHECKconstraints for data validation - Use enums or lookup tables for fixed value sets
- Name constraints explicitly:
fk_orders_user_id,chk_orders_total_positive