- Home
- Skills
- Data & Databases
- Database Schema Guardian
Database Schema Guardian
Prevents catastrophic data loss by enforcing reversible migrations and blocking destructive SQL commands.
$7
Works with the AI tools you already use
Database Schema Guardian
Example session with this skill installed
Add a bio column to the users table and a tags column to the posts table. Use Prisma.
- Read your context and instructions
- Compiled the database schema guardian
I have generated the reversible Prisma migration for the requested schema changes. I checked the dependencies and confirmed that adding these optional columns will not impact existing foreign key constraints in the users or posts tables.
Prisma Migration: add_user_bio_and_post_tags
// UP: Add optional bio to User and tags to Post
// File: prisma/migrations/20231027_add_bio_and_tags/migration.sql
ALTER TABLE "users" ADD COLUMN "bio" TEXT;
ALTER TABLE "posts" ADD COLUMN "tags" TEXT[] DEFAULT ARRAY[]::TEXT[];
// DOWN: Rollback changes
// File: prisma/migrations/20231027_add_bio_and_tags/rollback.sql
ALTER TABLE "users" DROP COLUMN "bio";
ALTER TABLE "posts" DROP COLUMN "tags";
[Schema Safety Check]
- No destructive commands used
- Reversible migration (UP/DOWN) provided
- Foreign key dependencies verified
- Dry-run query provided (N/A - no data movement)
Next steps
- Run
npx prisma migrate dev --name add_user_bio_and_post_tagsto apply the changes to your local environment. - Update your User and Post TypeScript interfaces to reflect the new optional fields.
- Verify that the UI forms for user profiles include the new bio text area.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
The problem
AI agents often suggest destructive SQL commands or direct schema modifications that lead to data loss and broken foreign key relationships. Developers cannot trust automated tools to handle migrations without risking the integrity of production-like environments.
What it does
- Enforces a strict ban on DROP and TRUNCATE commands without explicit user override.
- Generates mandatory reversible migration scripts containing both UP and DOWN functions.
- Analyzes schema dependencies to identify potential foreign key breaks before they happen.
- Requires dry-run SELECT queries for all complex data transformations to verify accuracy.
Frameworks & tools
Supports SQL (PostgreSQL, MySQL, SQLite) and popular ORMs including Prisma, Drizzle, TypeORM, and Django Migrations.
Why this beats prompting it yourself
Generic prompts often miss the rollback step or ignore the downstream impact on foreign keys. This skill builds a safety rail into the agent's logic, ensuring every change is reversible and verified by default.
Use cases
- Adding new columns to high-traffic production tables safely.
- Renaming legacy database fields using multi-step migration patterns.
- Refactoring database relationships without orphaned records.
- Scaffolding initial schema files for new feature branches.
Known limitations
Requires the user to manually type "I confirm destructive action" to bypass safety locks for intentional deletions.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 7 days ago
- Passed all security checks, Safe to install