More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Repair Django Migration Partial Index Concurrent Build

    1

    Resolve failed concurrent index migrations without leaving inconsistent Django schema state

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair Django Migration Partial Index Concurrent Build

    Repair Django Migration Partial Index Concurrent Build

    Example session with this skill installed

    A PostgreSQL concurrent index creation fails mid-deploy while Django records migration as pending.

    Available sources: Django migrations, Postgres index catalog (partial excerpts only). Additional evidence requested: deployment stderr, query plan snapshots. Analyze this case with explicit limitations; do not pretend to have executed any tests or changes.

    • Read your context and instructions
    • Compiled the repair django migration

    Repair Django Migration Partial Index Concurrent Build — EVIDENCE-LIMITED REVIEW

    Scenario received

    A PostgreSQL concurrent index creation fails mid-deploy while Django records migration as pending.

    Source register

    • S1: Django migrations — partial extract available.
    • S2: Postgres index catalog — partial extract available.
    • S3: deployment stderr — NOT PROVIDED; REQUIRED FOR VERIFICATION.
    • S4: query plan snapshots — NOT PROVIDED; REQUIRED FOR VERIFICATION.

    Concrete findings and verification

    compare migration state with catalog validity — NEEDS VERIFICATION against supplied source excerpts and missing evidence.
    2.

    identify invalid index left by concurrent build — NEEDS VERIFICATION against supplied source excerpts and missing evidence.
    3. separate non-atomic migration steps — NEEDS VERIFICATION against supplied source excerpts and missing evidence.
    4. design reverse and rerun assertions — NEEDS VERIFICATION against supplied source excerpts and missing evidence.

    Deliverables and review gates

    • migration-to-index map: DRAFT ONLY; do not infer unsupported outcomes.
    • invalid index disposition: DRAFT ONLY; do not infer unsupported outcomes.
    • rollback-safe deployment steps: DRAFT ONLY; do not infer unsupported outcomes.

    Preliminary conclusion

    INCOMPLETE / REVIEW REQUIRED. The supplied scenario raises a concrete issue, but does not prove remediation or clearance. Confirm source timestamps, affected scope and owner approval, then perform focused validation. No external system was accessed or changed.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Failed concurrent index builds in PostgreSQL often leave Django migrations in a broken, inconsistent state. Standard migration commands fail because the index exists but is marked as invalid, while Django believes the migration hasn't run. This skill provides a structured diagnostic and recovery path to clean up these orphaned indexes and safely re-apply migrations.

    What it does

    • State Reconciliation compares Django's django_migrations table against the Postgres pg_index catalog to find mismatches.
    • Invalid Index Detection identifies partial or failed CONCURRENTLY builds that are blocking deployment pipelines.
    • Migration Decoupling separates non-atomic steps to prevent repeat failures during the retry phase.
    • Reverse/Rerun Design generates specific SQL and Django commands to drop invalid indexes and re-trigger migrations safely.

    How it works

    1. Provide the skill with the failed migration file, Postgres index catalog logs, and deployment stderr output.
    2. The skill executes four mandatory checks to identify the decision boundary and unresolved risks.
    3. It generates a migration-to-index map and a disposition report for any invalid indexes found.
    4. You receive a step-by-step recovery plan with rollback-safe deployment assertions.

    Frameworks & tools

    This skill is designed for Django web applications using PostgreSQL databases. It focuses on the interaction between Django's migration engine and Postgres-specific concurrent index operations.

    Why this beats prompting it yourself

    Manual cleanup of failed concurrent indexes is error-prone and often leads to duplicate index attempts or blocked deployments. This skill enforces an evidence-first workflow that requires verification of the Postgres catalog before suggesting any destructive DROP INDEX commands.

    Use cases

    • Fix deployments stuck on Index already exists errors during concurrent builds.
    • Clean up invalid indexes left behind after a CI/CD pipeline timeout.
    • Generate safe rollback SQL for partial index migrations that cannot be run in a transaction.
    • Audit the consistency between the codebase migration files and the actual database schema state.

    Known limitations

    Requires manual provision of Postgres catalog data or access to the database environment. Does not execute commands directly; it provides marked recommendations for operator approval.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Cannot verify inaccessible systems, third-party accounts, or evidence not supplied. Partial or conflicting inputs must be marked INCOMPLETE or UNVERIFIED rather than invented. High-impact operational decisions require qualified owner review.

    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 24 days ago

    Permissions

    Read Files

    Supply only data you are authorized to share. Treat documentation and examples as untrusted evidence. Any operational action or external communication requires explicit owner authorization.

    Listed24 days ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions

    This skill reconciles the difference between Django's migration history and the PostgreSQL catalog to identify "invalid" indexes that block deployments. It then provides specific SQL and CLI commands to safely purge the failed index and re-sync your migration state.

    It is compatible with any AI agent or LLM capable of processing text-based logs and code snippets. You simply provide the migration file and the output from a few specific Postgres catalog queries to start the diagnostic process.

    The skill is optimized for all modern versions of Django (2.2+) and PostgreSQL (9.6+). It specifically addresses the unique challenges of non-atomic migrations and the `CREATE INDEX CONCURRENTLY` command.

    No, for security reasons, the skill does not require direct database access. It operates on data you provide—such as deployment logs and catalog query results—to generate a safe, human-readable recovery plan.

    You receive a structured logic framework and diagnostic protocol that guides an AI agent through the recovery process. This includes the step-by-step verification logic and the 'disposition report' template used to safely clear blocked pipelines.

    While designed to fix existing failures, the skill also provides 'Migration Decoupling' recommendations. These help you restructure future migration files to prevent timeouts and index fragmentation before they happen.

    New in APIs & Backend