Agent skill

SQL Optimization Patterns

by sickn33 in sickn33/agentic-awesome-skills

Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.

MITAuto-check passedDatabases

Install SQL Optimization Patterns

skills CLI
$ npx skills add sickn33/agentic-awesome-skills --skill sql-optimization-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sickn33/agentic-awesome-skills sql-optimization-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sql-optimization-patterns .claude/skills/sql-optimization-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sql-optimization-patterns
GitHub stars
47k
Used in
1 other repo
Token cost
~566 tokens
SKILL.md length
255 words
Files
2
Skills in repo
1,394
Repo updated
First seen
Licence
MIT

At a glance

Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.

  • Tasks that involve SQL
  • SKILL.md covers Use this skill when, Do not use this skill when, Instructions and Resources, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Query optimization

What it does

SQL Optimization Patterns is an agent skill from sickn33/agentic-awesome-skills. Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.

Its SKILL.md is about 570 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `resources/implementation-playbook.md`).

It sits in Databases, covering SQL and Query optimization. It works with SQL. The repository describes itself as: AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,400+ agentic skills. Includes… The licence is MIT.

When your agent uses it

  • Tasks that involve SQL
  • Tasks that involve Query optimization

Example prompts

  • “/sql-optimization-patterns”

What it can do on your machine

Read from SKILL.md and the folder at commit 1e53ce2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

SQL Optimization Patterns loads about 566 tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 255 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~566

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sickn33/agentic-awesome-skills at commit 1e53ce2, republished under its MIT licence (© sickn33). 255 words, ~566 tokens.

Download SKILL.mdSave it as .claude/skills/sql-optimization-patterns/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
sql-optimization-patterns
description
Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.
risk
critical
source
community
date_added
2026-02-27

SQL Optimization Patterns

Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.

Use this skill when

  • Debugging slow-running queries
  • Designing performant database schemas
  • Optimizing application response times
  • Reducing database load and costs
  • Improving scalability for growing datasets
  • Analyzing EXPLAIN query plans
  • Implementing efficient indexes
  • Resolving N+1 query problems

Do not use this skill when

  • The task is unrelated to sql optimization patterns
  • You need a different domain or tool outside this scope

Instructions

  • Confirm database engine/version, query parameters, expected rows, data distribution and the permitted environment. Start read-only; obtain authorization before DDL, data changes, configuration changes or maintenance.
  • Compare result sets before comparing performance. EXPLAIN ANALYZE executes the statement: use approved representative data, account for functions and triggers, and do not assume a transaction rollback undoes every side effect.
  • Record the observed plan, timing conditions and correctness checks. Indexes and query rewrites are hypotheses, not universal speed improvements.
  • If detailed examples are required, open resources/implementation-playbook.md.

Resources

  • resources/implementation-playbook.md for detailed patterns and examples.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Worked example

The playbook includes an executable SQLite batch-loading example with bound values and an empty-input case. The repository test exercises it alongside pagination ties and aggregation equivalence. SQLite correctness checks do not establish PostgreSQL performance or production safety.

© sickn33, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/sql-optimization-patterns of sickn33/agentic-awesome-skills.

  • SKILL.md
  • resources/implementation-playbook.md

Open the folder on GitHubat commit 1e53ce2

Used in 1 other repository

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in sickn33/agentic-awesome-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

SQL Optimization Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

SQL Optimization Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SQL Optimization Patterns this skillsickn33/agentic-awesome-skills47k1 repos~566Automated safety check: PassMIT
SQL Optimization Patternsynulihao/AgentSkillOS61710 repos~3.3kAutomated safety check: PassNone
Query Engine Designrevfactory/claude-code-harness120—~474Automated safety check: PassNone
SQL Database Assistantborghei/Claude-Skills874—~1.5kAutomated safety check: PassMIT
SQL Optimization InterviewerPrepLabsAI/InterviewMentor112—~2.1kAutomated safety check: PassMIT
Writing SQLrileyhilliard/claude-essentials130—~627Automated safety check: PassMIT

