Логотип Sql Executor

Sql Executor

Организация
zeroclaw-labs
sql-executor

Пишет и выполняет SQL-запросы для PostgreSQL или Supabase по запросам на естественном языке. Используйте навык, если нужно изучить схему базы данных, выполнить запросы на чтение, проверить данные или безопасно внести подтверждённые изменения в базу.

Add to TypingMind

Обзор

Издательzeroclaw-labs
Репозиторийzeroclaw-skills
Название навыкаsql-executor
Звёзды
66
Форки
54
Файлы в комплекте
1
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 1

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — zeroclaw-labs. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Sql Executor в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/zeroclaw-labs/zeroclaw-skills/tree/master/skills/sql-executor
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zeroclaw-labs/zeroclaw-skills.git /tmp/zeroclaw-skills
mkdir -p .claude/skills
cp -r /tmp/zeroclaw-skills/skills/sql-executor .claude/skills/sql-executor
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Sql Executor в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Sql Executor, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Sql Executor не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

SQL Executor

Write and run SQL for PostgreSQL databases, including Supabase projects that expose a Postgres connection string.

Before execution, read the command reference.

Goals

  • turn plain-English requests into correct SQL
  • inspect schema before guessing table or column names
  • execute read-only queries with clear result summaries
  • require confirmation before any mutation or schema change
  • keep database credentials out of the conversation transcript
  • avoid fragile shell quoting when sending generated SQL to psql

Setup

  1. Find a connection target from one of these environment variables:
    • DATABASE_URL
    • POSTGRES_URL
    • POSTGRES_URL_NON_POOLING
    • SUPABASE_DB_URL
    • SUPABASE_DATABASE_URL
  2. If multiple supported variables exist, ask which variable name to use. Do not print their values.
  3. If no supported variable exists, stop and ask the user to set one in their local environment or configure the connection through the host's local secret/config mechanism. Do not ask the user to paste a database URL or password into chat.
  4. Prefer psql for execution.
  5. If the Supabase CLI is installed and the user is working locally, supabase status may be used to confirm the local stack.

Workflow

  1. Understand the request. Decide whether the user wants schema discovery, a read query, a data fix, or a schema change.
  2. Inspect first when needed. If table or column names are not certain, query information_schema before writing the final SQL.
  3. Draft the SQL. Keep it minimal and explicit. Avoid select * unless the user asks for it.
  4. Classify risk.
    • Read path: select, metadata queries, and non-ANALYZE explain statements that can run under a database-enforced read-only guard
    • Mutation path: insert, update, delete, alter, drop, truncate, create, grant, revoke, side-effecting functions, data-modifying CTEs, and explain analyze
  5. Execute safely.
    • Unconfirmed reads may run only inside a database-enforced read-only transaction/session.
    • Any query that fails under the read-only guard because it attempted a write or side effect must be rerouted through the mutation-confirmation flow. Do not retry it outside the guard without confirmation.
    • Mutating queries must be shown to the user first with a short impact summary, then executed only after confirmation.
  6. Verify the outcome. After a mutation, run a small follow-up query when practical.
  7. Report clearly. Share the SQL and a concise summary of the result. Do not reveal credential values.

Execution Rules

1) Connection handling

  • Use only a database URL that is already available through an environment variable or host-provided local secret/config mechanism.
  • Never ask the user to paste a full database URL, database password, or other credential into the conversation.
  • Never print full secrets back to the user.
  • If multiple database URL variables are present, ask the user to choose by variable name only.
  • If the user accidentally shares a credential in chat, do not use it. Tell them to rotate it and set the replacement outside the conversation.

2) Command style

Use strict psql execution with error stopping and paging disabled. Pass generated SQL through stdin with a single-quoted heredoc delimiter. For unconfirmed reads, always combine this with the read-only transaction pattern below.

Do not interpolate generated SQL into an inline shell command. SQL often contains quotes, semicolons, dollar-quoted strings, or user-provided literal values, and shell quoting mistakes can change what reaches Postgres.

When using a heredoc:

  • choose a delimiter that does not appear in the SQL body
  • keep the delimiter single-quoted so the shell does not expand SQL text
  • keep credentials in environment variables, not in the command text

3) Unconfirmed read execution

Unconfirmed reads must fail closed at the database boundary. Run every unconfirmed read, metadata inspection, and schema discovery query inside a read-only transaction/session:

