- Home
- Skills
- Data & Databases
- Big-Tech DB Resilience
Big-Tech DB Resilience
by Hemanth
Enforces non-blocking Postgres/SQL DDL (lock_timeout, NOT VALID/VALIDATE, CONCURRENTLY), atomic guarded updates, and query circuit breakers.
Free
Works with the AI Agents you already use
Big-Tech DB Resilience
Example session with this skill installed
Write a safe production migration to add a NOT NULL constraint, a new status index, and fix a double-claim race condition on our orders table.
- Read your context and instructions
- Compiled the big-tech db resilience
1. Non-Blocking Constraint & Index Migration
- Set
SET LOCAL lock_timeout = '2s';before DDL. - Added check constraint with
NOT VALID, followed byVALIDATE CONSTRAINTin a separate transaction. - Created
CREATE INDEX CONCURRENTLY idx_orders_pending ON orders (created_at) WHERE status = 'pending';.
2. Atomic Race-Condition Fix
Replaced read-then-update logic with single atomic UPDATE orders SET claimed_by = $1, status = 'claimed' WHERE id = $2 AND status = 'open' RETURNING *; so concurrent claims cannot double-succeed.
Connects securely to your tools. The creator never sees your data.
About this skill
Prevent production database lock queues, race conditions, and connection pool starvation.
big-tech-db-resilience embeds production Postgres and MySQL safety patterns directly into your coding agent so schema changes and concurrent writes stay non-blocking under live traffic.
Core Invariants
- Non-Blocking DDL: Prepends
SET LOCAL lock_timeoutand builds indexesCONCURRENTLYto preventAccess Exclusive Lockpileups. - Two-Phase Constraints: Adds constraints
NOT VALIDfirst, then validates without blocking active writes. - Race-Condition Defenses: Enforces atomic conditional
UPDATE ... WHEREguards and optimistic concurrency checks instead of read-then-write bugs. - Query Circuit Breakers: Caps runaway analytical or pool-exhausting queries via
statement_timeoutand lean partial indexes.
Works across Claude Code, Cursor, Codex CLI, Gemini CLI, VS Code Copilot, and Antigravity (SKILL.md open standard). Part of AHR Autonomous Workflow (MIT).
Supports SQL-based RDBMS like PostgreSQL and MySQL. NoSQL is not supported. Concurrent index builds may require execution outside of transaction blocks.
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
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 4 days ago
- Free with an Agensi account
Requires
Nothing to install.
Permissions
What's inside
Frequently Asked Questions
New in Data & Databases
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.