AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Sql Helper

skill-bestdeejay-design-agent-skills-sql-helper · by bestdeejay-design

Генерация SQL по текстовому вопросу и DDL-схеме. Скрипт sql_helper.py читает DDL-файл, строит in-memory схему в sqlite3, распознаёт слова вопроса по таблицам/колонкам и собирает SQL по шаблонам интентов (select, join, where, group, order, count, limit). Каждый кандидат проверяется через EXPLAIN, при --explain выводится читаемый план запроса. Триггеры: 'sql helper', 'sql генерация', 'сгенерируй sq…

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-bestdeejay-design-agent-skills-sql-helper

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-bestdeejay-design-agent-skills-sql-helper)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
today

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Sql Helper? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

SQL Helper

> Генерация SQL-запросов из текстового вопроса и DDL-схемы.

Загружай этот скилл когда нужно превратить вопрос на естественном языке в SQL: для быстрых запросов к базе, разбора плана выполнения или форматирования SQL.

🎯 When to use

Use this skill when:

  • Есть DDL-файл (CREATE TABLE) и вопрос, по которому нужен SQL-запрос
  • Нужно быстро собрать SELECT/JOIN/GROUP BY/COUNT по шаблону
  • Просят «сгенерируй sql», «напиши sql», «sql запрос», «sql helper»
  • Нужно посмотреть план выполнения запроса (EXPLAIN) в читаемом виде

Do NOT use when:

  • Нужна только проверка синтаксиса без схемы — достаточно обычного редактора
  • Нужна миграция или генерация DDL — это отдельный инструмент
  • Вопрос не про SQL (анализ данных, CSV, скрейпинг) — это другие скиллы

📦 Files

  • SKILL.md — этот файл
  • scripts/sql_helper.py — генератор SQL + EXPLAIN (Python 3 stdlib)
  • references/canonical-patterns.md — канонические аналоги text-to-SQL и разбор недостающих техник

Canonical analogues

Полный разбор — в references/canonical-patterns.md. Ключевые каноны, на которые опирается дизайн скилла:

  • Anthropic Cookbook capabilities/text_to_sql — эталон интроспекции схемы (sqlitemaster + PRAGMA tableinfo) и execution-based валидации через promptfoo-ассерты.
  • sqlsure / sql-semantic-check — семантические правила FANOUT/JOIN_KEY/ADDITIVITY и интроспекция PK/FK вместо эвристик join.
  • Vanna.ai — контур train → retrieve (few-shot) → generatesql → runsql → verify.
  • Spider / BIRD / Spider 2.0 — методология оценки: exact match, execution accuracy, validity + efficiency; schema linking как первый этап.
  • sqlite-utils + SQLGlot — CLI-интроспекция (schema, analyze, memory) и квотинг идентификаторов (quote_identifiers).
  • grok-sqlite-explain — построение дерева EXPLAIN по ссылкам parent, а не по id.

🧰 Usage

# Сгенерировать SQL по вопросу:
python3 skills/sql-helper/scripts/sql_helper.py --ddl schema.sql --question "select users by id"

# С планом выполнения:
python3 skills/sql-helper/scripts/sql_helper.py --ddl schema.sql --question "count orders by user" --explain

# JOIN двух таблиц:
python3 skills/sql-helper/scripts/sql_helper.py --ddl schema.sql --question "join users and orders"

# С лимитом и сортировкой:
python3 skills/sql-helper/scripts/sql_helper.py --ddl schema.sql --question "top 5 orders by date desc"

🔬 Проверка результата

  • Скрипт выводит сгенерированный SQL в stdout и завершается с кодом 0.
  • При --explain после SQL печатается секция --- query plan --- с планом.
  • Пустой вопрос или невалидный DDL — сообщение в stderr и код выхода 1.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.