Skills Explorer Add Skills

sql-pro

An agent skill by Jeffallan, from Jeffallan/claude-skills. Tags: analytics, database, debugging, migration, performance.

What it does

Optimizes SQL queries, designs database schemas, and troubleshoots performance issues. Use when a user asks why their query is slow, needs help writing complex joins or aggregations, mentions database performance issues, or wants to design or migrate a schema. Invoke for complex queries, window functions, CTEs, indexing strategies, query plan analysis, covering index creation, recursive queries, EXPLAIN/ANALYZE interpretation, before/after query benchmarking, or migrating queries between database dialects (PostgreSQL, MySQL, SQL Server, Oracle).

Install

With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:

npx skills add Jeffallan/claude-skills --skill sql-pro

Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):

git clone --depth 1 https://github.com/Jeffallan/claude-skills
cp -r claude-skills/skills/sql-pro ~/.claude/skills/sql-pro

Safety box score

Grade A, minimal risk: 9 of 100 risk points, rated 2026-09-22. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.

This skill is a documentation-only SQL helper: it generates query rewrites, index advice, EXPLAIN/ANALYZE guidance, and schema/maintenance SQL for PostgreSQL, MySQL, SQL Server, and Oracle. The main risk is not code execution on the host, but that it can produce operational SQL that changes production databases and can read live query text from database monitoring views.

Category levels, from 0 (none) to 3 (high)
CategoryLevelWhy
Code & shell execution0 (none)No shell scripts, binaries, or code-eval machinery are shipped; the files are Markdown with SQL examples only.
Network access0 (none)There are no curl/fetch/API calls or remote downloads; the only external reference is a documentation URL.
Filesystem reach0 (none)The skill does not read, write, or delete local files; all examples act on database objects, not the host filesystem.
Secrets & credentials1 (low)It includes monitoring queries that read live query text and usernames from `pg_stat_activity`/`pg_stat_statements`, which can surface sensitive literals from workloads.
Privilege & persistence0 (none)No sudo, service installation, shell startup edits, or OS-level configuration changes are present.
Instruction hijack surface0 (none)There is no prompt-injection content, hidden text, or instruction to ignore policies or follow remote instructions.
Irreversible actions1 (low)The skill’s purpose includes operational SQL such as `CREATE INDEX`, `REINDEX INDEX CONCURRENTLY`, `CREATE TRIGGER`, and `REFRESH MATERIALIZED VIEW CONCURRENTLY`, which can change databases if applied.
Transparency0 (none)All shipped content is readable Markdown/SQL; there are no binaries, minified blobs, or unpinned installers.

Before installing

Rated 2026-09-22 by an automated review of 6 files from the skill's repository.

Source

Repository
Jeffallan/claude-skills (all skills from this repository)
Path
skills/sql-pro/SKILL.md
Branch
main
Updated
2026-09-19