# Schema Foreign Key Repair Planner AI

> Inventory orphan references and plan non-destructive repairs. Built for database engineers and platform teams, with

Schema Foreign Key Repair Planner AI is a paid AI agent skill on Agensi by Pitiko Studio. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [Pitiko Studio](https://www.agensi.io/creators/pitikostudio)
- Version: 1.0
- Last updated: 2026-11-28
- Security: scan passed (2026-11-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/schema-foreign-key-repair-planner-ai
- Tags: database-engineering, database-change-assurance, schema, foreign, key, evidence-based

## About this skill

Schema migrations and foreign key constraints are high-risk operations that often fail due to unexpected orphan records or locking issues. This skill provides a structured framework for database engineers to inventory broken references and design non-destructive repair plans. It replaces guesswork with an evidence-based ledger that links every repair action to specific source data.

### What it does
- **Inventory orphan references** by identifying records that violate referential integrity without a valid parent.
- **Generate repair plans** using non-destructive sequences that prioritize data safety and uptime.
- **Track evidence status** through a ledger that connects every proposed change to observed source records.
- **Analyze lock impacts** by evaluating how schema changes will affect transaction and replication traces.
- **Define rollback criteria** for every material recommendation to ensure a safe exit path.

### How it works
1. Provide the affected schema items, current/target states, and a representative source record or query plan.
2. The skill normalizes identifiers and establishes transaction semantics based on your database engine and version.
3. It generates an evidence and status ledger, marking items as observed, derived, or conflicted.
4. It performs a boundary check to identify missing evidence or potential edge cases in the migration sequence.

### Frameworks & tools
Built for database platform teams working with SQL-based systems. It supports analysis for specific engine versions by referencing official documentation and SQL standard guidance when public URLs are provided.

### Why this beats prompting it yourself
Generic prompts often suggest destructive `DELETE` or `TRUNCATE` operations that ignore replication lag or application logic. This skill enforces a strict evidence-based methodology that requires transaction impact analysis and explicit rollback conditions for every proposed change.

### Use cases
- Planning the introduction of a new foreign key constraint on a legacy table with dirty data.
- Identifying and documenting orphan records across microservice database boundaries.
- Preparing a reviewable migration plan for a high-traffic production schema change.
- Creating reproducible SQL fixtures for testing schema repairs in disposable environments.

### Known limitations
Does not execute mutating SQL or perform live database writes. It cannot verify query timings or backup integrity unless that data is explicitly supplied in the context.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Schema Foreign Key Repair Planner AI skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does Schema Foreign Key Repair Planner AI do?

Inventory orphan references and plan non-destructive repairs. Built for database engineers and platform teams, with

### Which AI agents support Schema Foreign Key Repair Planner AI?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use Schema Foreign Key Repair Planner AI?

Connect your AI agent to Agensi through MCP, then ask it to use Schema Foreign Key Repair Planner AI on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