Similar skills

  • SQL Optimization Patterns

    ynulihao/AgentSkillOS

    Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.

    617 GitHub starsUsed in 10 repos~3.3k tokens
    DatabasesAuto-check passed
  • Query Engine Design

    revfactory/claude-code-harness

    SQL query engine design and implementation guide. An agent skill from revfactory/claude-code-harness.

    120 GitHub stars~474 tokensUpdated 7 mo ago
    DatabasesAuto-check passed
  • SQL Database Assistant

    borghei/Claude-Skills

    This skill should be used when the user asks to "optimize SQL queries", "explore database schemas", "generate migration SQL", "analyze query performance", or "document database structure".

    874 GitHub stars~1.5k tokensUpdated today
    DatabasesAuto-check passed
  • SQL Optimization Interviewer

    PrepLabsAI/InterviewMentor

    A Data Engineering interviewer focused on database performance.

    112 GitHub stars~2.1k tokensUpdated today
    DatabasesAuto-check passed
  • Writing SQL

    rileyhilliard/claude-essentials

    Staff+ DBA SQL patterns targeting what Claude's defaults miss - multi-column statistics, operator classes, keyset pagination, silent performance anti-patterns.

    130 GitHub stars~627 tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • Query Optimize

    lazyFrogLOL/Harness_Engineering

    Guidance for SQL query optimization tasks. An agent skill from lazyFrogLOL/Harness_Engineering.

    128 GitHub stars~2.1k tokensUpdated 4 mo ago
    DatabasesAuto-check passed

More from sickn33/agentic-awesome-skills

All 1,394 skills in this repo
  • Liuguang Banlan UI

    sickn33/agentic-awesome-skills

    Implements an interface in one of two named color modes, iridescent white or colorful black, from a parameterized starter that reports measured color intensity.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • User Thoughts Memory

    sickn33/agentic-awesome-skills

    Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Using LWC Memory and Graphs

    sickn33/agentic-awesome-skills

    Keeps project decisions, research and verified results available across coding-agent sessions through LWC memory, a document Wiki graph and a CodeGraph code index.

    47k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Find Complementary Founders

    sickn33/agentic-awesome-skills

    Guides an agent through assessing its own owner for cofounder fit, publishing an approved profile, and ranking complementary profiles other agents published for their owners.

    47k GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check passed
  • Whatsapp Cloud API

    sickn33/agentic-awesome-skills

    Integracao com WhatsApp Business Cloud API (Meta). An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~4.5k tokens
    Auto-check passed
  • Cline Pilot

    sickn33/agentic-awesome-skills

    Acts as a proxy for the Cline CLI, dispatching coding tasks one at a time, monitoring runs by hard evidence, relaying decisions to you and learning per-project preferences.

    47k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Works with

Categories

Questions about SQL Optimization Patterns

What does SQL Optimization Patterns do?

Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data. SQL Optimization Patterns is an agent skill from sickn33/agentic-awesome-skills. Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.

When should I use SQL Optimization Patterns?

SQL Optimization Patterns fits situations like: tasks that involve SQL; tasks that involve Query optimization.

How do I install SQL Optimization Patterns in Claude Code?

Run `npx skills add sickn33/agentic-awesome-skills --skill sql-optimization-patterns -a claude-code`. Or copy the skill folder (skills/sql-optimization-patterns in sickn33/agentic-awesome-skills) into .claude/skills/sql-optimization-patterns in your project. Claude Code loads it when a task matches its description.

How do I install SQL Optimization Patterns in Codex?

Run `npx skills add sickn33/agentic-awesome-skills --skill sql-optimization-patterns -a codex`. Or copy the skill folder (skills/sql-optimization-patterns in sickn33/agentic-awesome-skills) into .agents/skills/sql-optimization-patterns in your project. Codex loads it when a task matches its description.

Can I use SQL Optimization Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sickn33/agentic-awesome-skills --skill sql-optimization-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sql-optimization-patterns, .gemini/skills/sql-optimization-patterns, .github/skills/sql-optimization-patterns and .opencode/skills/sql-optimization-patterns in your project.

What does SQL Optimization Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: SQL Optimization Patterns is instructions for the agent only.

Does SQL Optimization Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is SQL Optimization Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does SQL Optimization Patterns use?

SQL Optimization Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does SQL Optimization Patterns use?

About 566 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to SQL Optimization Patterns?

Skills that share tags, products or a category with SQL Optimization Patterns: SQL Optimization Patterns (ynulihao/AgentSkillOS, 617 stars), Query Engine Design (revfactory/claude-code-harness, 120 stars), SQL Database Assistant (borghei/Claude-Skills, 874 stars) and SQL Optimization Interviewer (PrepLabsAI/InterviewMentor, 112 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SQL Optimization Patterns?

sickn33 (a GitHub user) maintains it in sickn33/agentic-awesome-skills, which has 47,304 GitHub stars. The repository holds 1,394 skills in this directory. The repository was last updated on October 6, 2026.

Source: sickn33/agentic-awesome-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.