db-migration — community db-migration, deadtrees, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for FastAPI Agents needing safe and validated database migration workflows with MCP-first database operations. Main FastAPI application for the deadwood backend

Deadwood-ai Deadwood-ai
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The db-migration skill by Deadwood-ai is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Perfect for FastAPI Agents needing safe and validated database migration workflows with MCP-first database operations.

Core Value

Empowers agents to manage database schema changes using local DB MCP, ensuring data consistency and integrity through MCP-only checks and validation, while leveraging FastAPI for robust backend operations.

Capabilities Granted for db-migration

Validating database schema changes
Generating and testing database migrations
Ensuring local and production DB sync using MCP tools

! Prerequisites & Limits

  • Requires MCP tools and local DB MCP setup
  • Limited to FastAPI applications
  • Needs Python environment for execution
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

db-migration

Install db-migration, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

DB Migration Workflow

Purpose

Use this workflow to safely create and validate database migrations in DeadTrees with MCP-first database operations.

Core Rules

  • Never connect to the database directly with Python; use MCP tools.
  • Use local DB MCP (user-deadtrees-local) for schema changes and validation.
  • Before any change, verify local and production DB are in sync using MCP-only checks.
  • Keep test scope fast first: run only relevant, quick tests before broader checks.
  • Ask before committing; do not commit automatically.
  • Never push/apply migrations to production from the agent; production migration application is manual by the user.

Required Workflow

Follow these steps in order.

1) Verify local and production are in sync (MCP-only)

  • Compare local and production schemas via MCP (user-deadtrees-local and user-deadtrees-prod) before making changes.
  • Validate critical objects involved in the migration (tables, views, functions, policies, indexes, triggers).
  • If drift is found, stop and report it before proceeding.

2) Make local dev DB changes via MCP

  • Apply schema/function/policy changes using MCP SQL execution against local DB.
  • Prefer safe SQL patterns:
    • Start with small, targeted statements.
    • Validate affected objects immediately after each change.
  • If view dependencies exist, handle drop/alter/recreate order explicitly.

3) Validate with fast tests and MCP checks

  • Run relevant fast tests only (smallest affected scope first).
  • Follow project testing rules:
    • Use deadtrees CLI for tests.
    • Prefer focused test paths instead of full suites.
  • Review DB behavior with MCP:
    • Check updated schema objects.
    • Run validation queries that prove expected behavior.
    • Confirm no unintended side effects in related tables/views/functions.

4) Fix breakages if found

  • If tests or MCP validation fail, fix code/SQL and re-run step 2.
  • Continue until fast tests pass and MCP validation confirms expected behavior.

5) Export migration

Run:

bash
1PGSSLMODE=disable supabase db diff -f name-of-migration-file
  • Use a descriptive migration file name.
  • Ensure generated migration reflects only intended schema changes.

6) Review migration file

  • Verify SQL ordering and dependency safety.
  • Confirm idempotence expectations and rollback safety where applicable.
  • Ensure no accidental changes are included.

7) Ask to commit

  • Summarize what changed, what was tested, and MCP validation results.
  • Ask user for approval before git add/git commit.
  • Explicitly remind: do not apply/push migration to production; user applies it manually.

Fast-Path Test Selection Guidance

When selecting tests, prefer this order:

  1. Direct unit/integration tests for changed module.
  2. Closely related API/processor test file via --test-path.
  3. Broader suite only if targeted tests indicate cross-cutting impact.

MCP Validation Checklist

Use this checklist before exporting migration:

  • Local object exists and has expected definition.
  • Key queries against changed object return expected results.
  • Related policies/views/functions still work.
  • No obvious regressions in dependent paths.

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is db-migration?

Perfect for FastAPI Agents needing safe and validated database migration workflows with MCP-first database operations. Main FastAPI application for the deadwood backend

How do I install db-migration?

Run the command: npx killer-skills add Deadwood-ai/deadtrees/db-migration. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for db-migration?

Key use cases include: Validating database schema changes, Generating and testing database migrations, Ensuring local and production DB sync using MCP tools.

Which IDEs are compatible with db-migration?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for db-migration?

Requires MCP tools and local DB MCP setup. Limited to FastAPI applications. Needs Python environment for execution.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add Deadwood-ai/deadtrees/db-migration. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use db-migration immediately in the current project.

Related Skills

Looking for an alternative to db-migration or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI