db-branching

Automate database branching for isolated schema development across git worktrees.

7|4|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/MadAppGang/magus --skill db-branching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-branching
Source: https://github.com/MadAppGang/magus/tree/main/plugins/dev/skills/backend/db-branching
Command: npx skills add https://github.com/MadAppGang/magus --skill db-branching

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation and management of isolated database branches for each git worktree, preventing schema changes from accidentally affecting production environments.

Core Features & Use Cases

  • Automatic Branching: Creates a unique database fork for every worktree that involves schema modifications.
  • Provider Support: Integrates seamlessly with Neon (recommended), Turso, and Supabase.
  • Use Case: When developing a new feature that requires adding new tables or columns, this skill ensures your schema changes are confined to your worktree's database, keeping production stable.

Quick Start

Use the db-branching skill to create a new worktree for database schema development.

Frequently Asked Questions about db-branching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate database schema changes with git worktrees?

Database branching for git worktrees creates a unique database fork for each worktree, ensuring schema changes remain confined and preventing accidental production impact during feature development.

Does this database branching automation work with Supabase, Neon, and Turso?

Yes, database branching supports Neon, Turso, and Supabase. The system automatically detects your provider and schema tools to manage isolated database forks throughout the worktree lifecycle.

How do I set up a new database branch for a feature worktree?

Setting up a database branch for a feature worktree integrates with the worktree lifecycle to automatically handle creation, setup, and cleanup of worktree-specific database forks without manual configuration.

Why do I need isolated database branches for schema development?

Isolated database branches for schema development prevent schema changes from accidentally affecting production environments, keeping production stable while adding new tables or columns in feature worktrees.

What happens to my database fork when I delete a git worktree?

When you delete a git worktree, the database branching system handles cleanup automatically during the worktree lifecycle phase, removing the worktree-specific database fork to prevent orphaned databases.

Can I use this to prevent accidental production impact during schema migrations?

Yes, database branching prevents accidental production impact during schema migrations by confining schema changes to worktree-specific database forks, keeping your production environment stable.