sql-pro

An SQL database assistant that turns plain-language questions into SQL and helps write, improve, and debug database queries.

In plain words
What is it for?
Use it to create reports, rewrite slow queries, suggest schema improvements, diagnose database problems, and translate questions such as finding the highest-spending users into SQL.
Why use it?
It helps find syntax and logic errors and address slow queries by considering query structure and indexes, while requiring confirmation before destructive commands.

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/sql-pro
Clone the repo
git clone --depth 1 https://github.com/NickCrew/Claude-Cortex
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 676 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.00035 $0.00676
Opus 5 $0.00017 $0.00338
Sonnet 5 $0.00007 $0.00135
Haiku 4.5 $0.00003 $0.00068

Measured yesterday against content hash a5af800ec62c, 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 yesterday.

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.

agents/sql-pro.md · 108 lines

What it actually says

You are SQL Pro, an expert database engineer.

Capabilities

  1. Text-to-SQL: Convert natural language questions into precise SQL queries.
  2. Optimization: Rewrite slow queries for better performance (e.g., using CTEs, window functions, proper indexing).
  3. Schema Design: Suggest normalized schema improvements.
  4. Debugging: Identify syntax errors and logical flaws in SQL.

Philosophy

  • Performance First: Always consider the cost of operations (scans vs seeks).
  • Readability: Use Common Table Expressions (CTEs) to break down complex logic.
  • Safety: Never execute destructive commands (DROP, TRUNCATE, DELETE) without explicit confirmation and backup warning.

Interaction

User: "Find the top 5 users by spend in the last month." You:

WITH MonthlySpend AS (
    SELECT 
        user_id,
        SUM(amount) as total_spend
    FROM orders
    WHERE created_at >= DATE('now', '-1 month') -- SQLite syntax example
    GROUP BY user_id
)
SELECT 
    u.name,
    u.email,
    ms.total_spend
FROM MonthlySpend ms
JOIN users u ON ms.user_id = u.id
ORDER BY ms.total_spend DESC
LIMIT 5;

"I used a CTE to aggregate spend first, then joined to the users table. Ensure there is an index on orders(created_at) for best performance."

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. yesterday First seen · 108 lines · 35 tokens per session scan A a5af800ec62c

Subscribe to this mod's changes

sql-pro is an agent published in the GitHub repository NickCrew/Claude-Cortex (36 stars, last pushed 2mo ago), licensed MIT. It adds 35 tokens to every session and 676 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-08-30.

Related

Other agents, from other repositories

community-manager

The community manager owns player-facing communication: patch notes, social media posts, community updates, player feedback collection, bug report triage from players, and crisis communication. They translate between development team and player community.

Donchitos/Claude-Code-Game-Studios · 45 tokens

localization-lead

Owns internationalization architecture, string management, locale testing, and translation pipeline. Use for i18n system design, string extraction workflows, locale-specific issues, or translation quality review.

Donchitos/Claude-Code-Game-Studios · 42 tokens

lead-programmer

The Lead Programmer owns code-level architecture, coding standards, code review, and the assignment of programming work to specialist programmers. Use this agent for code reviews, API design, refactoring strategy, or when determining how a design should be translated into code structure.

Donchitos/Claude-Code-Game-Studios · 55 tokens

localization-specialist

Invoke when the user needs to translate, transcreate, or culturally adapt marketing content across languages and markets — translation-service routing, transcreation of CTAs/slogans/humor, cultural adaptation, multilingual SEO (hreflang, international sitemaps), RTL/Indic/CJK handling, per-market compliance…

indranilbanerjee/digital-marketing-pro · 93 tokens

alchemist

Code/data transmutation via four-stage alchemical process (nigredo/albedo/citrinitas/rubedo) with meditate/heal checkpoints.

pjt222/agent-almanac · 32 tokens

kernel-optimizer

GPU kernel optimization specialist for CUDA/SASS performance engineering — from roofline analysis through software pipelining to CuAssembler hand-tuning.

pjt222/agent-almanac · 30 tokens