- 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 Agents 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.
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.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.
Destructive actions require a manual text confirmation override. Complex multi-step migrations for renames must be reviewed for application-level logic changes.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 months ago
Permissions
No special permissions declared or detected