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

ArchGuard — Architecture, SQL & Distributed Math Verifier is a free AI agent skill on Agensi by yashwant rana, in Data & Databases. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [yashwant rana](https://www.agensi.io/creators/yashwant-rana)
- Category: [Data & Databases](https://www.agensi.io/skills/data-databases)
- Version: 1.0
- Last updated: 2026-11-19
- Security: scan passed (2026-11-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/archguard-architecture-sql-distributed-math-verifier
- Tags: api, code-review, database, architecture, sql-migrations, expand-contract, distributed-systems, reliability

## 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:

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

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

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

## Known limitations

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 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 ArchGuard — Architecture, SQL & Distributed Math Verifier skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific architectural risks does the Arch Guard Backend Verifier prevent?

This skill identifies production-breaking issues like circular dependencies, N+1 query loops, and unsafe SQL migrations that often bypass standard linters or generic LLM reviews.

### Which AI agents or IDEs are compatible with this skill?

The skill is compatible with any AI agent that supports the Model Context Protocol (MCP), though it is specifically optimized for developers using ArchGuard-enabled environments for static analysis.

### Can I use this to verify zero-downtime migrations for high-traffic databases?

Yes, the SQL migration gating tool specifically validates DDL for the Expand-Contract pattern, ensuring your Postgres, MySQL, or SQLite migrations don't lock tables or cause downtime.

### Does this skill require any external tools or local setup to function?

To get the most out of this skill, you will need to install the ArchGuard MCP server locally to allow the agent to perform deterministic static analysis on your repository.

### How does this compare to simply asking a standard LLM to review my code?

Unlike generic prompts, this skill uses graph cycle detection and formal capacity planning math to provide precise, verifiable feedback rather than just 'plausible' sounding advice.

### What exactly is included in the Arch Guard Backend Verifier package?

The purchase includes the full suite of backend auditing tools, including architectural scanning, SQL safety verification, and distributed system capacity simulators.

---

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.
