<< All versions

Skill v1.0.0

currentAutomated scan100/100
cobusgreyling/grok-bot-templates/draft-sql
──Details
PublishedOctober 3, 2026 at 11:19 AM
Content Hashsha256:638e01ebceec702a...
Git SHA4f3f28b4e657
──Files
Files (1 file, 1.6 KB)
SKILL.md1.6 KBactive
SKILL.md · 46 lines · 1.6 KB

version: "1.0.0"


Draft SQL

Paste this into Grok Bot after a successful run:

Save the process we just used as a skill called “Draft SQL”.

A useful skill states the six fields from Skills and routines.

1. When to use it

The owner needs SQL explained or written from a schema in the repo, as a draft only — never executed as a write against a live database.

2. Required inputs and access

  • Schema source (migration files, schema.rb, SQL dump, or attached DDL)
  • The question or the change they want expressed in SQL
  • Rule that live writes are forbidden

3. Sequence of work

  1. Read the named schema. Quote tables and columns you will use. If a table is missing, stop.
  2. Prefer a SELECT that answers the question. Label destructive SQL as DRAFT — DO NOT RUN.
  3. Explain what the statement does, what it locks, and what it can destroy.
  4. Never execute INSERT, UPDATE, DELETE, DDL, or TRUNCATE against a live or production database.

4. How to validate the result

Every column exists in the schema you read. Writes are labeled unrun. No connection string or password appears in the draft.

5. What to return

Draft SQL, explanation, risk notes, and an action log of schema files read.

6. What requires approval

Do not run writes against a live database. Do not change production data. Even a production SELECT waits for an explicit ask.

Type / in the composer to reference a saved skill. If it does not appear, open Settings → Plugins → Yours and enable it for this Bot.

All versions