Agent skill

SQL Sentinel

by sickn33 in sickn33/agentic-awesome-skills

Audit SQL for the cost & performance anti-patterns that burn warehouse credits.

MITAuto-check passedDatabases

Install SQL Sentinel

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

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

GitHub CLI
$ gh skill install sickn33/agentic-awesome-skills sql-sentinel --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-sentinel .claude/skills/sql-sentinel && 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-sentinel
GitHub stars
47k
Used in
1 other repo
Token cost
~1.5k tokens
SKILL.md length
606 words
Files
1
Skills in repo
1,394
Repo updated
First seen
Licence
MIT

At a glance

Audit SQL for the cost & performance anti-patterns that burn warehouse credits.

  • Works in 2 steps: Run the audit → Read the prioritized plan
  • Tasks that involve Data warehousing
  • SKILL.md covers Overview, When to Use This Skill, How It Works and Examples, plus 2 more sections
  • Calls git and node; reaches github.com

What it does

SQL Sentinel is an agent skill from sickn33/agentic-awesome-skills. Audit SQL for the cost & performance anti-patterns that burn warehouse credits. Scores warehouse health 0-100 and outputs a prioritized cost-reduction plan for BigQuery, Snowflake, Redshift, and Postgres.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Data warehousing and SQL. It works with SQL, Google BigQuery, PostgreSQL and Snowflake. 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 Data warehousing
  • Tasks that involve SQL

Example prompts

  • “/sql-sentinel”

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Run the audit
  2. Read the prioritized plan

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

    Shell commands in SKILL.md call:

    • git
    • node

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    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 Sentinel loads about 1.5k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 606 words of instructions outside code blocks.

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

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). 606 words, ~1,508 tokens.

