Language
SQL
AI instructions for SQL projects — coding rules, agent setup files, and prompts, organized by proficiency.
6 published items · Filter in browse
PostgreSQL
PostgreSQL SQL rule with BAD/GOOD examples: identity columns and data types, timestamptz, NOT IN and BETWEEN pitfalls, explicit joins and CTEs, indexing, safe migrations, least-privilege roles, and transactional tests.
Write SQL From a Schema
Turns a plain-English data question into a correct, dialect-specific SQL query using only the tables and columns in the supplied schema, with join logic and assumptions made explicit.
Read-Only SQL Analyst
System prompt. System prompt for a data analyst agent that answers business questions by writing and running read-only SQL, states its assumptions, and never guesses at columns it has not seen.
Migration planner
Claude Code subagent (.claude/agents/migration-planner.md). Read-only subagent that inventories everything a migration touches (framework, library, schema, or API version) and produces a phased, reversible plan with risks and verification steps.
SQL query explainer and optimizer
Explains a SQL query clause by clause, reads EXPLAIN output for scans, misestimates, loops and spills, and proposes verified index and rewrite fixes per engine.
Postgresql
"PostgreSQL production rules. Safe migrations, parameterized queries, TIMESTAMPTZ, proper indexing strategy."