harleybartles/agent-asset-marketplace/hexagonal-architecture
Claude Code and agent skill by harleybartles/agent-asset-marketplace
- community
Checking that the SKILL.md file is still in the repository.
Use when isolating domain logic from frameworks, UI, and databases through ports and adapters. Do not use when the domain is trivial or the project is a thin framework wrapper.
Install
npx vskill@latest install harleybartles/agent-asset-marketplace/hexagonal-architectureSKILL.md
The same SKILL.md was published earlier as harleybartles/agent-asset-marketplace/hexagonal-architecture.
Hexagonal Architecture
Overview
Place domain logic at the center of the application and connect it to the outside world through explicit ports and adapters, so the core remains framework-agnostic.
When to Use
- The application must stay independent of databases, web frameworks, messaging systems, and external APIs.
- You need to test business rules with fake or in-memory adapters instead of real infrastructure.
- You want to swap a primary actor such as a UI, CLI, or test harness, or a secondary actor such as a database or service, without touching domain code.
- Do not use when the domain is trivial or the project is a thin framework wrapper.
Core Pattern
Define ports as interfaces the domain needs to interact with the outside world. Implement each port with one or more adapters:
- Primary (driving) adapters call the domain: REST controllers, CLI handlers, event consumers, and test fixtures.
- Secondary (driven) adapters are called by the domain: repositories, notification services, and external APIs.
The domain declares what it needs; adapters satisfy those needs. Dependencies cross the port boundary only in the direction that leaves the domain untouched.
Common Mistakes
- Building adapters that bypass the ports and call domain objects directly. Fix by routing all outside interaction through the declared port interfaces.
- Allowing frameworks to leak into application or domain code. Keep framework-specific annotations, SDK types, and configuration in adapter implementations.
- Confusing hexagonal architecture with clean or onion architecture. All three isolate the domain; hexagonal emphasizes ports and adapters as the concrete integration mechanism, while clean adds a layered dependency rule and onion uses concentric layers with dependency inversion.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/hexagonal-architecture/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/harleybartles/agent-asset-marketplace/hexagonal-architecture)