sql-pro

sql-pro is an agent for coding agents from NickCrew/Claude-Cortex. It costs 42 tokens per session (590 once invoked), scanned A, original, MIT.

A SQL and database specialist for writing complex queries, designing structured schemas, and analyzing database performance. It works with common SQL features such as joins, window functions, stored procedures, indexes, and execution plans.

In plain words
What is it for?
Use it to write or optimize SQL, design tables and relationships, inspect execution plans, recommend indexes, and create database definitions and test data.
Why use it?
It helps retrieve and organize data correctly while finding causes of slow queries. It also helps balance database read speed, write speed, storage, and data integrity.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/nickcrew/claude-cortex/inactive-sql-pro
Clone the repo
git clone --depth 1 https://github.com/NickCrew/Claude-Cortex

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sql-pro

README.md
[![agentmods](https://agentmods.dev/badge/agents/nickcrew/claude-cortex/inactive-sql-pro.svg)](https://agentmods.dev/agents/nickcrew/claude-cortex/inactive-sql-pro)
Your own site
<a href="https://agentmods.dev/agents/nickcrew/claude-cortex/inactive-sql-pro"><img src="https://agentmods.dev/badge/agents/nickcrew/claude-cortex/inactive-sql-pro.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 590 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00042 $0.00590
Opus 5 $0.00021 $0.00295
Sonnet 5 $0.00008 $0.00118
Haiku 4.5 $0.00004 $0.00059

Measured today against content hash 4ad2b46e3f10, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sql-pro scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

archive/agents/inactive-sql-pro.md · 94 lines

What it actually says

You are a SQL expert specializing in query optimization and database design.

Focus Areas

  • Complex queries with CTEs and window functions
  • Query optimization and execution plan analysis
  • Index strategy and statistics maintenance
  • Stored procedures and triggers
  • Transaction isolation levels
  • Data warehouse patterns (slowly changing dimensions)

Approach

  1. Write readable SQL - CTEs over nested subqueries
  2. EXPLAIN ANALYZE before optimizing
  3. Indexes are not free - balance write/read performance
  4. Use appropriate data types - save space and improve speed
  5. Handle NULL values explicitly

Output

  • SQL queries with formatting and comments
  • Execution plan analysis (before/after)
  • Index recommendations with reasoning
  • Schema DDL with constraints and foreign keys
  • Sample data for testing
  • Performance comparison metrics

Support PostgreSQL/MySQL/SQL Server syntax. Always specify which dialect.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 94 lines · 42 tokens per session scan A 4ad2b46e3f10

Subscribe to this mod's changes

sql-pro is an agent published in the GitHub repository NickCrew/Claude-Cortex (37 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 590 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other agents, from other repositories

db-postgres-expert

Use this agent when you need expert PostgreSQL database management, optimization, and architecture guidance. This agent specializes in PostgreSQL 16+ features, advanced SQL queries, indexing strategies, performance tuning, replication, and high-availability configurations. Examples: Context: User needs to optimize…

andisab/swe-marketplace · 403 tokens

database-indexing-expert

AI agent for database index optimization and query performance tuning.

viksant/vibe-coding-tools-content · 10 tokens

CONTRACT

One behavior, many bindings. This document is the single source of truth for the chDB agent-tool surface. chdb.agents.ChDBTool (Python) is the reference implementation; the TypeScript binding (chdb-node) and any future language binding under chdb-io implement the same methods with the same semantics and are verified…

chdb-io/chdb · 0 tokens

crdb-test-reviewer

Reviews CockroachDB test changes for coverage quality, completeness, and red/green testing discipline. Evaluates whether tests cover critical paths, edge cases, and failure scenarios. Use when test files are changed or new behavior is added without corresponding tests.

cockroachdb/cockroach · 55 tokens

crdb-correctness-reviewer

Reviews CockroachDB code changes for correctness and safety. Focuses on concurrency, locking discipline, failure modes, compatibility, and resource leaks. Use when reviewing any non-trivial code change.

cockroachdb/cockroach · 46 tokens

data-engineer

Data Engineer - Database schema changes and migrations.

bybren-llc/safe-agentic-workflow · 12 tokens