Official agent skill

Database Migrations

by langchain-ai in langchain-ai/skills-benchmarks

Database migration patterns and schema versioning. An agent skill from langchain-ai/skills-benchmarks.

OfficialMITAuto-check passedDatabases

Install Database Migrations

skills CLI
$ npx skills add langchain-ai/skills-benchmarks --skill database-migrations -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install langchain-ai/skills-benchmarks database-migrations --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/langchain-ai/skills-benchmarks.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/noise/database_migrations .claude/skills/database-migrations && rm -rf skills-src

Use ~/.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/

Facts

Skill name
database-migrations
GitHub stars
118
Token cost
~350 tokens
SKILL.md length
60 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Database migration patterns and schema versioning. An agent skill from langchain-ai/skills-benchmarks.

  • Works in 5 steps: Always include rollback (down) migrations → Never modify existing migrations -… → Test migrations on a copy of production… → …
  • Tasks that involve Database migrations
  • SKILL.md covers Migration File Structure, Writing Safe Migrations and Best Practices
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Database Migrations is an agent skill from langchain-ai/skills-benchmarks, published by the product's own GitHub organization. Database migration patterns and schema versioning

Its SKILL.md is about 350 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Database migrations. The licence is MIT.

When your agent uses it

  • Tasks that involve Database migrations

Example prompts

  • “/database-migrations”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Always include rollback (down) migrations
  2. Never modify existing migrations - create new ones
  3. Test migrations on a copy of production data
  4. Use transactions for atomic changes
  5. Add indexes concurrently in production: CREATE INDEX CONCURRENTLY

What it can do on your machine

Read from SKILL.md and the folder at commit 9195f8c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are sql).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Database Migrations loads about 350 tokens when it runs. Until then it costs about 17 tokens; SKILL.md has 60 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~17
When it runs · the whole SKILL.md, loaded when a task matches
~350

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.

Safety

Auto-check passed

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from langchain-ai/skills-benchmarks at commit 9195f8c, republished under its MIT licence (© langchain-ai). 60 words, ~350 tokens.

