RepoGuard positions itself as the "architecture guardian for AI-assisted code," primarily addressing common architectural problems that arise when AI coding assistants rapidly generate code, such as bypassing architectural layering to execute database queries directly, duplicating existing utility functions, abusing type escapes (TypeScript's any, Go's _ = err, Rust's unwrap), and hardcoding sensitive secrets.
Main capabilities:
- 16 built-in architecture rules covering TypeScript, Python, Golang, Rust, and other languages, enabling full audits of repositories as well as real-time audits of uncommitted git diffs.
- A zero-dependency MCP server implementing the three pillars of Tools, Resources, and Prompts, connectable to Claude Desktop, Claude Code, Cursor, and Windsurf. MCP tools include repoguard_audit (full repository audit), repoguard_diff (uncommitted change audit), repoguard_get_rules (returns the 16 rules), and repoguard_fix (analyzes code snippets and returns a refactoring plan); resources include repoguard://rules and repoguard://health; prompts include architectural_review and clean_architecture_refactor.
- The CLI supports audit and fix reports; output does not echo raw source code snippets, and the codeSnippet field in JSON is fixed to a placeholder value to reduce the risk of credential leakage.
- Supports a .repoguardignore file to ignore specified files or directories.
- Provides GitHub Action and SARIF v2.1.0 code scanning integration examples.
Usage:
- Zero-install auditing: audit code snippets in real time via the interactive Playground in the browser.
- Global installation: npm install -g repoguard-rules, then run repoguard audit.
- MCP connection: configure the MCP server in Claude Desktop's claude_desktop_config.json or Cursor's ~/.cursor/mcp.json.
- Note: In v1.7.1, the init command (including --dry-run, --force, --with-ci) is temporarily unavailable; it errors out and exits before scanning or modifying project files, and does not generate context files or CI workflows.
Use cases: teams developing multilingual projects with AI coding assistants, needing to constrain architectural layering and type safety, wanting to detect architecture drift introduced by AI before committing, and needing to integrate architecture auditing into CI pipelines.
Limitations: the init command is temporarily unavailable; scanning does not guarantee detection of all secrets and does not remove committed secrets from git history; MCP prompt templates omit the user when credential patterns are detected; the v1.7.0 Action should not be used for PR comments containing sensitive code.
Pricing: fully free and open source for public repositories and local development; Developer Pro is $12/month, Team is $39/month, and there is a Brazilian PIX payment option of R$ 67 one-time.