bash
psql "$DATABASE_URL" -X -v ON_ERROR_STOP=1 -P pager=off <<'__ZEROCLAW_SQL__'
BEGIN READ ONLY;
SET LOCAL statement_timeout = '30s';

select now();

COMMIT;
__ZEROCLAW_SQL__

Rules for unconfirmed reads:

  • Put the generated read SQL between SET LOCAL and COMMIT.
  • Do not include generated transaction-control statements such as begin, commit, rollback, savepoint, or set transaction in the user SQL body.
  • If the read-only guard rejects the statement, stop and route the request through mutation confirmation.
  • Treat data-modifying CTEs and side-effecting functions as mutation-path requests, even if the SQL starts with select.
  • EXPLAIN ANALYZE executes the target statement and is not automatically read-only. Run it only under the read-only guard when appropriate, or require explicit mutation confirmation.

4) Read query defaults

  • Add limit 100 for exploratory result sets unless the user asks otherwise.
  • Prefer explicit column lists.
  • Add order by when recency or ranking matters.
  • Use aggregates for counts and summaries instead of dumping huge tables.

5) Mutation safety

Before any mutating SQL:

  • show the exact SQL
  • explain which rows or objects are affected
  • mention whether the action is reversible
  • ask for confirmation

After confirmation:

  • execute the SQL through stdin/heredoc, not inline shell quoting
  • use an explicit transaction for multi-step changes when practical
  • capture the affected row count or command result
  • run a verification query when useful, using the read-only guard for verification reads

6) Supabase specifics

  • Treat Supabase as PostgreSQL for SQL execution.
  • If the user says “Supabase” but no connection variable is configured, ask them to set one of the supported environment variables from their Supabase project's Postgres connection settings. Do not ask them to paste the connection string in chat.
  • For local Supabase, the common default target can be placed in an environment variable such as SUPABASE_DB_URL.

Output format

Use this structure:

text
Target: [environment variable name or local target label]
Mode: [read-only or mutating]
SQL:
[query]

Result:
[short summary]

For mutating queries awaiting approval, use:

text
Target: [environment variable name or local target label]
Mode: mutating
Impact: [what will change]
SQL:
[query]

Awaiting confirmation.

Rules

  • Never invent table or column names when schema inspection is possible.
  • Never run mutating SQL without confirmation.
  • Never ask users to paste credentials into chat.
  • Never expose full credentials in the response.
  • Never embed generated SQL inside a shell-quoted inline psql command.
  • Never run an unconfirmed read outside a database-enforced read-only transaction/session.
  • If a query fails, show the relevant error and propose a corrected query.
  • Prefer transactional thinking for risky multi-step changes.
  • When the request is ambiguous, ask one focused question instead of guessing.

Файлы в комплекте

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

Часто задаваемые вопросы

Что делает навык ИИ Sql Executor?

Пишет и выполняет SQL-запросы для PostgreSQL или Supabase по запросам на естественном языке. Используйте навык, если нужно изучить схему базы данных, выполнить запросы на чтение, проверить данные или безопасно внести подтверждённые изменения в базу.

Зачем использовать Sql Executor в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Sql Executor — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Sql Executor в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/zeroclaw-labs/zeroclaw-skills/tree/master/skills/sql-executor. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Sql Executor?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Sql Executor?

С любым количеством. В TypingMind вы можете использовать Sql Executor с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Sql Executor?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — zeroclaw-labs. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все
Логотип anthropics

Pdf

anthropics
ОрганизацияПопулярный

Используйте этот навык для любых задач с PDF-файлами: чтения и извлечения текста, объединения и разделения файлов, поворота страниц, добавления водяных знаков и других операций…

21.8K
184K
Файлы: 10
Открыть
Логотип nextlevelbuilder

Ui Styling

nextlevelbuilder
ОрганизацияПопулярный

Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user…

15K
141.1K
Файлы: 95
Открыть
Логотип garrytan

Landing Report

garrytan
СообществоПопулярный

Панель очереди только для чтения для ship с учётом рабочего пространства. (gstack)

19.9K
133.5K
Файлы: 1
Открыть
Логотип garrytan

Gstack Openclaw Ceo Review

garrytan
СообществоПопулярный

Используйте этот навык, если вас просят проверить план, подвергнуть предложение критическому разбору, провести проверку в стиле CEO, найти слабые места в подходе, расширить рамки проекта или решить, стоит ли увеличить или сократить план.

19.9K
133.5K
Инструкции
Открыть

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