sql
БесплатноБез исполняемых скриптовНе проверенSQL and relational-database engineering with dialect branches for Postgres, MySQL, Oracle, and SQLite. Load whenever writing, editing, or reviewing SQL: a…
от olehsvyrydov★ 18 звёзд на GitHubОб этом скилле
SQL (language skill)
A knowledge skill, not an agent: it loads from context whenever SQL is being written or reviewed. Role agents (/be, /dba, /rev, /arch) route into it; it carries the language, the dialect references carry the engines.
Trigger
Load this skill when:
- Editing or creating a
.sqlfile - Writing or reviewing a schema migration
- A raw SQL string is embedded in application code, in any host language —
sqlx/rusqlitein Rust,JdbcTemplateor@Query(nativeQuery = true)on the JVM,sqltagged templates in JS/TS, DB-API strings in Python - Designing an index, reading an
EXPLAINplan, or tuning a query shape - Writing stored procedures, triggers, or views
Do NOT load for:
- ORM entity mapping where no SQL string is written — that is /be
- Analytics / warehouse / dbt modeling — that is /data
Context
SQL is code that happens to run in someone else's engine. It is reviewed like code, planned like code, and versioned like code — the fact that it executes inside a database server changes none of that. This skill enforces three outcomes: no injection surface anywhere a value meets a statement, no silent schema drift between what the migrations say and what the database is, and no query shape merged without plan evidence.
Documentation Lookup (MANDATORY)
Features are version-gated. A statement that parses on your laptop can fail — or silently behave differently — on the deployed server. Verify the target server's actual version before using a feature, with a live check, not the project README.
| Feature (examples) | Requires |
|---|---|
uuidv7(), B-tree skip scan |
PostgreSQL 18+ |
Additional ALGORITHM=INSTANT ALTER variants |
MySQL 8.0.29+ |
BOOLEAN type, DDL IF [NOT] EXISTS |
Oracle 23ai+ |
Enforced CHECK constraints |
MySQL 8.0.16+ (parsed-and-ignored before that) |
STRICT tables |
SQLite 3.37+ |
RETURNING |
SQLite 3.35+ |
Version-check one-liners:
| Dialect | Check |
|---|---|
| Postgres | SELECT version(); |
| MySQL | SELECT @@version; |
| Oracle | SELECT banner_full FROM v$version; |
| SQLite | SELECT sqlite_version(); |
Current major lines (verify at write time — these drift):
- PostgreSQL 18 (2025-09).
- MySQL — 8.4 is the widely deployed LTS baseline; 9.7 the current LTS; 26.x the calendar-versioned Innovation line.
- Oracle AI Database 26ai — the 23ai family renumbered; on-prem GA January 2026.
- SQLite 3.51.3+ (2026-03, contains a WAL-reset database-corruption fix).
Use Context7 MCP / WebSearch for the target dialect and version before relying on any feature or default you have not verified on that version.
Volatility note. Managed platforms (RDS/Aurora, Cloud SQL, serverless Postgres offerings, hosted MySQL forks) often run one or two major versions behind the current release, and gate, rename, or pre-tune features. The version check above runs against the deployed server — that answer wins over any changelog.
Dialect selection (read first)
| Engine | Detect | Load |
|---|---|---|
| Postgres | postgres/postgresql driver or DSN, plpgsql, pg_ catalog queries |
references/postgres.md |
| MySQL / MariaDB | mysql driver, jdbc:mysql:, InnoDB DDL clauses |
references/mysql.md |
| Oracle | oracle driver, jdbc:oracle:thin:, PL/SQL blocks |
references/oracle.md |
| SQLite | file-based DB; rusqlite / better-sqlite3 / node:sqlite / sqlite-jdbc |
references/sqlite.md |
| Any — reviewing SQL or migrations | /rev context, PR with .sql or embedded SQL in the diff |
references/sql-review.md |
SQLite embedded from Rust also has a dedicated embedding reference on the Rust side:
../rust/references/sqlite-rusqlite.md (connection setup and pooling in code; the engine
semantics stay in references/sqlite.md).
Two edge rules:
- A repo can be multi-dialect — a server engine plus embedded SQLite for local state is common. Load each branch for the files that touch it; do not average the dialects.
- ORM-generated SQL is /be's concern right up until someone writes or overrides a statement by hand — from that moment the statement is this skill's artifact like any other, review rules included.
The altitude contract
Three altitudes, one owner each:
- /arch decides which engines and topologies exist — one Postgres vs Postgres-plus-cache,
sharding, multi-region. Its reference:
../../../architecture/solution-architect/references/data-and-storage.md. - This skill owns the committed SQL artifacts — queries, DDL, migration files, their correctness, their plans, their dialect semantics.
- /dba operates the engine — executes risky migrations on live tables, replication/backup/vacuum/pooling, production plan regressions.
Boundary examples:
- This skill writes the expand-migrate-contract migration files; /dba runs the online-schema-change play on the two-terabyte table.
- This skill reads
EXPLAINbefore merge; /dba chases the plan
Установить sql в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл sql?
SQL and relational-database engineering with dialect branches for Postgres, MySQL, Oracle, and SQLite. Load whenever writing, editing, or reviewing SQL: a .sql file, a schema migration, a raw query embedded in application code, index/EXPLAIN/tuning work, or stored procedures/triggers. NOT for ORM entity mapping where no SQL is written (that is /be), and NOT for analytics/warehouse modeling (that is /data).
Как установить скилл sql?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sql запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic