Back to catalog
Human reviewedData & analysis

Skill dossier

sql-pro

Source declaration

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).

The author's original description, preserved in English. It describes intent, not verified performance.

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).

datareferences

Research summary

Human reviewed

Skill Atlas editorial review · editorial-preview-1.0.0

Guides SQL query optimization and schema design: analyze the schema, write set-based queries with CTEs and window functions, then check execution plans with EXPLAIN ANALYZE.

Review scope

Deterministic static analysis of collected SKILL.md and supporting text/code. Machine-assisted candidates and findings await human editorial review; no dynamic behavior or effect is assessed.

Observable capabilities

  • Reviews schema, indexes and query patterns to find bottlenecks.
  • Designs set-based queries using CTEs, window functions and appropriate joins.
  • Interprets EXPLAIN ANALYZE output and proposes covering indexes.
  • Provides query explanations, index rationale and before/after metrics.

Limitations & scope

  • The skill's own examples lean toward PostgreSQL; other dialects rely on a separate reference file.
  • Plan analysis needs access to a real database and representative data volumes.
  • The sub-100ms target in the workflow is a stated goal; results are not verified here.

Relevant for

  • Developers debugging slow queries
  • Engineers designing or migrating schemas
  • Teams moving queries between database dialects

What ships with the skill

The file inventory comes from the collected source at the recorded commit. Paths and sizes are structural observations, not a measure of quality.

files
6
Markdown files
6
scripts
0
references
5
Size
55.7 KB
Structural complexity
Low

File inventory

PathTypeBytes
skills/sql-pro/references/database-design.mdReference12.2 KB
skills/sql-pro/references/dialect-differences.mdReference11.7 KB
skills/sql-pro/references/optimization.mdReference10.6 KB
skills/sql-pro/references/query-patterns.mdReference7.3 KB
skills/sql-pro/references/window-functions.mdReference8.7 KB
skills/sql-pro/SKILL.mdInstruction5.3 KB

SKILL.md frontmatter

{
  "name": "sql-pro",
  "description": "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).",
  "license": "MIT",
  "metadata": {
    "author": "https://github.com/Jeffallan",
    "company": "https://synergetic.solutions",
    "version": "1.1.0",
    "domain": "language",
    "triggers": "SQL optimization, query performance, database design, PostgreSQL, MySQL, SQL Server, window functions, CTEs, query tuning, EXPLAIN plan, database indexing",
    "role": "specialist",
    "scope": "implementation",
    "output-format": "code",
    "related-skills": "devops-engineer"
  }
}

A reading of the operating sequence

This workflow reconstructs the apparent sequence from source material. Unless controlled evaluation is explicitly recorded, it is provisional—not an observed trace.

  1. 01
    Input

    Match the request

    Check the description triggers: slow queries, complex joins, window functions, schema design or dialect migration.

  2. 02
    Action

    Design set-based queries

    Create set-based operations using CTEs, window functions and appropriate joins.

  3. 03
    Decision

    Verify with EXPLAIN ANALYZE

    Confirm no sequential scans on large tables; if the sub-100ms target is missed, iterate on indexes or rewrite.

  4. 04
    Output

    Deliver query and rationale

    Provide the optimized query, required indexes, plan analysis and performance metrics.

Potential risk surfaces

Static findings identify points to inspect before installation. They do not establish that a skill is safe, malicious, or effective.

Items warrant review

56 deterministic lexical finding(s) require review across the collected text. Findings can occur in documentation and do not prove execution or exploitability; binary-only files were not scanned.

Network accessObserved
File writesObserved
Credential useNot observed
Note

File modification is described or implemented

50 occurrences

This line contains a possible file-write or redirection operation. Check destination paths and overwrite behavior; the static review did not write any file. This rule matched 50 location(s) in the collected text; 3 representative location(s) are cited. Matching text may be documentation, and the analyzer did not execute it.

Medium

Network access is mentioned

6 occurrences

A URL or network client appears in this source line. Review destinations, data sent, and trust boundaries; static text cannot establish actual network activity. This rule matched 6 location(s) in the collected text; 3 representative location(s) are cited. Matching text may be documentation, and the analyzer did not execute it.

Editorial security note

Run EXPLAIN ANALYZE and any generated DDL against a non-production copy first, since it executes queries and creates indexes.

Where context can be spent

Discovery, activation, and resource layers have different meanings. Exact values appear only when the official token-counting method was run with a named model.

Exact token counts unavailable

All token values, including per-file inventory, are null until the pipeline performs an official exact count with an explicit model.

No token measurement was recorded with the required official method. This dossier does not substitute character counts, file sizes, or estimates.

Controlled evaluation

No controlled evaluation

This skill has only the evidence identified above. No task success, token efficiency, latency, or quality advantage is claimed.

Not tested

Use with the source in view

Install command
git clone https://github.com/Jeffallan/claude-skills.git cd claude-skills # Copy this skill directory into one of: # ~/.claude/skills/sql-pro # .claude/skills/sql-pro
  1. Open the pinned source at https://github.com/Jeffallan/claude-skills/blob/67c1961b180dc92cf08983344627109e983e8f51/skills/sql-pro/SKILL.md.
  2. Review the license, prerequisites and all bundled reference files.
  3. Copy the skill directory into a personal or project-level Claude Code skills directory.
  4. Restart or refresh Claude Code so the skill can be discovered.
Verify installation

Confirm SKILL.md is discoverable at the destination, then ask Claude Code to use sql-pro on a small task.

Prerequisites

  • The skill's own examples lean toward PostgreSQL; other dialects rely on a separate reference file.
  • Plan analysis needs access to a real database and representative data volumes.
  • The sub-100ms target in the workflow is a stated goal; results are not verified here.

Example prompts

Representative task

Use the sql-pro skill to speed up a slow query that joins orders and customers filtered on created_at in the last 30 days. Analyze the EXPLAIN ANALYZE output, propose a covering index and show the before and after query.

Inspect before use

Read the sql-pro skill at https://github.com/Jeffallan/claude-skills/blob/67c1961b180dc92cf08983344627109e983e8f51/skills/sql-pro/SKILL.md. Explain its workflow, required tools, permissions and the main risks before I decide whether to install it.

A decision, with its limits attached

Strengths

  • Requires reading execution plans before recommending optimizations.
  • Explicit MUST DO and MUST NOT DO lists, such as avoiding SELECT * and cursors.

Considerations

  • Running EXPLAIN ANALYZE executes the query, which matters on production databases.
  • Index recommendations need validation against real workloads.
Research conclusion

A practical checklist-driven skill for query tuning when you can inspect real execution plans.

Traceable by construction

The dossier is a time-bound reading of a public artifact, not an endorsement. Use the source link to inspect the exact upstream material.

Jeffallanclaude-skillsskills/sql-pro
Source type
Community
Commit
67c1961b180dc92cf08983344627109e983e8f51
Collected
20 Nov 2026
Last checked
20 Nov 2026
Upstream license
MIT
Repository stars
12,464
Content basis

Deterministic lexical parsing, YAML frontmatter validation, file inventory, source-described workflow extraction, and heuristic provisional classification of the supplied files only. Generated by machine; no LLM, execution, dynamic testing, or human editorial approval.