Download SKILL.mdSave it as .claude/skills/database-migrations/SKILL.md (or your agent's skills folder).
name
database-migrations
description
Database migration patterns and schema versioning

Database Migration Patterns

Manage database schema changes safely and reliably.

Migration File Structure

migrations/
  001_create_users.sql
  002_add_email_index.sql
  003_create_orders.sql

Writing Safe Migrations

Adding Columns
sql
-- migrations/004_add_user_status.sql
-- Up
ALTER TABLE users ADD COLUMN status VARCHAR(20) DEFAULT 'active';
CREATE INDEX idx_users_status ON users(status);

-- Down
DROP INDEX idx_users_status;
ALTER TABLE users DROP COLUMN status;
Creating Tables
sql
-- migrations/005_create_audit_log.sql
-- Up
CREATE TABLE audit_log (
    id SERIAL PRIMARY KEY,
    table_name VARCHAR(100) NOT NULL,
    record_id INTEGER NOT NULL,
    action VARCHAR(20) NOT NULL,
    changed_by INTEGER REFERENCES users(id),
    changed_at TIMESTAMP DEFAULT NOW(),
    old_values JSONB,
    new_values JSONB
);

CREATE INDEX idx_audit_log_table ON audit_log(table_name, record_id);
CREATE INDEX idx_audit_log_time ON audit_log(changed_at);

-- Down
DROP TABLE audit_log;

Best Practices

  1. Always include rollback (down) migrations
  2. Never modify existing migrations - create new ones
  3. Test migrations on a copy of production data
  4. Use transactions for atomic changes
  5. Add indexes concurrently in production: CREATE INDEX CONCURRENTLY

© langchain-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/noise/database_migrations of langchain-ai/skills-benchmarks.

Open the folder on GitHubat commit 9195f8c

Compare with similar skills

Database Migrations 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.

Database Migrations compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Database Migrations this skilllangchain-ai/skills-benchmarks118—~350Automated safety check: PassMIT
Evolving The Data ModelTriliumNext/Trilium38k—~2.1kAutomated safety check: PassAGPL-3.0
Creating Database MigrationsNangoHQ/nango13k—~449Automated safety check: PassCustom licence
Openwrt Package UpdateNethServer/nethsecurity191—~841Automated safety check: PassCustom licence
Free Willsyahiidkamil/Software-Engineer-AI-Agent-Atlas401—~3.4kAutomated safety check: PassNone
Ecto Migrationsoperately/operately577—~1.2kAutomated safety check: PassCustom licence

Similar skills

  • Evolving The Data Model

    TriliumNext/Trilium

    A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…

    38k GitHub stars~2.1k tokensUpdated today
    DatabasesAuto-check passed
  • A skill your agent uses when adding or editing Nango database migrations - covers migration directory selection, timestamped .cjs naming, matching recent migration style, down migration decisions…

    13k GitHub stars~449 tokensUpdated today
    DatabasesAuto-check passed
  • Openwrt Package Update

    NethServer/nethsecurity

    A skill your agent uses when updating any forked OpenWrt package in a NethSecurity workspace from the upstream openwrt/packages feed.

    191 GitHub stars~841 tokensUpdated today
    DatabasesAuto-check passed
  • Free Will

    syahiidkamil/Software-Engineer-AI-Agent-Atlas

    Deliberate-choice procedure for a medium-to-high-stakes engineering fork — when the first plausible solution (the instinct, the default next-token pull) would be costly to get wrong.

    401 GitHub stars~3.4k tokensUpdated 3 mo ago
    DatabasesAuto-check passed
  • Ecto Migrations

    operately/operately

    Rules for Operately schema migrations (app/priv/repo/migrations/) and data migrations (app/lib/operately/data/change.ex).

    577 GitHub stars~1.2k tokensUpdated yesterday
    DatabasesAuto-check passed
  • DB Migrate

    simstudioai/sim

    Author or review a Drizzle DB migration for zero-downtime safety — expand/contract phasing, backward-compatibility with the deployed app version, and writing the -- migration-safe acknowledgment the…

    30k GitHub stars~2k tokensUpdated today
    DatabasesAuto-check passed

More from langchain-ai/skills-benchmarks

All 8 skills in this repo
  • Framework Selection

    langchain-ai/skills-benchmarks

    Official

    INVOKE THIS SKILL at the START of any LangChain/LangGraph/Deep Agents project, before writing any agent code.

    118 GitHub stars~1.8k tokensUpdated 17 days ago
    Auto-check passed
  • Langchain Agents

    langchain-ai/skills-benchmarks

    Official

    Build LangChain agents with modern patterns. An agent skill from langchain-ai/skills-benchmarks.

    118 GitHub stars~2.5k tokensUpdated 17 days ago
    Auto-check passed
  • Langchain Oss Primer

    langchain-ai/skills-benchmarks

    Official

    ALWAYS START HERE for any LangChain, Deep Agents, or LangGraph agent building project.

    118 GitHub stars~4.1k tokensUpdated 17 days ago
    Auto-check passed
  • React Components

    langchain-ai/skills-benchmarks

    Official

    Modern React component patterns with hooks and TypeScript. An agent skill from langchain-ai/skills-benchmarks.

    118 GitHub stars~437 tokensUpdated 17 days ago
    Auto-check passed
  • Testing Patterns

    langchain-ai/skills-benchmarks

    Official

    Unit testing and integration testing best practices. An agent skill from langchain-ai/skills-benchmarks.

    118 GitHub stars~447 tokensUpdated 17 days ago
    Auto-check passed
  • API Docs

    langchain-ai/skills-benchmarks

    Official

    OpenAPI documentation and REST API design patterns. An agent skill from langchain-ai/skills-benchmarks.

    118 GitHub stars~358 tokensUpdated 17 days ago
    Auto-check passed

Categories

Questions about Database Migrations

What does Database Migrations do?

Database migration patterns and schema versioning. An agent skill from langchain-ai/skills-benchmarks. Database Migrations is an agent skill from langchain-ai/skills-benchmarks, published by the product's own GitHub organization.

When should I use Database Migrations?

Database Migrations fits situations like: tasks that involve Database migrations.

How do I install Database Migrations in Claude Code?

Run `npx skills add langchain-ai/skills-benchmarks --skill database-migrations -a claude-code`. Or copy the skill folder (skills/noise/database_migrations in langchain-ai/skills-benchmarks) into .claude/skills/database-migrations in your project. Claude Code loads it when a task matches its description.

How do I install Database Migrations in Codex?

Run `npx skills add langchain-ai/skills-benchmarks --skill database-migrations -a codex`. Or copy the skill folder (skills/noise/database_migrations in langchain-ai/skills-benchmarks) into .agents/skills/database-migrations in your project. Codex loads it when a task matches its description.

Can I use Database Migrations in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add langchain-ai/skills-benchmarks --skill database-migrations -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/database-migrations, .gemini/skills/database-migrations, .github/skills/database-migrations and .opencode/skills/database-migrations in your project.

What does Database Migrations need to run?

SKILL.md names no scripts, command-line tools or credentials: Database Migrations is instructions for the agent only.

Does Database Migrations access the network?

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.

Is Database Migrations safe to install?

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. Review the folder before installing.

What licence does Database Migrations use?

Database Migrations is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Database Migrations use?

About 350 tokens (SKILL.md is roughly 1.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Database Migrations?

Skills that share tags, products or a category with Database Migrations: Evolving The Data Model (TriliumNext/Trilium, 38k stars), Creating Database Migrations (NangoHQ/nango, 13k stars), Openwrt Package Update (NethServer/nethsecurity, 191 stars) and Free Will (syahiidkamil/Software-Engineer-AI-Agent-Atlas, 401 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Database Migrations?

langchain-ai (a GitHub organization, an official publisher) maintains it in langchain-ai/skills-benchmarks, which has 118 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 21, 2026.

Source: langchain-ai/skills-benchmarks on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.