fernandoteixxeira/stark-bank-challenge/hexagonal-architecture
Claude Code and agent skill by fernandoteixxeira/stark-bank-challenge
- community
Checking that the SKILL.md file is still in the repository.
Use when designing or refactoring the application with ports and adapters, dependency inversion, use cases, domain isolation, external integrations, persistence boundaries, and testable architecture.
Install
npx vskill@latest install fernandoteixxeira/stark-bank-challenge/hexagonal-architectureSKILL.md
The same SKILL.md was published earlier as fernandoteixxeira/stark-bank-challenge/hexagonal-architecture.
Hexagonal Architecture
Make the domain and application core independent from frameworks, databases, HTTP, and third-party SDKs.
Layers
domain: entities, value objects, domain services, domain errors, and theOutputPortinterfaces that express what the core needs from outside.application: use cases, commands, orchestration, transaction boundaries, and theInputPortinterfaces use cases implement.adapters/in: driving adapters — REST controllers, webhook handlers, CLI, message listeners, schedulers, input generators.adapters/out: driven adapters — persistence, third-party SDK clients, HTTP clients, queues, email, file systems.configuration: framework wiring, bean factories, properties.
Dependency Rule
Dependencies point inward. Adapters depend on application/domain. Domain must not depend on Spring, JPA, HTTP DTOs, SDK models, or generated OpenAPI classes.
Ports
- Name ports by business capability, not technology:
OrderCreatorOutputPort, notVendorSdkPort. - Keep ports small and shaped by use-case needs.
- Convert external DTOs to domain/application types at adapter boundaries.
Naming: Direction Belongs in the Name
Every port declares its direction with a suffix. A bare *Port leaves the reader to work out which way the dependency runs, which is the one thing the name should settle.
| Suffix | Direction | Who implements it | Who depends on it | |
|---|---|---|---|---|
InputPort | driven — the way in | a use case | driving adapters | |
OutputPort | driving — the way out | driven adapters | a use case |
- A use case is reached through an
InputPortinterface and implements it. Driving adapters depend on that interface, never on the use case class, so the entry point is defined by the core rather than discovered by the adapter. - A use case composes
OutputPortinterfaces. Driven adapters implement them. The core declares what it needs; the adapter supplies it. - Both names are read from the core's point of view. Input is what arrives; output is what the core reaches for.
- Wire the use case into the container under its
InputPorttype, not its class, so injection points cannot resolve to the implementation by accident.
The suffix pays off in enforcement, not just in reading. Once direction is in the name, a rule can talk about one direction at a time — for example, forbidding an OutputPort whose name suggests the core is reaching out for something it should have been handed. A bare *Port convention cannot express that without matching implementations by hand.
Keep the capability in the name alongside the suffix. OrderCreatorOutputPort says what it does and which way it faces; StarkBankOutputPort names the provider and will be a lie the day the provider changes.
Testing
- Test domain and use cases without Spring.
- Use adapter tests for serialization, persistence mapping, and SDK integration behavior.
- Use contract tests around webhooks and external clients when payload shape matters.
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 repositoryChecking.skills/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/fernandoteixxeira/stark-bank-challenge/hexagonal-architecture)