github-copilot-instructions sql-sp-generation.instructions.md

A set of rules for designing database tables and writing SQL queries and stored procedures, including naming, keys, timestamps, formatting, and query structure.

In plain words
What is it for?
Use it when generating tables, relationships, SQL queries, or stored procedures.
Why use it?
It keeps database code consistent and makes schemas and queries easier to read, review, and maintain.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/antiotaku/github-copilot-instructions/sql-sp-generation
Clone the repo
git clone --depth 1 https://github.com/antiotaku/github-copilot-instructions

Made for: GitHub Copilot.

Per session 605 This file is loaded in full into every session.
When invoked 605 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00605 $0.00605
Opus 5 $0.00302 $0.00302
Sonnet 5 $0.00121 $0.00121
Haiku 4.5 $0.00060 $0.00060

Measured yesterday against content hash 6e7a66e3d4f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

github-copilot-instructions sql-sp-generation.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 yesterday.

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-sp-generation.instructions.md · 75 lines

How it starts

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

SQL Development

Database schema generation

  • all table names should be in singular form
  • all column names should be in singular form
  • all tables should have a primary key column named id
  • all tables should have a column named created_at to store the creation timestamp
  • all tables should have a column named updated_at to store the last update timestamp

Database schema design

  • all tables should have a primary key constraint
  • all foreign key constraints should have a name
  • all foreign key constraints should be defined inline
  • all foreign key constraints should have ON DELETE CASCADE option
  • all foreign key constraints should have ON UPDATE CASCADE option
  • all foreign key constraints should reference the primary key of the parent table

SQL Coding Style

  • use uppercase for SQL keywords (SELECT, FROM, WHERE)
  • use consistent indentation for nested queries and conditions
  • include comments to explain complex logic
  • break long queries into multiple lines for readability
  • organize clauses consistently (SELECT, FROM, JOIN, WHERE, GROUP BY, HAVING, ORDER BY)

SQL Query Structure

  • use explicit column names in SELECT statements instead of SELECT *
  • qualify column names with table name or alias when using multiple tables
  • limit the use of subqueries when joins can be used instead
  • include LIMIT/TOP clauses to restrict result sets
  • use appropriate indexing for frequently queried columns
  • avoid using functions on indexed columns in WHERE clauses

Stored Procedure Naming Conventions

  • prefix stored procedure names with 'usp_'
  • use PascalCase for stored procedure names
  • use descriptive names that indicate purpose (e.g., usp_GetCustomerOrders)
  • include plural noun when returning multiple records (e.g., usp_GetProducts)
  • include singular noun when returning single record (e.g., usp_GetProduct)

Parameter Handling

  • prefix parameters with '@'
  • use camelCase for parameter names
  • provide default values for optional parameters
  • validate parameter values before use
  • document parameters with comments
  • arrange parameters consistently (required first, optional later)

Read the full file on GitHub · 75 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. yesterday First seen · 75 lines · 605 tokens per session scan A 6e7a66e3d4f5

Subscribe to this mod's changes

github-copilot-instructions sql-sp-generation.instructions.md is an instructions file published in the GitHub repository antiotaku/github-copilot-instructions (1 stars, last pushed 10mo ago), licensed MIT. It adds 605 tokens to every session, about $0.0030 per session on Opus 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

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

buildNext

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

Instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,040 tokens

langchain AGENTS.md

Instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens