Database Migrations SQL Migrations
rmyndharis/antigravity-skills
SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, SQL Server
Agent skill
by jeremylongshore in jeremylongshore/tons-of-skills-marketplace
A skill your agent uses when you need to generate, validate, or deploy stored procedures for PostgreSQL, MySQL, or SQL Server.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-stored-procedures -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-stored-procedures --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/generating-stored-procedures .claude/skills/generating-stored-procedures && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "generating-stored-procedures" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-stored-procedures into .claude/skills/generating-stored-procedures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-stored-procedures", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-stored-proceduresType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-stored-procedures -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-stored-procedures --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.curated/generating-stored-procedures .agents/skills/generating-stored-procedures && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "generating-stored-procedures" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-stored-procedures into .agents/skills/generating-stored-procedures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-stored-procedures", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-stored-procedures -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-stored-procedures --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.curated/generating-stored-procedures .cursor/skills/generating-stored-procedures && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "generating-stored-procedures" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-stored-procedures into .cursor/skills/generating-stored-procedures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-stored-procedures", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace.git --path skills/.curated/generating-stored-procedures--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-stored-procedures -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-stored-procedures --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.curated/generating-stored-procedures .gemini/skills/generating-stored-procedures && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "generating-stored-procedures" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-stored-procedures into .gemini/skills/generating-stored-procedures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-stored-procedures", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-stored-proceduresInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-stored-procedures -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.curated/generating-stored-procedures .github/skills/generating-stored-procedures && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "generating-stored-procedures" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-stored-procedures into .github/skills/generating-stored-procedures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-stored-procedures", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-stored-procedures -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-stored-procedures --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.curated/generating-stored-procedures .opencode/skills/generating-stored-procedures && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "generating-stored-procedures" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-stored-procedures into .opencode/skills/generating-stored-procedures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-stored-procedures", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
generating-stored-proceduresA skill your agent uses when you need to generate, validate, or deploy stored procedures for PostgreSQL, MySQL, or SQL Server.
Generating Stored Procedures is an agent skill from jeremylongshore/tons-of-skills-marketplace. Use when you need to generate, validate, or deploy stored procedures for PostgreSQL, MySQL, or SQL Server. Creates database functions, triggers, and procedures with proper error handling and transaction management. Trigger with phrases like "generate stored procedure", "create database function", "write SQL procedure", "add trigger to table", or "create CRUD procedures".
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 16 other files, including scripts, reference files and assets (for example `assets/README.md`, `config/settings.yaml` and `references/README.md`). Compatibility notes: Designed for Claude Code
It sits in Databases, covering SQL and Error handling. It works with PostgreSQL, MySQL, Microsoft SQL Server and SQL. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGrepGlobBash(psql:*)Bash(mysql:*)Bash(sqlcmd:*)Bash(python3:*)From allowed-tools in the SKILL.md frontmatter.
Ships 4 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
python3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Generating Stored Procedures loads about 1.8k tokens when it runs, and up to ~10k if it reads all its reference files. Until then it costs about 101 tokens; SKILL.md has 231 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 231 words, ~1,776 tokens.
.claude/skills/generating-stored-procedures/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.Generate production-ready stored procedures for PostgreSQL, MySQL, and SQL Server with proper error handling, transaction management, and security best practices.
Determine the target database and procedure requirements:
-- PostgreSQL: Check version and extensions
SELECT version();
\dx
-- MySQL: Check version and settings
SELECT VERSION();
SHOW VARIABLES LIKE 'sql_mode';
-- SQL Server: Check version and edition
SELECT @@VERSION;PostgreSQL Function (PL/pgSQL):
CREATE OR REPLACE FUNCTION get_user_by_id(p_user_id INTEGER)
RETURNS TABLE(id INTEGER, username VARCHAR, email VARCHAR, created_at TIMESTAMP)
LANGUAGE plpgsql
AS $$
BEGIN
RETURN QUERY
SELECT u.id, u.username, u.email, u.created_at
FROM users u
WHERE u.id = p_user_id;
IF NOT FOUND THEN
RAISE EXCEPTION 'User with ID % not found', p_user_id
USING ERRCODE = 'P0002';
END IF;
END;
$$;MySQL Stored Procedure:
DELIMITER //
CREATE PROCEDURE GetUserById(IN p_user_id INT)
BEGIN
DECLARE user_exists INT DEFAULT 0;
SELECT COUNT(*) INTO user_exists FROM users WHERE id = p_user_id;
IF user_exists = 0 THEN
SIGNAL SQLSTATE '45000' # 45000 = configured value
SET MESSAGE_TEXT = 'User not found';
END IF;
SELECT id, username, email, created_at
FROM users
WHERE id = p_user_id;
END //
DELIMITER ;SQL Server Stored Procedure (T-SQL):
CREATE PROCEDURE dbo.GetUserById
@UserId INT
AS
BEGIN
SET NOCOUNT ON;
IF NOT EXISTS (SELECT 1 FROM dbo.Users WHERE Id = @UserId)
BEGIN
RAISERROR('User with ID %d not found', 16, 1, @UserId);
RETURN;
END
SELECT Id, Username, Email, CreatedAt
FROM dbo.Users
WHERE Id = @UserId;
END;
GOPostgreSQL with Transaction:
CREATE OR REPLACE FUNCTION transfer_funds(
p_from_account INTEGER,
p_to_account INTEGER,
p_amount NUMERIC(15,2)
)
RETURNS BOOLEAN
LANGUAGE plpgsql
AS $$
BEGIN
-- Debit source account
UPDATE accounts SET balance = balance - p_amount
WHERE id = p_from_account AND balance >= p_amount;
IF NOT FOUND THEN
RAISE EXCEPTION 'Insufficient funds or invalid source account';
END IF;
-- Credit destination account
UPDATE accounts SET balance = balance + p_amount
WHERE id = p_to_account;
IF NOT FOUND THEN
RAISE EXCEPTION 'Invalid destination account';
END IF;
RETURN TRUE;
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
$$;MySQL with Transaction:
DELIMITER //
CREATE PROCEDURE TransferFunds(
IN p_from_account INT,
IN p_to_account INT,
IN p_amount DECIMAL(15,2)
)
BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
RESIGNAL;
END;
START TRANSACTION;
UPDATE accounts SET balance = balance - p_amount
WHERE id = p_from_account AND balance >= p_amount;
IF ROW_COUNT() = 0 THEN
SIGNAL SQLSTATE '45000' # 45000 = configured value
SET MESSAGE_TEXT = 'Insufficient funds';
END IF;
UPDATE accounts SET balance = balance + p_amount
WHERE id = p_to_account;
COMMIT;
END //
DELIMITER ;Use the validation script to check procedure syntax:
# Validate PostgreSQL procedure
python3 ${CLAUDE_SKILL_DIR}/scripts/stored_procedure_syntax_validator.py \
--db-type postgresql \
--file procedure.sql
# Validate MySQL procedure
python3 ${CLAUDE_SKILL_DIR}/scripts/stored_procedure_syntax_validator.py \
--db-type mysql \
--file procedure.sql# Deploy to PostgreSQL
python3 ${CLAUDE_SKILL_DIR}/scripts/stored_procedure_deployer.py \
--db-type postgresql \
--host localhost \
--database mydb \
--file procedure.sql
# Deploy to MySQL
python3 ${CLAUDE_SKILL_DIR}/scripts/stored_procedure_deployer.py \
--db-type mysql \
--host localhost \
--database mydb \
--file procedure.sql| Error | Cause | Solution |
|---|---|---|
permission denied | Missing CREATE PROCEDURE privilege | GRANT CREATE PROCEDURE ON database TO user; |
syntax error | Invalid SQL for database type | Use database-specific syntax validator |
function already exists | Procedure exists without OR REPLACE | Add OR REPLACE or DROP first |
undefined column | Referenced column doesn't exist | Verify table schema before deployment |
transaction aborted | Error during transaction | Check EXCEPTION handler and ROLLBACK logic |
Generate CRUD procedures for a table:
User: Generate CRUD stored procedures for the 'products' table in PostgreSQL
Claude: I'll create four procedures for the products table:
1. create_product - Insert new product
2. get_product - Retrieve by ID
3. update_product - Update existing product
4. delete_product - Soft delete productCreate audit trigger:
User: Create a trigger to log all changes to the orders table
Claude: I'll create an audit trigger that:
1. Creates an orders_audit table if not exists
2. Captures INSERT, UPDATE, DELETE operations
3. Records old/new values, user, and timestamp${CLAUDE_SKILL_DIR}/references/postgresql_stored_procedure_best_practices.md${CLAUDE_SKILL_DIR}/references/mysql_stored_procedure_best_practices.md${CLAUDE_SKILL_DIR}/references/sqlserver_stored_procedure_best_practices.md${CLAUDE_SKILL_DIR}/references/database_security_guidelines.md${CLAUDE_SKILL_DIR}/references/stored_procedure_optimization_techniques.mdUse when you need to generate, validate, or deploy stored procedures for PostgreSQL, MySQL, or SQL Server.
© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 12 other files (scripts, references, assets) in skills/.curated/generating-stored-procedures of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit cfae287
Generating Stored Procedures next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Generating Stored Procedures this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.8k | Automated safety check: Pass | MIT | |
| Database Migrations SQL Migrationsrmyndharis/antigravity-skills | 1.7k | 3 repos | ~577 | Automated safety check: Notes | MIT | |
| SQL ProJeffallan/claude-skills | 12k | — | ~1.3k | Automated safety check: Pass | MIT | |
| SQL Optimizationgithub/awesome-copilot | 40k | 2 repos | ~2.3k | Automated safety check: Pass | MIT | |
| SQL Code Reviewgithub/awesome-copilot | 40k | 1 repos | ~2.2k | Automated safety check: Pass | MIT | |
| Cloud SQL Basicsgoogle/skills | 21k | — | ~973 | Automated safety check: Pass | Apache-2.0 |
rmyndharis/antigravity-skills
SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, SQL Server
Jeffallan/claude-skills
Optimizes SQL queries and designs schemas using CTEs, window functions, covering indexes and EXPLAIN ANALYZE, with notes on dialect differences between major databases.
github/awesome-copilot
Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server…
github/awesome-copilot
Universal SQL code review assistant that performs comprehensive security, maintainability, and code quality analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle).
google/skills
This file generates or explains Cloud SQL resources. An agent skill from google/skills.
ancoleman/ai-design-components
Optimize SQL query performance through EXPLAIN analysis, indexing strategies, and query rewriting for PostgreSQL, MySQL, and SQL Server.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.
jeremylongshore/tons-of-skills-marketplace
Execute proactive auto-loading: automatically detects and loads agents.md files.
jeremylongshore/tons-of-skills-marketplace
Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Works with
Categories
A skill your agent uses when you need to generate, validate, or deploy stored procedures for PostgreSQL, MySQL, or SQL Server. Generating Stored Procedures is an agent skill from jeremylongshore/tons-of-skills-marketplace. Use when you need to generate, validate, or deploy stored procedures for PostgreSQL, MySQL, or SQL Server.
Generating Stored Procedures fits situations like: you need to generate; deploy stored procedures for PostgreSQL; with phrases like generate stored procedure; create database function.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-stored-procedures -a claude-code`. Or copy the skill folder (skills/.curated/generating-stored-procedures in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/generating-stored-procedures in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-stored-procedures -a codex`. Or copy the skill folder (skills/.curated/generating-stored-procedures in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/generating-stored-procedures in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-stored-procedures -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generating-stored-procedures, .gemini/skills/generating-stored-procedures, .github/skills/generating-stored-procedures and .opencode/skills/generating-stored-procedures in your project.
Going by SKILL.md and its folder, Generating Stored Procedures needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*), Bash(sqlcmd:*), Bash(python3:*). Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Generating Stored Procedures is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Generating Stored Procedures: Database Migrations SQL Migrations (rmyndharis/antigravity-skills, 1.7k stars), SQL Pro (Jeffallan/claude-skills, 12k stars), SQL Optimization (github/awesome-copilot, 40k stars) and SQL Code Review (github/awesome-copilot, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.
Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.