copilot-setting: Instructions file for GitHub Copilot

.github/instructions/sql-ddl.instructions.md

copilot-setting sql-ddl.instructions.md is an instructions file for GitHub Copilot from zexion7873/copilot-setting. It costs 777 tokens per session, scanned A, original, MIT.

A set of conventions for MySQL database structure changes and migration scripts. A migration is a controlled change to tables, columns, indexes, or stored procedures in an existing database.

In plain words
What is it for?
Use it when creating or reviewing MySQL 8.0 and InnoDB tables, indexes, migrations, backfills, stored procedures, and rollback scripts.
Why use it?
It reduces the risk of locking or damaging a production database during schema changes. It also requires rollback plans and safer multi-release changes for renamed or removed columns.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is zexion7873/copilot-setting's own configuration. It tells GitHub Copilot how to work on copilot-setting itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything copilot-setting configures →

Reuse

Borrowing it

Nothing to install: this file belongs to zexion7873/copilot-setting. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/zexion7873/copilot-setting/main/.github/instructions/sql-ddl.instructions.md
Clone the repo
git clone --depth 1 https://github.com/zexion7873/copilot-setting

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for copilot-setting sql-ddl.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zexion7873/copilot-setting/sql-ddl/github.svg)](https://agentmods.dev/instructions/zexion7873/copilot-setting/sql-ddl)
Your own site
<a href="https://agentmods.dev/instructions/zexion7873/copilot-setting/sql-ddl"><img src="https://agentmods.dev/badge/instructions/zexion7873/copilot-setting/sql-ddl/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for copilot-setting sql-ddl.instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/zexion7873/copilot-setting/sql-ddl"><img src="https://agentmods.dev/badge/instructions/zexion7873/copilot-setting/sql-ddl.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 777 This file is loaded in full into every session.
When invoked 777 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00777 $0.00777
Opus 5.5 $0.00311 $0.00311
Sonnet 5.5 $0.00155 $0.00155
Haiku 4.5 $0.00078 $0.00078

Measured 1mo ago against content hash 03787f0b7e3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

copilot-setting sql-ddl.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/instructions/sql-ddl.instructions.md · 33 lines

How it starts

The opening of the file, as written. The whole thing — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MySQL DDL & Migration Conventions

Rules for schema changes, migration scripts, and stored procedures. Query / JDBC / HQL rules: instructions/sql.instructions.md.

MySQL DDL & Migrations

Schema conventions — apply to every CREATE TABLE / ALTER TABLE, not just stored procedures:

  • Tables: InnoDB, utf8mb4, created_at / updated_at timestamps mandatory
  • FK: fk_<child>_<parent_col>; RESTRICT default, CASCADE only for dependent children
  • Index: idx_<table>_<columns>

Migration safety — every DDL / data-modifying DML script:

  • Every up statement has a down / rollback script; never DROP TABLE without explicit sign-off
  • Drop a column renamed-then-dropped across two releases; rename a column add-new → dual-write → drop-old — never single-shot
  • ADD COLUMN ... NOT NULL DEFAULT <constant> is ALGORITHM=INSTANT on MySQL 8.0.12+ (metadata-only, safe at any size) — append , ALGORITHM=INSTANT so it errors instead of silently rebuilding when INSTANT can't apply (a STORED generated column, ROW_FORMAT=COMPRESSED, FULLTEXT index, >64 prior instant changes, pre-8.0.29 non-trailing position). Do NOT pre-emptively reach for the nullable → backfill → MODIFY COLUMN ... NOT NULL dance: that final MODIFY is the genuinely expensive INPLACE table rebuild — reserve it for the cases INSTANT rejects. MySQL has no ALTER COLUMN ... SET NOT NULL, so MODIFY must re-list the full column definition (DEFAULT / COMMENT / charset) or they are silently dropped
  • A large-table ALTER that rebuilds the table uses online schema change (pt-osc / gh-ost) or carries an explicit downtime note; index creation uses ALGORITHM=INPLACE, LOCK=NONE where supported
  • Backfill and long UPDATE / DELETE are idempotent and chunked by PK range, committed per chunk (low thousands of rows as a starting point — tune per the batch rule in instructions/sql.instructions.md)
  • Idempotency guards: CREATE / DROP TABLE take IF [NOT] EXISTS, but MySQL has none for ADD/DROP COLUMN or CREATE/DROP INDEX — guard those with an information_schema.COLUMNS / STATISTICS existence check (or rely on the migration tool's version tracking)
  • Running-app compatibility: new columns nullable or DB-defaulted so an old app instance's INSERT won't fail; drop columns only after every instance stops reading them; realign hbm.xml / DAO with the post-migration schema after deploy

Read the full file on GitHub · 33 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -10 lines · -212 tokens per session 03787f0b7e3e
  2. 2mo ago First seen · 43 lines · 989 tokens per session scan A 4d016035e8c8

Subscribe to this mod's changes

copilot-setting sql-ddl.instructions.md is an instructions file published in the GitHub repository zexion7873/copilot-setting (1 stars, last pushed 1mo ago), licensed MIT. It adds 777 tokens to every session, about $0.0031 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

copilot-setting sql-ddl.instructions.md compared with instructions from other repositories

copilot-setting sql-ddl.instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
copilot-setting sql-ddl.instructions.mdzexion7873/copilot-settingInstructions file11mo agoMITA777GitHub Copilot
ai-agent-rules-generator copilot.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA3,431GitHub Copilot
ai-agent-rules-generator agent-observations.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA1,787GitHub Copilot
ai-agent-rules-generator task.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA1,703GitHub Copilot
ai-agent-rules-generator doc-sync.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA1,652GitHub Copilot
ai-agent-rules-generator browsetools.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA490GitHub Copilot
ai-agent-rules-generator devtools.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA399GitHub Copilot