Skip to main content
command CX Codex

audit-layer-boundaries — Claude Code command

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

no license ★ 1,357 updated 2026-03-01

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/audit-layer-boundaries.md
Open on GitHub

What audit-layer-boundaries 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.

What it helps with

  • 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 for the agent

  • /rust:audit-layer-boundaries
  • /rust:audit-layer-boundaries src/core/
  • Review architectural layer boundaries in src/domain/ using /rust:audit-layer-boundaries

How to install audit-layer-boundaries

Manually: put the files in place

.claude/commands/audit-layer-boundaries.md

Call it with /audit-layer-boundaries. For all projects use ~/.claude/commands/

Questions about audit-layer-boundaries

How to install audit-layer-boundaries in Claude Code?

Place the command markdown definition into .claude/commands/audit-layer-boundaries.md inside your workspace.

What does audit-layer-boundaries do?

It audits Rust codebases to locate architectural boundary violations between domain, application, adapter, and infrastructure code.

Which tools does the command require?

It uses Claude Code permissions for Read, Glob, Grep, and Bash to inspect Rust files.

Similar slash commands

All slash commands for Code review and refactoring →

From the same set112

The whole set →
handoff-continue handoff-continue writes a handoff document about the current work and starts a fresh Claude session in a Zellij pane with that document as its input. CX Codex +1 ★ 1,357repo stars decision-navigator decision-navigator structures complex choices, scores trade-offs, and quantifies risk factors. Useful when you need to assess the reversibility and consequences of technical plans. CX Codex ★ 1,357repo stars dependency-mapper The dependency-mapper command connects code dependencies, Linear tasks, and Git history into project maps. Use it to spot cycles, blockers, and task order. CX Codex +1 ★ 1,357repo stars test-engineer test-engineer writes unit, integration and end-to-end tests for the code you just finished, then reports coverage by line, branch and function. Useful when a feature works but nothing guards it. CX Codex ★ 1,357repo stars skill-generator-agent skill-generator-agent turns a skill spec into files on disk: SKILL.md, helper scripts, reference docs. Then it checks frontmatter and layout. CX Codex ★ 1,357repo stars milestone-tracker milestone-tracker aggregates milestone data from Linear, GitHub, and git history to calculate burn-down velocity and spot schedule risks. CX Codex +1 ★ 1,357repo stars audit-dependencies audit-dependencies audits dependency direction in Rust projects and flags layer violations. Use it when reviewing architecture or preparing a refactor. CX Codex +1 ★ 1,357repo stars build-skill build-skill walks a new Claude skill through four agents: requirement questions, file generation, validation, docs. You approve the spec before any file appears. CX Codex +1 ★ 1,357repo stars

Project sponsors

Companies that keep this analytics open