- Home
- Skills
- Data & Databases
- ArchGuard — Architecture, SQL & Distributed Math Verifier
ArchGuard — Architecture, SQL & Distributed Math Verifier
Audit backend codebases for circular deps & 12 reliability smells, guard SQL migrations with 3-phase Expand-Contract plans, and compute exact QPS, quorum & tail-latency math.
Free
ArchGuard — Architecture, SQL & Distributed Math Verifier
Example session with this skill installed
Audit this SQL migration for a high-traffic Postgres table: ALTER TABLE orders ADD COLUMN status_code TEXT NOT NULL;
- Read your context and instructions
- Compiled the archguard
I have analyzed the provided SQL migration for PostgreSQL safety. The current DDL will cause production downtime by triggering an Access Exclusive lock while performing a full table rewrite to enforce the NOT NULL constraint on existing rows.
Migration Safety Audit: orders Table
| Risk Level | Finding ID | Issue | Remediation |
|---|---|---|---|
| CRITICAL | DDL-001 | Missing Lock Timeout | Add SET lock_timeout = '3s'; to prevent queueing traffic. |
| HIGH | DDL-002 | Blocking NOT NULL | Cannot add NOT NULL column to existing table in one step. |
| HIGH | DDL-003 | Full Table Rewrite | Adding a column with a constraint locks the table for the duration of the scan. |
Recommended Phase 1 (Expand) Migration
-- Set short timeout to fail fast if table is busy
SET lock_timeout = '3s';
-- 1. Add column as nullable first (Expand)
ALTER TABLE orders ADD COLUMN status_code TEXT;
-- 2. Add constraint as NOT VALID to avoid immediate validation scan
ALTER TABLE orders ADD CONSTRAINT status_code_check
CHECK (status_code IS NOT NULL) NOT VALID;
Next steps
- Deploy Phase 1 and update the application code to dual-write the new column.
- Run a background worker to backfill
status_codefor existing rows. - Execute
ALTER TABLE orders VALIDATE CONSTRAINT status_code_check;once backfill is complete.
Connects securely to your tools. The creator never sees your data.
About this skill
ArchGuard turns Claude Code, Cursor, Copilot, Antigravity, and Codex into a Staff-level backend reviewer backed by deterministic analysis and zero-dependency tooling:
- Codebase Architecture Drift & Production Reliability Audit
- Builds multi-language import graphs (JS/TS/Python/C++/Java/Go) and detects circular dependencies with Tarjan's O(V+E) SCC algorithm + Robert C. Martin coupling metrics (Ca/Ce/I) and Mermaid dependency graphs.
- Flags 12 production anti-patterns: N+1 DB/network calls inside loops, outbound HTTP calls missing timeouts, unbounded in-memory Map/Set caches, check-then-act races, missing Idempotency-Key guards on payment/order routes, SQL/command injection, weak Math.random() tokens, empty catches, layer violations, and God modules.
- Zero-Downtime SQL Migration Guardian (Expand-Contract)
- Audits PostgreSQL, MySQL, and SQLite DDL for table locks and rolling-deploy hazards (CREATE INDEX without CONCURRENTLY, DROP/RENAME COLUMN, ADD COLUMN NOT NULL without default, ALTER COLUMN TYPE rewrites, unvalidated constraints, missing lock_timeout).
- Auto-generates a safe 3-phase Expand-Contract rollout plan.
- Deterministic Distributed Systems Math & Simulators
- Exact QPS, 5-year storage, ingress/egress Gbps, Redis RAM, dominant shard bottlenecks, and Little's Law concurrency (with Big Tech presets: TinyURL, Twitter, WhatsApp, Uber, YouTube, Stripe).
- Exact Dynamo quorum (W+R>N), Raft odd-cluster fault tolerance, Jeff Dean fanout tail-latency amplification (1-(1-p)^K) with hedged RPCs, and FNV-1a consistent hashing skew/remap simulations.
Works standalone via the bundled Staff-level reference playbooks or paired with the free hosted Streamable HTTP MCP server (https://arch-guard-mcp.yashwant938.workers.dev/mcp) and open-source stdio server (https://github.com/yashwant938/arch-guard-mc).
Local repository scanning requires the ArchGuard MCP server setup via Node.js. Capacity math uses standard presets and statistical simulations which may vary from specific cloud provider overheads.
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 16 days ago
- Free with an Agensi account
Permissions
What's inside
Creator
yashwant rana
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.