
Hexagonal architecture
Gives the agent a layered hexagonal architecture rulebook for ports, adapters and tests
Hexagonal architecture is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 6
- Last commit
- License
- Apache-2.0
- Listing updated
Similar skills
About Hexagonal architecture
This skill is a reference rulebook for structuring code into Domain, Application and Infrastructure layers. It explains which kinds of objects belong in each layer, how ports and adapters separate business logic from external systems, and the dependency rule that keeps dependencies pointing inward.
Beyond the layer definitions, it sets out a directory layout for source, tests and Gherkin specs, plus a mapping of each layer to spec type and test strategy. Domain code is meant to be tested in isolation, application tests mock infrastructure ports, and infrastructure is covered by integration tests against real services such as testcontainers. It also lists common anti-patterns and the enforcement expected at each maturity level.
The skill is written as context for other workflows rather than a standalone tool. It is referenced by planning, issue-work and architecture audit commands in the ffflow plugin, and it expects a project to follow the layer and naming conventions it describes.
When your agent uses it
Domain / Application / Infrastructure layers — ports, adapters, the dependency rule, and how layers map to spec types and test strategies. L1+ reference rulebook.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (6 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the fff plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add zerotechdebt/ffflow
/plugin install fff@ffflowOr copy only this skill to ~/.claude/skills/hexagonal-architecture:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/hexagonal-architecture &&
cp -R "$tmp/plugin/skills/hexagonal-architecture" ~/.claude/skills/hexagonal-architecture &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/hexagonal-architecture inside it instead.
Copy the skill folder to ~/.agents/skills/hexagonal-architecture to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/hexagonal-architecture &&
cp -R "$tmp/plugin/skills/hexagonal-architecture" ~/.agents/skills/hexagonal-architecture &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/hexagonal-architecture inside it instead.
Copy the skill folder to ~/.cursor/skills/hexagonal-architecture to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/hexagonal-architecture &&
cp -R "$tmp/plugin/skills/hexagonal-architecture" ~/.cursor/skills/hexagonal-architecture &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/hexagonal-architecture inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/zerotechdebt/ffflow.git --path plugin/skills/hexagonal-architectureOr copy the folder to ~/.gemini/skills/hexagonal-architecture yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/hexagonal-architecture:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/hexagonal-architecture &&
cp -R "$tmp/plugin/skills/hexagonal-architecture" ~/.copilot/skills/hexagonal-architecture &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/hexagonal-architecture inside it instead.
Get the folder:
git clone --depth 1 https://github.com/zerotechdebt/ffflow.gitThen copy ffflow/plugin/skills/hexagonal-architecture into your agent's skills folder as hexagonal-architecture. Agents that support SKILL.md read one folder per skill.
What it does
- Layer responsibilities
- Defines what belongs in Domain, Application and Infrastructure, from entities and value objects to use cases and adapters.
- Dependency rule
- States that domain knows nothing outward and infrastructure depends on the inner layers, with no exceptions.
- Ports and adapters
- Explains where port interfaces live and how concrete adapters such as repositories and API clients implement them.
- Test strategy per layer
- Maps domain, application, acceptance and infrastructure layers to spec tests, unit tests and integration tests.
- Directory and spec layout
- Gives a folder structure for src, tests and Gherkin specs organised by context and layer.
- Anti-pattern checklist
- Lists common mistakes such as anemic domain models, infrastructure-aware helpers in domain and mocking the domain.
Good for
- Plan the folder structure for a new service split into domain, application and infrastructure
- Review whether a use case imports a concrete database client when it should use a port
- Decide which tests to write for a domain entity versus an infrastructure repository
- Write a port interface for an email or payment service in the application layer
- Audit an existing codebase for layer violations and misplaced adapter types
Hexagonal architecture FAQ
Does Hexagonal architecture run any scripts or tools?
No. It is a reference rulebook with no scripts, and it is loaded as context rather than invoked as a tool.
Which commands use Hexagonal architecture?
The skill names plan-chat, work-issue and the /audit --type architecture command as the workflows that load it as context.
Does Hexagonal architecture require a particular language?
The rules are language-neutral, though examples mention Python and TypeScript test tools such as Hypothesis and fast-check.
Is Hexagonal architecture enforced automatically?
Enforcement depends on the level set in the project. It is recommended at L1, required at L2 when configured, and blocking at L3 through the architecture audit.
How do I install Hexagonal architecture in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/hexagonal-architecture to use it in all your projects, or to .claude/skills/hexagonal-architecture in one project. Or install the fff plugin, which includes it: /plugin marketplace add zerotechdebt/ffflow, then /plugin install fff@ffflow.
Does Hexagonal architecture run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Hexagonal architecture?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Hexagonal architecture?
The closest alternatives to Hexagonal architecture are Architecture foundation, V3 DDD Architecture, Oracle codebase design, TDD and Codebase design.
Where this comes from
- Description: from the skill's own SKILL.md.
More from zerotechdebt/ffflow

Onboards a project onto FFFlow: config, stack setup, then a phased roadmap
- Open source
- 6 GitHub stars
- Developer tools

Runs keep-honest audits on a project and reports drift, stale docs and tech debt
- Open source
- 6 GitHub stars
- Developer tools

Runs another interactive skill unattended, making routine choices from project context
- Open source
- 6 GitHub stars
- Developer tools

Lists and validates the adapter cartridges that FFFlow ports load in a project
- Open source
- 6 GitHub stars
- Developer tools

Extracts a behavioral spec from an unspecified codebase and plans characterization tests
- Open source
- 6 GitHub stars
- Developer tools

Adds GitHub Actions workflows that run FFFlow quality gates on pull requests
- Open source
- 6 GitHub stars
- Developer tools





