# audit-layer-boundaries

audit-layer-boundaries analyzes architectural layer boundaries in Rust projects. It catches mixed responsibilities, misplaced database logic, and boundary leaks.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 1357 repo stars
- Author: Quintin Henry (https://github.com/qdhenry/)
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/qdhenry/Claude-Command-Suite/tree/HEAD/.claude/commands/rust/audit-layer-boundaries.md
- Updated: 2026-03-01
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/audit-layer-boundaries

## What it does

The command maps your `src/` modules against four architectural tiers: domain, application, adapters, and infrastructure. It guides the agent through inspecting code organization with shell search utilities to locate boundary infractions.

Inside the domain layer, it flags serialization derives, HTTP request types, and raw database annotations. For the application layer, it flags direct SQL execution and framework routing that should live in adapters. Adapters are inspected for complex business validation, while infrastructure files are checked for leaked handlers.

The routine executes standard `bash`, `grep`, and `find` commands under the hood. Claude Code requires terminal execution access to run these checks against the source tree.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/audit-layer-boundaries.md` — Call it with /audit-layer-boundaries. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/audit-layer-boundaries.md` — Call it with /prompts:audit-layer-boundaries. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/audit-layer-boundaries.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/audit-layer-boundaries.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/qdhenry/Claude-Command-Suite/tree/HEAD/.claude/commands/rust/audit-layer-boundaries.md

## When to use it
- detect framework types and database queries leaking into domain entities
- spot business rules misplaced inside HTTP or storage adapters
- audit clean architecture separation across a Rust repository
- find direct persistence calls that bypass application port traits

## Example prompts
- /rust:audit-layer-boundaries
- /rust:audit-layer-boundaries src/core/
- Review architectural layer boundaries in `src/domain/` using `/rust:audit-layer-boundaries`

## Similar
- [architecture-review](https://affpapa.org/en/nevibecode/skills/decebals-architecture-review.md) — skill · 394 installs
- [arch-check](https://affpapa.org/en/nevibecode/skills/arch-check.md) — skill · 3900 installs
- [clean-architecture](https://affpapa.org/en/nevibecode/skills/pproenca-clean-architecture.md) — skill · 2100 installs
- [arxitect](https://affpapa.org/en/nevibecode/plugins/arxitect.md) — plugin · ★ 67 repo stars
- [shadcn-component-boundaries](https://affpapa.org/en/nevibecode/skills/shadcn-component-boundaries.md) — skill · 5700 installs
- [domain-model-boundaries-mapper](https://affpapa.org/en/nevibecode/skills/domain-model-boundaries-mapper.md) — skill · 270 installs

From the same set: [qdhenry/claude-command-suite](https://affpapa.org/en/nevibecode/by/qdhenry/claude-command-suite.md) — 112 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
