fernandoteixxeira/stark-bank-challenge/hexagonal-architecture

Claude Code and agent skill by fernandoteixxeira/stark-bank-challenge

Trust tier 3
  • community
Source check pending

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

SKILL.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 the OutputPort interfaces that express what the core needs from outside.
  • application: use cases, commands, orchestration, transaction boundaries, and the InputPort interfaces 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, not VendorSdkPort.
  • 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.

SuffixDirectionWho implements itWho depends on it
InputPortdriven — the way ina use casedriving adapters
OutputPortdriving — the way outdriven adaptersa use case
  • A use case is reached through an InputPort interface 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 OutputPort interfaces. 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 InputPort type, not its class, so injection points cannot resolve to the implementation by accident.
java
// the way in: implemented by the use case, depended on by driving adapters
public interface PlaceOrdersInputPort {
List<PlacedOrder> issue(List<CreateOrderCommand> commands);
}
// the way out: implemented by a driven adapter, composed by the use case
public interface OrderCreatorOutputPort {
List<PlacedOrder> create(List<CreateOrderCommand> commands);
}
public class PlaceOrdersUseCase implements PlaceOrdersInputPort {
private final OrderCreatorOutputPort orderCreator; // composed, not extended
public PlaceOrdersUseCase(OrderCreatorOutputPort orderCreator) {
this.orderCreator = orderCreator;
}
}

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/fernandoteixxeira/stark-bank-challenge/hexagonal-architecture/badge)](https://verified-skill.com/skills/fernandoteixxeira/stark-bank-challenge/hexagonal-architecture)

Something wrong with this skill or its page? Tell us.