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.
npx agentmods add skills/skilletmd/skillet/sql-reviewnpx skills add skilletmd/skillet --skill sql-reviewgit clone --depth 1 https://github.com/skilletmd/skilletWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/skilletmd/skillet/sql-review)<a href="https://agentmods.dev/skills/skilletmd/skillet/sql-review"><img src="https://agentmods.dev/badge/skills/skilletmd/skillet/sql-review.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00045 | $0.00769 |
| Opus 5 | $0.00023 | $0.00385 |
| Sonnet 5 | $0.00009 | $0.00154 |
| Haiku 4.5 | $0.00005 | $0.00077 |
Grade A, and why
sql-review 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 5d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
sql-review
The dangerous SQL is the SQL that runs fine in dev and wrong in prod: a DELETE that matches every row, a JOIN that fans out, a migration that locks a table for ten minutes. This skill catches those before they ship.
When to use
Writing a non-trivial query, reviewing a migration, or about to run a write statement against real data.
Before any UPDATE or DELETE
Run the WHERE clause as a SELECT first. The count it returns is the number of rows you are about to change.
-- Don't run this yet:
DELETE FROM orders WHERE status = 'cancelld'; -- typo: matches 0 rows, or the wrong ones
-- Run this first:
SELECT count(*) FROM orders WHERE status = 'cancelld';
If the count surprises you, stop. The count is a sanity check, not a lock — rows can change between the SELECT and the write. The transaction is what lets you back out:
BEGIN;
DELETE FROM orders WHERE status = 'cancelled';
-- read the row count it reports, then:
COMMIT; -- or ROLLBACK; if it's wrong
Correctness
- NULL is not a value.
col = NULLis never true — useIS NULL.NOT IN (subquery)returns nothing if the subquery yields a single NULL. - JOIN fan-out. A one-to-many JOIN multiplies rows, and now your
SUMis wrong. Check the grain before you aggregate. - GROUP BY. Every non-aggregated column in the SELECT must be in the GROUP BY.
- Implicit casts. Comparing a string column to a number can scan the whole table or match nothing.
Performance
EXPLAIN ANALYZE <your query>;
EXPLAIN ANALYZE runs the query to get real timings — on an UPDATE, DELETE, or INSERT that means it actually writes. Use plain EXPLAIN for those, or wrap it in a transaction you ROLLBACK.
Read it for:
- Seq Scan on a large table where you expected an index — the WHERE column isn't indexed, or a function wraps it (
WHERE lower(email) = ...can't use a plain index onemail). - Nested loops over large row counts — usually a missing index on the join key.
SELECT *in anything that runs often — name the columns you need.- No
LIMITon a query that feeds a UI.
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.
- 5d ago First seen · 67 lines · 45 tokens per session scan A c329da7bf582
sql-review is a skill published in the GitHub repository skilletmd/skillet (3 stars, last pushed 6d ago), licensed Apache-2.0. It adds 45 tokens to every session and 769 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-31.
Other skills, from other repositories
postgresql-table-design
Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.
event-store-design
Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.
cqrs-implementation
Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.
projection-patterns
Build read models and projections from event streams. Use when implementing CQRS read sides, building materialized views, or optimizing query performance in event-sourced systems.
database-design
Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.
architect/data-api-design
Skill "architect/data-api-design" from echoVic/boss-skill, covering 数据模型与api设计方法论, 适用场景, 数据模型设计, 1. 实体识别 and 2. 关系识别.