Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Enforces hexagonal architecture rules for Rust crates and services: domain ports, inbound and outbound adapters, and dependency direction.
64% 86%+23 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 14 of 22 without it.
3 of 3 safety checks passed
112 agent runs
Use this skill whenever you add, change, or review Rust code under crates/** or services/** that touches a crate with src/domain, src/inbound, or src/outbound.
This repository follows the ports-and-adapters / hexagonal style described in Master Hexagonal Architecture in Rust and the howtocodeit/hexarch 3-simple-service branch: domain models + ports + services are the center; inbound and outbound adapters are replaceable shells around that center.
Dependencies point inward:
inbound adapters ──► domain ports/models/services ◄── outbound adapters
composition root ──► inbound + domain service + outbound implementations
domain/ must not depend on inbound/, outbound/, axum, HTTP response types, SQLx pools/queries, AWS SDKs, Redis, reqwest, environment variables, or transport DTOs.inbound/ may depend on domain ports/models/services. It must not own business decisions or persistence/external-service implementation details.outbound/ implements domain ports for databases, S3, HTTP clients, queues, metrics, etc. It must not own use-case policy.src/domain/**)Put the following here:
src/inbound/**)Axum handlers, AI tools, Kafka/listener handlers, lambda handlers, and CLI entrypoints are adapters. Keep them thin:
MacroAuthorizationExtractor, OptionalMacroAuthorizationExtractor, JWT, signed internal header, request context).Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.