hexagonal_review

hexagonal_review is a skill for Claude Code, Codex from EmilLindfors/a2a-rs. It costs 65 tokens per session (1,147 once invoked), scanned A, original, MIT.

A review guide for checking whether a Rust codebase follows hexagonal architecture, also called ports-and-adapters. It examines how business logic is separated from databases, web frameworks, and other outside systems.

In plain words
What is it for?
Use it to audit Rust layers, ports, adapters, errors, feature flags, and testability. It is intended for architecture reviews and checks of ports-and-adapters discipline.
Why use it?
It helps find misplaced dependencies, leaky boundaries, and designs that are difficult to test or change. This prevents technical details from spreading into the core business logic.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to audit Rust layers, ports, adapters, errors, feature flags, and testability. It is intended for architecture reviews and checks of ports-and-adapters discipline.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/emillindfors/a2a-rs/hexagonal_review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add EmilLindfors/a2a-rs --skill hexagonal_review
Clone the repo
git clone --depth 1 https://github.com/EmilLindfors/a2a-rs

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hexagonal_review

README.md
[![agentmods](https://agentmods.dev/badge/skills/emillindfors/a2a-rs/hexagonal_review.svg)](https://agentmods.dev/skills/emillindfors/a2a-rs/hexagonal_review)
Your own site
<a href="https://agentmods.dev/skills/emillindfors/a2a-rs/hexagonal_review"><img src="https://agentmods.dev/badge/skills/emillindfors/a2a-rs/hexagonal_review.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,147 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.01147
Opus 5 $0.00032 $0.00574
Sonnet 5 $0.00013 $0.00229
Haiku 4.5 $0.00006 $0.00115

Measured 7d ago against content hash e3712ca44476, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

hexagonal_review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/plugins/rust-patterns/skills/hexagonal_review/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hexagonal Review (Rust)

Audit a Rust codebase against the ports-and-adapters discipline defined in rules/hexagonal_architecture.md. This skill complements architectural_review (which covers Rust patterns generally) by focusing specifically on layering, boundaries, and dependency direction.

What to inspect

Work through the codebase systematically. For each layer, check:

Domain layer

  • Are domain types free of I/O, async runtimes, and framework imports?
  • Are domain errors defined with thiserror as exhaustive enums?
  • Are invariants enforced at construction (TryFrom, newtypes) rather than re-validated everywhere?
  • Does the domain compile with no feature flags enabled?

Port layer

  • Is each port a narrow capability trait, not a technology trait?
  • Do port method signatures use domain types only — never reqwest::Response, sqlx::Row, axum::extract::*, raw serde_json::Value blobs, or generic byte buffers?
  • Do port return types use the domain error type, not adapter errors or Box<dyn Error> / anyhow::Error?
  • Are sync and async variants both warranted? (Don't duplicate by reflex.)
  • Is the port trait object-safe only if you actually use dyn dispatch on it? If not, drop the constraint and gain flexibility.

Application / service layer

  • Do services depend on port traits only, never on concrete adapter types?
  • Are concrete adapters constructed elsewhere (in main, in a wiring module) and injected into the service?
  • Is the service free of #[cfg(feature = "…")] gates? Feature gating belongs at the adapter boundary.

Adapter layer

  • Are adapters grouped by technical concern (transport/, storage/, auth/) rather than by port name?
  • Does each adapter convert its lower-level errors (reqwest::Error, sqlx::Error) into the domain error before returning across the port boundary?
  • Are framework-specific re-exports at the crate root properly #[cfg(feature = "…")]-gated?
  • Is there an in-memory adapter for every port, available outside #[cfg(test)] so downstream users can test against it too?

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 71 lines · 65 tokens per session scan A e3712ca44476

Subscribe to this mod's changes

hexagonal_review is a skill published in the GitHub repository EmilLindfors/a2a-rs (87 stars, last pushed 2d ago), licensed MIT. It adds 65 tokens to every session and 1,147 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

architecture-audit

Systematic architecture audit and refactoring methodology for Rust + TypeScript codebases. Use when performing refactoring, cleanup, unification, code review, dead code removal, module reorganization, or tech debt elimination. Ensures no naming confusion, semantic overloading, hidden defaults, duplicate logic, or…

org2AI/ORG2 · 70 tokens

rust-review

A Rust code-review skill for services, checking for crashes, unsafe SQL construction, exposed credentials, ignored errors, and unfinished code.

liuyanghejerry/Clausura · 25 tokens

rust-skills

Comprehensive Rust coding guidelines with 265 rules across 26 categories. Use when writing, reviewing, or refactoring Rust code. Covers ownership, error handling, async patterns, concurrency, unsafe code, API design, memory optimization, performance, numeric safety, conversions, serde, pattern matching, macros…

leonardomso/rust-skills · 84 tokens

adversarial-rust

Use this skill when reviewing or refactoring existing Rust code that carries an alien mental model — OO/enterprise ceremony from Java/C#, garbage-collected object graphs, exception-style control flow, or imperative loops ported onto the borrow checker. It is the adversarial, architecture-level counterpart to…

pproenca/dot-skills · 223 tokens

m15-anti-pattern

Use when reviewing code for anti-patterns. Keywords: anti-pattern, common mistake, pitfall, code smell, bad practice, code review, is this an anti-pattern, better way to do this, common mistake to avoid, why is this bad, idiomatic way, beginner mistake, fighting borrow checker, clone everywhere, unwrap in production…

moeru-ai/auv · 101 tokens

unsafe-checker

A review guide for unsafe Rust code and foreign-function interfaces, which let Rust call code written in languages such as C. It covers raw pointers, memory layout, `extern` functions, safety comments, and undefined behavior.

moeru-ai/auv · 120 tokens