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.
npx skills add helmedeiros/clean-code-skills --skill hexagonal-ports-adaptersgit clone --depth 1 https://github.com/helmedeiros/clean-code-skillsWrote 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.
[](https://agentmods.dev/skills/helmedeiros/clean-code-skills/hexagonal-ports-adapters)<a href="https://agentmods.dev/skills/helmedeiros/clean-code-skills/hexagonal-ports-adapters"><img src="https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/hexagonal-ports-adapters/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/helmedeiros/clean-code-skills/hexagonal-ports-adapters"><img src="https://agentmods.dev/badge/skills/helmedeiros/clean-code-skills/hexagonal-ports-adapters.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.00957 |
| Opus 5 | $0.00024 | $0.00478 |
| Sonnet 5 | $0.00010 | $0.00191 |
| Haiku 4.5 | $0.00005 | $0.00096 |
Grade A, and why
hexagonal-ports-adapters 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Hexagonal Architecture: Ports and Adapters
Structure applications around a technology-independent domain core by defining ports (interfaces the domain exposes or requires) and adapters (implementations that connect to specific technologies).
When This Skill Applies
- Business logic is tangled with database, HTTP, or messaging code
- Swapping a technology (database, queue, API provider) requires rewriting business logic
- The user mentions hexagonal architecture, ports and adapters, or clean architecture
- Testing business logic requires spinning up infrastructure
- The codebase has no clear boundary between domain and infrastructure
Core Principle
The domain sits at the center and defines ports — interfaces that describe what it needs from the outside world (driven ports) and what it offers to the outside world (driving ports). Adapters implement these ports for specific technologies. The domain never imports infrastructure code. All dependencies point inward.
Workflow
Step 1: Identify the Domain Core
Determine what the application does independent of any technology. Business rules, validations, calculations, and state machines belong in the domain.
Step 2: Define Driving Ports (Inbound)
These are the use cases the application offers. Define them as interfaces or service methods: PlaceOrder, RegisterUser, GenerateReport. External actors (HTTP controllers, CLI, message consumers) call these.
Step 3: Define Driven Ports (Outbound)
These are the dependencies the domain needs. Define them as interfaces: OrderRepository, PaymentGateway, NotificationSender. The domain calls these; infrastructure implements them.
Step 4: Implement Adapters
Create adapters for each port:
- Driving adapters (inbound): HTTP controllers, GraphQL resolvers, CLI handlers, message consumers.
- Driven adapters (outbound): PostgreSQL repository, Stripe payment gateway, SMTP email sender.
Step 5: Wire at the Composition Root
Connect adapters to ports at the application entry point. The domain never knows which concrete adapter is connected.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 8d ago First seen · 101 lines · 49 tokens per session scan A f87cc3b3cec7
hexagonal-ports-adapters is a skill published in the GitHub repository helmedeiros/clean-code-skills (2 stars, last pushed 6mo ago), licensed MIT. It adds 49 tokens to every session and 957 once invoked, about $0.0002 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-31.
Other skills, from other repositories
drift-testing
Verifies API implementations against OpenAPI specifications using the Drift CLI, catching spec drift and supporting Bi-Directional Contract Testing (BDCT). Use when the user mentions Drift, API contract testing, provider contract testing, provider verification, spec drift, API conformance testing, OpenAPI…
openapi-parser
Parses complex OpenAPI specs and generates Drift test cases from them. Use whenever the user wants to generate, write, or scaffold Drift tests from an OpenAPI spec — especially when the spec contains complex schemas: anyOf/oneOf/allOf, discriminators, polymorphism, inheritance, $ref chains, regex patterns, enums, or…
demographic-modeling
This skill should be used when the user asks to "design a demographic model", "model a person/organisation/role", "design party relationships", "plan identity structures", or "work with demographic archetypes". Covers designing openEHR demographic models using the PARTY hierarchy, roles, capabilities, relationships…
epf-bsp-init
A helper for describing a 1C external report or data processor so it can be added through the platform’s standard “Additional reports and processors” section.
platform-help
A reference skill for the 1C platform and BSL, the programming language used to build 1C business applications. It helps clarify the platform’s object model, APIs, versions, and compatibility.
api-design
Design and review guidance for 1C:Enterprise APIs, which are interfaces that let software components call each other. It covers public and internal interfaces, compatibility, versioning, and moving users to changed interfaces.