Download SKILL.mdSave it as .claude/skills/sql-sentinel/SKILL.md (or your agent's skills folder).
name
sql-sentinel
description
Audit SQL for the cost & performance anti-patterns that burn warehouse credits. Scores warehouse health 0-100 and outputs a prioritized cost-reduction plan for BigQuery, Snowflake, Redshift, and Postgres.
category
data
risk
critical
source
community
source_repo
takeaseatventure/sql-sentinel
source_type
community
date_added
2026-06-26
author
takeaseat
tags
sql, bigquery, snowflake, redshift, postgres, data-warehouse, cost-optimization, performance, audit, finops
tools
claude, cursor, codex, gemini
license
MIT

sql-sentinel

Overview

A static-analysis skill that audits SQL for the cost & performance anti-patterns that dominate warehouse bills — SELECT *, full-table scans, non-sargable predicates, Cartesian joins, the NOT IN NULL trap, and 15 more. It scores warehouse query health 0-100 (A-F) and outputs a prioritized cost-reduction plan, each finding with a why, a concrete fix, and an estimated savings.

Built for analytics engineers (dbt, Looker), data platform teams running FinOps / "reduce cloud spend" initiatives, and anyone reviewing a SQL pull request before it hits production. Works across BigQuery, Snowflake, Redshift, and Postgres. Zero dependencies, MIT licensed.

The executable engine and full rule set live in the source repository: https://github.com/takeaseatventure/sql-sentinel. Treat that repository as third-party executable code.

When to Use This Skill

  • A user writes or reviews a query for BigQuery, Snowflake, Redshift, Postgres, or Spark SQL.
  • A user asks "why is this query so slow?" or "why is my warehouse bill so high?"
  • A user is about to promote a dashboard query or dbt model to production.
  • A data engineer wants a second pair of eyes before a code review or a cost-optimization sweep.
  • A team is running a "reduce cloud spend" or FinOps initiative.

How It Works

The engine splits a SQL script into statements (honoring quotes and comments), runs 20 rules over each statement, scores health 0-100 weighted by severity (critical 25, high 12, medium 5, low 1), and returns a prioritized cost-reduction plan.

Step 1: Run the audit

Install or clone the source repository only after choosing a reviewed commit, tag, or release to trust. Do not run code from a mutable default branch just because this skill links to it:

bash
git clone https://github.com/takeaseatventure/sql-sentinel.git
cd sql-sentinel
git checkout <reviewed-commit-or-tag>
node scripts/sql-sentinel.js path/to/query.sql

Or programmatically:

javascript
const { auditSql } = require('./scripts/sql-sentinel');
const report = auditSql(yourSqlString, { dialect: 'bigquery' });
console.log(report.healthScore);      // 0-100
console.log(report.grade);            // 'A' | 'B' | 'C' | 'D' | 'E' | 'F'
console.log(report.prioritizedPlan);  // array, worst findings first
Step 2: Read the prioritized plan

The output leads with critical findings (Cartesian joins, mass DELETE) and descends to low-severity style issues. Each finding explains why it costs money and how to fix it.

Examples

Example 1: A messy dashboard query
sql
SELECT DISTINCT *
FROM user_events, raw_logs
WHERE LOWER(event_name) LIKE '%signup%'
  AND user_id NOT IN (SELECT id FROM deleted_users)
ORDER BY created_at;

The audit scores this 17/100 (grade F) and flags 7 findings:

  • CRITICAL: comma-join produces a Cartesian product (can turn a $0.02 query into a $200 query)
  • HIGH: SELECT * forces full column scan (30-90% wasted bytes on wide tables)
  • HIGH: leading-wildcard LIKE '%signup%' defeats indexes
  • HIGH: LOWER(event_name) defeats indexes (non-sargable)
  • HIGH: NOT IN (SELECT ...) — NULL semantics hazard
  • MEDIUM: SELECT DISTINCT dedup cost
  • MEDIUM: ORDER BY without LIMIT sorts the full result
Show full SKILL.md (221 more words)Show less
Example 2: A clean, sargable query
sql
-- This scores 90+/100 (grade A) — no findings
SELECT id, email, created_at
FROM users
WHERE created_at >= TIMESTAMP '2026-01-01'
  AND created_at <  TIMESTAMP '2026-02-01'
ORDER BY id
LIMIT 100;

The 20 rules (ruleset v1.0.0)

RuleSeverityCatches
SQL001highSELECT * full column scan
SQL002criticalNo WHERE → full table scan
SQL003highLIKE '%term' non-sargable
SQL004highFunction on column kills index
SQL005criticalCROSS JOIN / comma-join
SQL006mediumSELECT DISTINCT dedup cost
SQL007mediumORDER BY without LIMIT
SQL008highNOT IN (SELECT ...) NULL trap
SQL009mediumImplicit type cast
SQL010lowMany ORs (use IN/UNION)
SQL011mediumCOUNT(DISTINCT) at scale (use HLL)
SQL012lowLIMIT without ORDER BY
SQL013mediumScalar subquery in SELECT
SQL014medium5+ JOINs broadcast/spill risk
SQL015highFact table, no partition filter
SQL017lowString concat in SELECT
SQL018mediumWindow OVER () no PARTITION
SQL020criticalDELETE/UPDATE without WHERE
SQL021lowSELECT * in EXISTS/IN
SQL022mediumUNION vs UNION ALL

Run the test suite to verify each rule fires on real SQL:

bash
cd scripts && node test.js   # 26 tests, zero dependencies

Limitations

  • This is a static analyzer. It finds anti-patterns in the text of SQL; it does not read query plans, row counts, or billing. A flagged query on a 100-row table is cheap; the same query on a billion-row table is the problem the rule exists to prevent.
  • The fact-table heuristic (SQL015) keys off table names (*_events, *_log) and is advisory, not definitive.
  • It does not execute SQL — safe to run on any .sql file.

© 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

Just SKILL.md in skills/sql-sentinel of sickn33/agentic-awesome-skills.

Open the folder on GitHubat commit 1e53ce2

Used in 1 other repository

We found 1 copy 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 Sentinel 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 Sentinel compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SQL Sentinel this skillsickn33/agentic-awesome-skills47k1 repos~1.5kAutomated safety check: PassMIT
SQL Queriesw95/awesome-claude-corporate-skills2353 repos~2.8kAutomated safety check: PassMIT
SQL Query Explainermohitagw15856/pm-claude-skills1.4k—~1.6kAutomated safety check: PassMIT
Semantic Analystsidequery/sidemantic129—~982Automated safety check: PassAGPL-3.0
Warehouse SQLHybridAIOne/hybridclaw158—~1.8kAutomated safety check: PassMIT
SQL Queriesphuryn/pm-skills27k—~907Automated safety check: PassMIT

Similar skills

  • SQL Queries

    w95/awesome-claude-corporate-skills

    Write correct, performant SQL across all major data warehouse dialects (Snowflake, BigQuery, Databricks, PostgreSQL, etc.).

    235 GitHub starsUsed in 3 repos~2.8k tokens
    DatabasesAuto-check passed
  • SQL Query Explainer

    mohitagw15856/pm-claude-skills

    Explains, optimises, writes, and documents SQL queries. An agent skill from mohitagw15856/pm-claude-skills.

    1.4k GitHub stars~1.6k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Semantic Analyst

    sidequery/sidemantic

    Answer analytical, KPI, metric, trend, cohort, and business-performance questions through a Sidemantic semantic layer.

    129 GitHub stars~982 tokensUpdated today
    DatabasesAuto-check passed
  • Warehouse SQL

    HybridAIOne/hybridclaw

    Review and run read-only natural-language SQL against a customer data warehouse with cached schema introspection and explicit write grants.

    158 GitHub stars~1.8k tokensUpdated today
    DatabasesAuto-check passed
  • SQL Queries

    phuryn/pm-skills

    Generate SQL queries from natural language descriptions. An agent skill from phuryn/pm-skills.

    27k GitHub stars~907 tokensUpdated 22 days ago
    DatabasesAuto-check passed
  • SQL Queries

    killvxk/pm-skills-zh

    将自然语言描述转化为 SQL 查询语句。支持 BigQuery、PostgreSQL、MySQL 及其他方言。可从上传的结构图或文档中读取数据库结构。适用于编写 SQL、构建数据报表、探查数据库,或将业务问题转化为查询语句。

    167 GitHub stars~423 tokensUpdated 6 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

Categories

Questions about SQL Sentinel

What does SQL Sentinel do?

Audit SQL for the cost & performance anti-patterns that burn warehouse credits. SQL Sentinel is an agent skill from sickn33/agentic-awesome-skills. Audit SQL for the cost & performance anti-patterns that burn warehouse credits.

When should I use SQL Sentinel?

SQL Sentinel fits situations like: tasks that involve Data warehousing; tasks that involve SQL.

How do I install SQL Sentinel in Claude Code?

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

How do I install SQL Sentinel in Codex?

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

Can I use SQL Sentinel 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-sentinel -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-sentinel, .gemini/skills/sql-sentinel, .github/skills/sql-sentinel and .opencode/skills/sql-sentinel in your project.

What does SQL Sentinel need to run?

Going by SKILL.md and its folder, SQL Sentinel needs the command-line tools its instructions call (git and node).

Does SQL Sentinel access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is SQL Sentinel 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 Sentinel use?

SQL Sentinel is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does SQL Sentinel use?

About 1.5k tokens (SKILL.md is roughly 6k 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 Sentinel?

Skills that share tags, products or a category with SQL Sentinel: SQL Queries (w95/awesome-claude-corporate-skills, 235 stars), SQL Query Explainer (mohitagw15856/pm-claude-skills, 1.4k stars), Semantic Analyst (sidequery/sidemantic, 129 stars) and Warehouse SQL (HybridAIOne/hybridclaw, 158 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SQL Sentinel?

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.