Conventions Sql logo

Conventions Sql

Community
Integralist
conventions-sql

MANDATORY for any work on SQL files (*.sql). Load this before editing or creating any *.sql file. SQL migration conventions covering simple DDL, idempotency, batching ALTER statements, comments, and formatting.

Overview

PublisherIntegralist
Repositoryagent-skills
Skill nameconventions-sql
Stars
26
Forks
1
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Integralist on GitHub. Read the source before you install it.

Installation

Install the Conventions Sql AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Integralist/agent-skills/tree/main/.agents/skills/conventions-sql
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Integralist/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/.agents/skills/conventions-sql .claude/skills/conventions-sql
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Conventions Sql in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Conventions Sql on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Conventions Sql is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

[!NOTE] If invoked directly with no specific task, load these conventions and stop. They are ready to apply when asked to design, write, or edit SQL.

Write migrations as literal statements a DBA can read top to bottom and apply. Most rules below concern migrations; formatting applies to all SQL. Examples use MySQL 8.0. The principles apply to any engine; syntax notes may not.

Migration statements

Keep DDL simple. Write a short sequence of literal statements, each exactly what the database will run. DBAs may apply them by hand, feed them to online schema-change tools, or diff them in review; all need the real statement in the file.

sql
ALTER TABLE users
    ADD COLUMN `email_reversed` VARCHAR(255)
    AS (SUBSTRING(REVERSE(`email`), 1, 255)) VIRTUAL
    AFTER `email`;

ALTER TABLE users
    ADD INDEX idx_account_email_reversed (`account_id`, `email_reversed`);

Do not use control flow. Migrations contain DDL and comments only. Do not hide statements with PREPARE/EXECUTE, feeding SET @var, IF() or CASE, string concatenation, GROUP_CONCAT, information_schema gates, loops, or BEGIN blocks. Dynamic SQL cannot be diffed or dry-run; gh-ost and pt-online-schema-change take a single ALTER, not a PREPARE block. Put such logic in application code or a runbook.

Let the runner handle idempotency and verification. The runner records applied versions and runs each migration once, so write against the schema left by earlier migrations. Use inline IF EXISTS or IF NOT EXISTS only where the engine supports it and the guard matters. MySQL supports these for DROP TABLE, DROP INDEX, and CREATE TABLE, not ALTER TABLE … ADD COLUMN or DROP COLUMN; use the bare statement rather than an emulated guard. End the file after the last DDL statement. A failed statement aborts the migration and shows the error; do not add SELECTs that re-check information_schema.

Batch changes. Use one ALTER per table so the table is rebuilt once. Order separate statements by dependency: drop unreferenced tables first and add a column before an index that uses it.

sql
ALTER TABLE jobs
    DROP INDEX idx_queue_shard,
    DROP COLUMN shard_number;

Document risk. Start with a header stating what the migration does, its ticket, and any DBA-relevant risk when choosing how to apply it: table rewrite versus instant metadata change, locks, row-count sensitivity, or online-schema-change compatibility. Comment inline only when the DDL's intent isn't clear. If a comment would describe a simpler alternative, use that simpler statement instead.

sql
-- Migration: add email_reversed generated column and index
-- Ticket: ABC-1234
--
-- Turns suffix matching into a prefix scan on the reversed column. The column
-- is VIRTUAL, so this is an instant metadata change with no row storage; the
-- index build is the only expensive part.

Keep data work out. Migrations change schema. Run backfills, rewrites, and cleanups as batched application code or documented procedures that can be throttled, resumed, and monitored. A migration loop has none of that and holds the migration lock while it runs. If plain DDL is insufficient, split the change into ordered migrations or give the DBA steps for their chosen tooling. Talk to the DBA rather than writing procedural SQL.

Formatting

  • One statement per intent, each ending in ;.
  • Uppercase keywords and snake_case identifiers.
  • When a statement exceeds one line, put each clause on its own indented line.
  • Quote identifiers consistently as the surrounding schema does (for example, MySQL backticks).
  • Follow the repo's migration numbering, naming, and rollback scheme.
  • Name every index and constraint explicitly, using existing prefixes (commonly idx_ for secondary indexes and uq_ for unique indexes).

Frequently asked questions

What does the Conventions Sql AI skill do?

MANDATORY for any work on SQL files (*.sql). Load this before editing or creating any *.sql file. SQL migration conventions covering simple DDL, idempotency, batching ALTER statements, comments, and formatting.

Why use Conventions Sql on TypingMind?

Because you install it once and use it with any model. Conventions Sql is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Conventions Sql in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Integralist/agent-skills/tree/main/.agents/skills/conventions-sql. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Conventions Sql?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Conventions Sql?

As many as you like. As long as a model supports skills, you can use Conventions Sql with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Conventions Sql AI skill free?

It is published on GitHub by Integralist. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