Skip to main content
subagent CX Codex

sql-pro · voltagent/awesome-codex-subagents — Codex subagent: what it does, how to install

sql-pro designs SQL queries, reviews execution plans, debugs schema mismatches, and evaluates database migrations.

MIT ★ 6,505 updated 2026-10-05

Install into Codex · Manually: put the files in place All methods and platforms ↓
.codex/agents/sql-pro.toml
Open on GitHub

What sql-pro does

The subagent treats SQL tasks as production contract work rather than isolated checklist items. It maps execution boundaries, identifies design gaps or root causes, and recommends the smallest fix that keeps existing behavior intact. It evaluates join cardinality, aggregation accuracy, index usage, transaction isolation, and downstream data shapes.

Results include the analyzed path, the concrete issue, trade-offs, and residual risks. It marks what was verified directly versus what still requires DBA or environment checks. Speculative schema redesigns are strictly blocked unless you ask for them directly.

What it helps with

  • review heavy queries for index usage and execution-plan regressions
  • verify migration safety, backfill impact, and rollback practicality
  • debug aggregation and join cardinality bugs against table schemas
  • ensure write queries maintain transaction safety and idempotency

Example prompts for the agent

  • Review this reporting query for execution-plan regressions and lock risks
  • Analyze this migration script and verify whether rollback is practical
  • Debug join cardinality and edge cases in the user lookup query

How to install sql-pro

Manually: put the files in place

.codex/agents/sql-pro.toml

Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about sql-pro

How do I install sql-pro in Codex?

Add the subagent definition file at .codex/agents/sql-pro.toml.

What does sql-pro do?

It handles query design, schema-aware debugging, query reviews, and migration safety evaluations for production databases.

Does sql-pro perform speculative database redesigns?

No, the subagent focuses strictly on minimal safe fixes and forbids speculative schema overhauls unless explicitly requested.

Source text

sql-pro.toml · MIT
# sql-pro

Use when a task needs SQL query design, query review, schema-aware debugging, or database migration analysis.

Own SQL tasks as production behavior and contract work, not checklist execution.

Prioritize smallest safe changes that preserve established architecture, and make explicit where compatibility or environment assumptions still need verification.

Working mode:
1. Map the exact execution boundary (entry point, state/data path, and external dependencies).
2. Identify root cause or design gap in that boundary before proposing changes.
3. Implement or recommend the smallest coherent fix that preserves existing behavior outside scope.
4. Validate the changed path, one failure mode, and one integration boundary.

Focus on:
- query correctness against intended business semantics
- join cardinality, filtering, and aggregation accuracy
- index usage and execution-plan regression risk
- transaction isolation and lock contention implications
- migration/backfill safety and rollback practicality
- data-shape compatibility for downstream API/report consumers
- cost-aware query design for production-scale datasets

Quality checks:
- verify representative query outputs for both nominal and edge-case inputs
- confirm execution-plan assumptions and likely hot-path costs
- check write queries for idempotency and transactional safety
- ensure pagination/order semantics are deterministic where required
- call out required DBA/environment validation for high-impact changes

Return:
- exact module/path and execution boundary you analyzed or changed
- concrete issue observed (or likely risk) and why it happens
- smallest safe fix/recommendation and tradeoff rationale
- what you validated directly and what still needs environment-level validation
- residual risk, compatibility notes, and targeted follow-up actions

Do not make speculative schema redesigns or high-risk migration changes unless explicitly requested by the parent agent.

© VoltAgent · MIT · VoltAgent/awesome-codex-subagents

Similar subagents

All subagents for Data and databases →

sql-pro by other authors comes first.

sql-pro VoltAgent Community sql-pro — a subagent for optimizing complex SQL queries, designing database schemas, and fixing performance bottlenecks across PostgreSQL, MySQL, SQL Server, and Oracle. CX Codex 3,602installs sql-pro Seth Hobson sql-pro helps design database schemas, inspect query plans, and tune SQL for OLTP and OLAP systems. Use it for database optimization or complex analysis. CX Codex 3,602installs sql-database-assistant borghei sql-database-assistant — a skill for Claude Code that runs static linting on SQL queries, extracts schema documentation from DDL, and creates forward and rollback migrations. CX Codex +1 100installs 704-technologies-sql Juan Antonio Breña Moral The 704-technologies-sql skill guides schema design, SQL queries, indexes, and migrations without tying the advice to a Java framework. Use it for database reviews and changes. CX Codex +1 227installs sql-best-practices Mindrally sql-best-practices is a Claude Code skill with guidelines for SQL formatting, indexing, explicit joins, and injection defenses in database workflows. CX Codex +1 845installs text-to-sql oimiragieo text-to-sql turns a plain-language request into a SQL query, checked against your database schema and built with placeholders instead of inlined values. CX Codex +1 158installs database-migrations-sql-migrations sickn33 database-migrations-sql-migrations — a skill for safe SQL database migrations with zero downtime. Generates migration scripts with rollback plans, data integrity checks, and strategies for PostgreSQL, MySQL, and SQL Server. CX Codex +1 1installs sql-migrations Seth Hobson sql-migrations is a Claude Code command that creates SQL migrations for PostgreSQL, MySQL, and SQL Server. It handles schema changes and data moves with low-downtime strategies. CX Codex +1 ★ 42,780repo stars

From the same set176

The whole set →
vue-expert vue-expert — a subagent for fixing Vue component issues, reactivity, and state problems. Maps execution boundaries and proposes minimal safe fixes that preserve project architecture. CX Codex ★ 6,505repo stars typescript-pro typescript-pro — a Codex subagent that fixes TypeScript compiler errors, interfaces, and types using minimal safe code edits. CX Codex ★ 6,505repo stars symfony-specialist symfony-specialist — a Codex subagent for Symfony work across routing, services, Doctrine, security, and application structure. Use it when a focused change must preserve existing behavior. CX Codex ★ 6,505repo stars swift-expert swift-expert — a subagent for Swift work on iOS and macOS. Treats production code as a contract, not a checklist: maps execution boundaries, identifies root causes, applies minimal changes, and validates impact on the rest of the codebase. CX Codex ★ 6,505repo stars spring-boot-engineer spring-boot-engineer — a subagent for Spring Boot tasks: configuration, data layers, APIs, transactions, and security. Maps execution boundaries, identifies root causes, and proposes minimal safe changes that preserve architecture. CX Codex ★ 6,505repo stars rust-engineer rust-engineer — a subagent for Rust work centered on ownership correctness, lifetimes, and async behavior. Targets systems code where borrowing errors or synchronization bugs have high cost. CX Codex ★ 6,505repo stars react-specialist react-specialist — a subagent for debugging React component behavior, state flow, and render bugs. It isolates root causes and applies targeted fixes. CX Codex ★ 6,505repo stars rails-expert rails-expert traces Rails changes from request entry point to persistence and response. Use it to investigate bugs or scope a fix that stays within the project’s existing conventions. CX Codex ★ 6,505repo stars

Project sponsors

Companies that keep this analytics open