Skip to main content
command CX Codex

audit-ports-adapters — Claude Code command for Rust audits

The audit-ports-adapters command audits ports and adapters in Rust code, checking trait placement, implementations, and whether use cases depend on abstractions.

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-ports-adapters.md
Open on GitHub

What audit-ports-adapters does

The command examines a Rust codebase for its use of hexagonal architecture. It locates port traits, reviews where they live and what their signatures contain, maps them to adapter implementations, then checks whether use cases rely on concrete types. You can narrow the audit to a focus area such as repository ports.

Checks cover domain types in port signatures, async I/O operations, and whether adapters implement the ports. The command also searches application code for signs of trait-based dependency injection and references to concrete adapters. Use cases should depend on port traits; a concrete adapter dependency breaks that inversion.

Save the command as .claude/commands/audit-ports-adapters.md to add it to Claude Code. To focus the audit, pass an area after the command name, such as repositories.

What it helps with

  • find port traits declared outside the application layer
  • check port signatures for framework types
  • map ports to their adapter implementations
  • spot use cases coupled to concrete adapters
  • look for mock or in-memory port implementations

Example prompts for the agent

  • Run a full ports-and-adapters audit of this Rust project: /rust:audit-ports-adapters
  • Focus the audit on repository ports: /rust:audit-ports-adapters repositories

How to install audit-ports-adapters

Manually: put the files in place

.claude/commands/audit-ports-adapters.md

Call it with /audit-ports-adapters. For all projects use ~/.claude/commands/

Questions about audit-ports-adapters

How do I install audit-ports-adapters in Claude Code?

Save the command file at .claude/commands/audit-ports-adapters.md.

What does audit-ports-adapters do?

It reviews ports and adapters in Rust code, including trait locations, adapter implementations, and dependencies in use cases.

What does it check in port traits?

It examines signature types, async I/O operations, responsibility boundaries, and framework types in signatures.

Similar slash commands

All slash commands for Programming languages →

From the same set112

The whole set →
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 spec-elicitation spec-elicitation conducts a rigorous interview to turn rough feature concepts into detailed technical specifications before writing code. CX Codex +1 ★ 1,357repo stars project-architect project-architect analyzes project requirements, recommends a tech stack, and scaffolds folder structure for new projects or architecture refactoring. Handles web apps, microservices, monorepos, and backend services. CX Codex ★ 1,357repo stars parallel-tasks parallel-tasks pulls task queues from issue trackers and assigns independent items across multiple parallel agents without file conflicts. CX Codex +1 ★ 1,357repo stars code-reviewer-pro code-reviewer-pro — a Claude Code subagent that reviews code for quality, security and best practices. Runs right after you write or modify code. CX Codex ★ 1,357repo stars audit-env-variables audit-env-variables scans environment variables in a JS/TS codebase, flags unused ones, guesses the service behind each variable name, and maps where it's referenced in code. CX Codex +1 ★ 1,357repo stars

Project sponsors

Companies that keep this analytics open