Database Design
MoizIbnYousaf/ai-agent-skills
Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases.
Agent skill
by jeremylongshore in jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with schema comparison. An agent skill from jeremylongshore/tons-of-skills-marketplace.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill comparing-database-schemas -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace comparing-database-schemas --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/comparing-database-schemas .claude/skills/comparing-database-schemas && 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 "comparing-database-schemas" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/comparing-database-schemas into .claude/skills/comparing-database-schemas/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comparing-database-schemas", 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/comparing-database-schemasType 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 comparing-database-schemas -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace comparing-database-schemas --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/comparing-database-schemas .agents/skills/comparing-database-schemas && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "comparing-database-schemas" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/comparing-database-schemas into .agents/skills/comparing-database-schemas/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comparing-database-schemas", 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 comparing-database-schemas -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace comparing-database-schemas --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/comparing-database-schemas .cursor/skills/comparing-database-schemas && 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 "comparing-database-schemas" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/comparing-database-schemas into .cursor/skills/comparing-database-schemas/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comparing-database-schemas", 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/comparing-database-schemas--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 comparing-database-schemas -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace comparing-database-schemas --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/comparing-database-schemas .gemini/skills/comparing-database-schemas && 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 "comparing-database-schemas" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/comparing-database-schemas into .gemini/skills/comparing-database-schemas/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comparing-database-schemas", 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 comparing-database-schemasInstalls 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 comparing-database-schemas -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/comparing-database-schemas .github/skills/comparing-database-schemas && 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 "comparing-database-schemas" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/comparing-database-schemas into .github/skills/comparing-database-schemas/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comparing-database-schemas", 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 comparing-database-schemas -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 comparing-database-schemas --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/comparing-database-schemas .opencode/skills/comparing-database-schemas && 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 "comparing-database-schemas" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/comparing-database-schemas into .opencode/skills/comparing-database-schemas/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comparing-database-schemas", 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.
comparing-database-schemasProcess use when you need to work with schema comparison. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Comparing Database Schemas is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with schema comparison. This skill provides database schema diff and sync with comprehensive guidance and automation. Trigger with phrases like "compare schemas", "diff databases", or "sync database schemas".
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts, reference files and assets (for example `assets/README.md`, `references/README.md` and `scripts/README.md`). Compatibility notes: Designed for Claude Code
It sits in Databases, covering Database schema design. It works with PostgreSQL and MySQL. 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.
10 steps, taken from the first numbered list 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(mongosh:*)From allowed-tools in the SKILL.md frontmatter.
Ships 2 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
pg_dumpFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
postgresql.orggithub.comskeema.ioFrom 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.
Comparing Database Schemas loads about 1.8k tokens when it runs, and up to ~1.8k if it reads all its reference files. Until then it costs about 67 tokens; SKILL.md has 790 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). 790 words, ~1,810 tokens.
.claude/skills/comparing-database-schemas/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Compare database schemas between two environments (development vs. staging, staging vs.
psql or mysql CLI configured to connect to both environmentsinformation_schema and pg_catalog (PostgreSQL) or information_schema (MySQL)pg_dump --schema-only for full schema extractionExtract the full schema from both databases for comparison:
pg_dump --schema-only --no-owner --no-privileges -f schema_source.sql source_db and repeat for target_dbmysqldump --no-data --routines --triggers source_db > schema_source.sqlinformation_schema directly for programmatic comparisonCompare tables present in each database:
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_catalog = 'source_db' EXCEPT SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_catalog = 'target_db'Compare columns for each shared table:
information_schema.columns from both databases for: column_name, data_type, character_maximum_length, is_nullable, column_default, ordinal_positionCompare indexes:
pg_indexes for indexname, indexdef on each databaseinformation_schema.STATISTICS for INDEX_NAME, COLUMN_NAME, NON_UNIQUECompare constraints (primary keys, foreign keys, unique, check):
information_schema.table_constraints and information_schema.key_column_usageCompare functions, stored procedures, and triggers:
pg_proc for function signatures and pg_trigger for trigger definitionsinformation_schema.ROUTINES and information_schema.TRIGGERSCompare enum types and custom types (PostgreSQL):
pg_type and pg_enum for enum label differencesGenerate a structured diff report categorizing differences as:
Generate migration SQL to synchronize the target database to match the source:
Validate the generated migration by applying it to a copy of the target database and re-running the diff. The second diff should report zero differences, confirming the migration produces the expected state.
| Error | Cause | Solution |
|---|---|---|
| Connection refused to one database | Network or credential issue on source or target | Verify connection strings; check firewall rules; confirm credentials work with direct psql or mysql connection |
Permission denied on pg_catalog queries | User lacks read access to system catalogs | Grant pg_read_all_settings role; or use pg_dump --schema-only which requires fewer privileges |
| False positive differences from default value formatting | PostgreSQL normalizes default expressions differently in different versions | Normalize default value strings before comparison; ignore whitespace differences; compare semantic equivalence |
| Enum type modification blocked | PostgreSQL does not support removing enum values or reordering | Create a new enum type, migrate the column, drop the old type; document this as a multi-step migration |
| Generated migration fails on target | Target has data that violates new constraints | Add data validation queries before constraint creation; backfill default values; handle edge cases in migration |
Detecting schema drift between staging and production: After 3 months without auditing, the diff reveals: 2 columns added to production manually (not in migrations), 1 index missing from staging, and 3 functions with different implementations. A migration script is generated to bring staging in sync, and the manual production changes are backported into migration files.
Pre-deployment schema validation: Before deploying a release with 5 migration files, run the diff between the post-migration staging schema and the expected schema. The diff catches a migration that accidentally dropped a constraint that a later migration depends on. The migration ordering is fixed before production deployment.
Comparing PostgreSQL schemas across major version upgrade: Schema extracted from PostgreSQL 14 and compared against PostgreSQL 16 after migration. Diff reveals function signature changes for built-in function calls, updated default values for new parameters, and deprecated syntax in stored procedures. Migration script updates function definitions for the new version.
© 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 4 other files (scripts, references, assets) in skills/.curated/comparing-database-schemas of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit cfae287
Comparing Database Schemas 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 |
|---|---|---|---|---|---|---|
| Comparing Database Schemas this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.8k | Automated safety check: Pass | MIT | |
| Database DesignMoizIbnYousaf/ai-agent-skills | 1.1k | 1 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Golang Databaseunxed/f4 | 243 | 2 repos | ~2.9k | Automated safety check: Pass | MIT | |
| Database Expertcin12211/orca-q | 224 | — | ~2.8k | Automated safety check: Pass | MIT | |
| DB Migrationhiromaily/go-crypto-wallet | 128 | — | ~652 | Automated safety check: Pass | MIT | |
| Expert DatabaseReJeCtAll/ExpertTeam-Codex | 113 | — | ~692 | Automated safety check: Pass | MIT |
MoizIbnYousaf/ai-agent-skills
Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases.
unxed/f4
Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…
cin12211/orca-q
Database performance optimization, schema design, query analysis, and connection management across PostgreSQL, MySQL, MongoDB, and SQLite with ORM integration.
hiromaily/go-crypto-wallet
Database schema and migration workflow. An agent skill from hiromaily/go-crypto-wallet.
ReJeCtAll/ExpertTeam-Codex
数据库优化专家入口。用于 Codex CLI 的 $expert-database 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.
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.
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
Process use when you need to work with schema comparison. An agent skill from jeremylongshore/tons-of-skills-marketplace. Comparing Database Schemas is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with schema comparison.
Comparing Database Schemas fits situations like: you need to work with schema comparison; with phrases like compare schemas; sync database schemas.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill comparing-database-schemas -a claude-code`. Or copy the skill folder (skills/.curated/comparing-database-schemas in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/comparing-database-schemas in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill comparing-database-schemas -a codex`. Or copy the skill folder (skills/.curated/comparing-database-schemas in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/comparing-database-schemas 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 comparing-database-schemas -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/comparing-database-schemas, .gemini/skills/comparing-database-schemas, .github/skills/comparing-database-schemas and .opencode/skills/comparing-database-schemas in your project.
Going by SKILL.md and its folder, Comparing Database Schemas needs Python for the scripts in its folder and the command-line tools its instructions call (pg_dump). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*), Bash(mongosh:*). Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md names 3 domains. As links in the text: postgresql.org, github.com and skeema.io. 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.
Comparing Database Schemas 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.2k 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 16 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Comparing Database Schemas: Database Design (MoizIbnYousaf/ai-agent-skills, 1.1k stars), Golang Database (unxed/f4, 243 stars), Database Expert (cin12211/orca-q, 224 stars) and DB Migration (hiromaily/go-crypto-wallet, 128 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.