rune-db

Generates database migrations with rollback scripts and detects breaking schema changes.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/dangvu008/VietTruyen --skill rune-db-dangvu008
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rune-db
Source: https://github.com/dangvu008/VietTruyen/tree/main/.agents/skills/rune-db
Command: npx skills add https://github.com/dangvu008/VietTruyen --skill rune-db-dangvu008

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Schema changes cause production incidents when migrations lack rollback paths, NOT NULL columns are added without defaults, or columns are renamed silently. This Skill acts as a pre-deploy gate that classifies every schema change as SAFE or BREAKING and generates correct up/down migration files. ## Core Features & Use Cases - Breaking Change Detection: Classifies diffs (drops, renames, type changes, NOT NULL without DEFAULT) and blocks unconfirmed breaking changes. - Migration Generation: Produces paired up and down migration files for Prisma, TypeORM, Django/Alembic, ActiveRecord, or raw SQL. - Index & Query Safety Analysis: Flags missing indexes on foreign keys and detects SQL injection risks from string-interpolated queries. - Use Case: Before deploying a pull request that renames users.created to users.created_at, run this Skill to surface the breaking impact, get confirmation, and receive a migration with a working rollback. ## Quick Start Ask the agent to review the schema changes in your current diff and generate a safe migration with a rollback script.

Frequently Asked Questions about rune-db

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

FAQPage Schema
How do I generate a database migration with a rollback script?

Provide your schema diff and the Skill generates paired up and down migration files matching your detected ORM, such as Prisma, TypeORM, Django, or Alembic. Empty downgrade functions are blocked, so every migration includes a working rollback path.

How to detect breaking schema changes before deployment?

The Skill diffs the current schema against the previous version and classifies each change as SAFE or BREAKING. Drops, renames, type changes, and NOT NULL columns without defaults are flagged as BREAKING and require explicit confirmation before migration generation.

Does it support Prisma, TypeORM, and Django migrations?

Yes, it detects the ORM in use during discovery and generates migration syntax for Prisma, TypeORM, SQLAlchemy/Alembic, Django ORM, ActiveRecord, or raw SQL. If the ORM cannot be determined, it falls back to generic SQL migration format.

Why is adding a NOT NULL column without a default blocked?

Adding a NOT NULL column without a DEFAULT value fails on tables with existing rows because those rows have no value for the new column. The Skill blocks this pattern and explains the failure instead of silently generating a broken migration.

Can it detect SQL injection risks in raw queries?

Yes, it scans migration files and raw SQL for string interpolation in queries and flags each finding as SQL_INJECTION_RISK with file and line location. It recommends parameterized queries with bound placeholders instead.

Does this run migrations in production?

No, the Skill only generates and validates migrations; it never executes them in production. Execution is delegated to a verification step that runs migrations only in a configured test environment.