hexagonal-architecture

hexagonal-architecture is a skill for Claude Code, Codex from PackmindHub/packmind. It costs 70 tokens per session (2,276 once invoked), scanned A, original, Apache-2.0.

A guide to using hexagonal architecture, a way of separating business rules from databases, web services, and other outside systems, in the Packmind monorepo (a repository containing multiple packages).

In plain words
What is it for?
Use it when adding domain entities, use cases, services, repositories, jobs, or event listeners that should follow the repository's established architecture.
Why use it?
It gives developers a shared structure for new domain packages and reduces accidental dependencies between business logic and infrastructure code.

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 when adding domain entities, use cases, services, repositories, jobs, or event listeners that should follow the repository's established architecture.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/packmindhub/packmind/hexagonal-architecture
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 PackmindHub/packmind --skill hexagonal-architecture
Clone the repo
git clone --depth 1 https://github.com/PackmindHub/packmind

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-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/packmindhub/packmind/hexagonal-architecture/github.svg)](https://agentmods.dev/skills/packmindhub/packmind/hexagonal-architecture)
Your own site
<a href="https://agentmods.dev/skills/packmindhub/packmind/hexagonal-architecture"><img src="https://agentmods.dev/badge/skills/packmindhub/packmind/hexagonal-architecture/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.

agentmods 80×15 button for hexagonal-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/packmindhub/packmind/hexagonal-architecture"><img src="https://agentmods.dev/badge/skills/packmindhub/packmind/hexagonal-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,276 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00070 $0.02276
Opus 5.5 $0.00028 $0.00910
Sonnet 5.5 $0.00014 $0.00455
Haiku 4.5 $0.00007 $0.00228

Measured 27d ago against content hash 53c53955d87b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hexagonal-architecture 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 27d 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.

packages/.agents/skills/hexagonal-architecture/SKILL.md · 165 lines

How it starts

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

Hexagonal Architecture - Packmind Monorepo

Architecture Map

Every domain package follows a three-layer hexagonal (ports & adapters) architecture. Dependencies flow inward only: Infrastructure -> Application -> Domain.

packages/{domain}/src/
├── domain/                          # Pure business logic, zero dependencies
│   ├── entities/                    # Domain entities and value objects
│   ├── repositories/                # Repository interfaces (ports)
│   ├── jobs/                        # Delayed job definitions
│   ├── errors/                      # Domain-specific error classes
│   ├── utils/                       # Domain-specific utility functions
│   └── types/                       # Domain-specific type definitions
│
├── application/                     # Orchestration & coordination
│   ├── useCases/{name}/             # One folder per use case
│   │   └── {name}.usecase.ts
│   ├── services/                    # Domain services + service aggregator
│   ├── adapter/                     # Outbound adapter (implements port)
│   ├── listeners/                   # Domain event listeners
│   └── jobs/                        # Delayed job implementations
│
├── infra/                           # Concrete implementations
│   ├── repositories/                # Repository implementations (TypeORM)
│   ├── schemas/                     # TypeORM EntitySchema definitions
│   └── jobs/                        # Job factories
│
└── index.ts                         # Package exports + {Domain}Hexa facade

Layer Details

Layer Depends On Purpose Details
Domain Nothing (pure TS + @packmind/types) Business rules, entity definitions, port interfaces domain-layer.md
Application Domain Use case orchestration, services, adapters, events application-layer.md
Infrastructure Domain + Application Persistence, schemas, job queues infrastructure-layer.md

Read the full file on GitHub · 165 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. 27d ago Changed · +21 lines 53c53955d87b
  2. 28d ago Changed · +31 lines · +18 tokens per session c4fab0ed031f
  3. 1mo ago First seen · 113 lines · 52 tokens per session scan A 3975384cc6c8

Subscribe to this mod's changes

hexagonal-architecture is a skill published in the GitHub repository PackmindHub/packmind (319 stars, last pushed yesterday), licensed Apache-2.0. It adds 70 tokens to every session and 2,276 once invoked, about $0.0003 per session on Opus 5.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-09-03.

Related

Other skills, from other repositories

ce-compound

Document a recently solved problem or durable project vocabulary in docs/solutions/ or CONCEPTS.md. Use when capturing a learning after work.

elleryfamilia/loadout · 32 tokens

ce-work

Execute a plan or concrete work prompt end-to-end. Use when implementing from docs/plans, a spec path, or a clear build request; use ce-debug for open-ended bugs.

elleryfamilia/loadout · 40 tokens

loadout-import-workflow

Import another repo's command/skill suite into loadout as a workflow. Use when the user points at an agent framework, plugin, or command pack (e.g. a GitHub repo, a .claude/commands/ directory, a skills pack) and wants its process turned into a loadout [[workflows]] entry — "import this workflow", "turn this plugin…

elleryfamilia/loadout · 106 tokens

ce-commit-push-pr

Commit, push, and open a PR. Use when asked to ship/open a PR, or for PR-description-only flows like writing, rewriting, or describing a PR body.

elleryfamilia/loadout · 42 tokens

sdd

Execute the Liatrio Spec-Driven Development (SDD) workflow when explicitly invoked by the user. NOTE: this skill is NOT intended to be dynamically loaded or automatically triggered; it should only ever be explicitly called by the user.

liatrio-labs/spec-driven-workflow · 50 tokens

loadout-migrate

Migrate existing global AI agent instructions into loadout. Use when adopting loadout, importing a CLAUDE.md / AGENTS.md / global agent rules into loadout, setting up /.config/loadout/config.toml, or turning prose agent instructions into reusable fragments and stack-targeted profiles.

elleryfamilia/loadout · 64 tokens