Database Schema Guardian

    1

    Prevents catastrophic data loss by enforcing reversible migrations and blocking destructive SQL commands.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    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

    1. Run npx prisma migrate dev --name add_user_bio_and_post_tags to apply the changes to your local environment.
    2. Update your User and Post TypeScript interfaces to reflect the new optional fields.
    3. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Listed2 months ago

    What's inside

    Frequently Asked Questions

    The Schema Guardian acts as a protective middleware that intercepts destructive SQL commands like DROP or TRUNCATE, forcing the agent to instead generate reversible migration scripts with both UP and DOWN functions to ensure your data remains recoverable.

    This skill is designed to work with any LLM-based agent that generates code or SQL, and it provides native support for PostgreSQL, MySQL, and SQLite, as well as ORMs like Prisma and Drizzle.

    Upon purchase, you receive the full skill logic, a set of configuration templates for popular ORMs, and a quick-start guide to integrating the safety rails into your agent's system prompt or tool-calling logic.

    The skill is designed to be plug-and-play; you simply import the logic into your agent's environment and define your target database type to begin enforcing migration safety immediately.

    Yes, while the skill blocks accidental deletions by default, you can bypass the safety locks for intentional schema cleanups by providing a specific manual confirmation string defined in the skill settings.

    New in Data & Databases