Use when you need framework-agnostic Hexagonal architecture guidance for Java projects - ports and adapters boundaries, application core independence, driving and driven adapters, dependency direction, infrastructure leakage detection, optional architecture tests, and evidence-backed remediation. This should trigger for requests such as Review Hexagonal architecture; Review ports and adapters boundaries; Enforce dependency direction; Add ArchUnit architecture tests; Detect infrastructure leakage
NewMaintained
Automatic
◆Coding pack
Last verified 8/20/2026
What it changes
Passed 18 of 21 test cases with the skill, and 19 of 21 without it.
Without skill91%
With skill86%
Checks it passed that the model alone missed
Proposes introducing an outbound notification port in the core and moving KafkaProducer into a driven adapter
Cites the specific class com.company.domain.NotificationService and import org.apache.kafka.clients.producer.KafkaProducer as evidence of violation
1 fixed18 passed either way1 still failing2 broke
Pass-rate lift
-5 pp
Tokens
+17%
Agent turns
0%
Response time
-29%
Model gemini-3.6-flashMeasured 8/20/2026v119 of 22 cases passed with skill · 21 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
Review this class:
```java
package com.company.domain;
import org.apache.kafka.clients.producer.KafkaProducer;
public class NotificationService {
private KafkaProducer producer;
}
```
How should this finding be reported and fixed?
What was checked, without and with the skill
Checked
Without skill
With skill
Cites the specific class com.company.domain.NotificationService and import org.apache.kafka.clients.producer.KafkaProducer as evidence of violation
Missed
Passed
Proposes introducing an outbound notification port in the core and moving KafkaProducer into a driven adapter
Missed
Passed
case-16 · gemini-3.6-flash · 8/20/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md61 lines2 files
Java Hexagonal architecture boundary review
Help teams review and improve Hexagonal architecture boundaries in Java applications without coupling the guidance to Spring Boot, Quarkus, or Micronaut runtime wiring.
What is covered in this Skill?
Domain independence: entities, value objects, domain services, and domain policies stay free of framework, persistence, web, messaging, and infrastructure APIs
Application/use-case orchestration: use cases coordinate domain behavior through inbound or outbound ports without taking dependencies on concrete adapters
Adapter and infrastructure boundaries: driving adapters call inbound ports, and driven adapters implement outbound ports
Dependency direction checks: package, module, import, Maven module, and test evidence that adapters depend on the core rather than the core depending on adapters
Optional architecture verification: ArchUnit-style rules for Hexagonal boundaries when architecture tests fit the project
Evidence-backed remediation: findings cite concrete classes, imports, dependencies, packages, or tests and propose small boundary-preserving changes
Scope: Framework-agnostic architecture boundary review for Java projects. For Spring Boot, Quarkus, or Micronaut runtime wiring, defer to the matching framework skill. For adding ArchUnit or other Maven dependencies, defer to 111-java-maven-dependencies.
Constraints
Keep recommendations focused on architecture boundaries and dependency direction unless the user explicitly asks for framework runtime implementation. After editing this repository's XML sources, regenerate skills and verify the build.
MANDATORY: Run ./mvnw compile or mvn compile before proposing Java or Maven changes in the same change set
BOUNDARIES: Domain packages must not depend on application, adapter, infrastructure, framework, persistence, web, messaging, or dependency-injection APIs
USE CASES: Application/use-case code may orchestrate domain behavior and depend on inbound/outbound ports, but must not depend on concrete adapter implementations
ADAPTERS: Driving adapters call inbound ports and driven adapters implement outbound ports; adapters must not become shared domain logic or depend on each other unnecessarily
ARCHUNIT OPTIONAL: Treat ArchUnit as an optional verification approach selected when it fits the project; do not require adding it before Hexagonal architecture guidance is useful
DEPENDENCIES: Route Maven dependency evaluation, including ArchUnit dependency additions, to 111-java-maven-dependencies
FRAMEWORK ROUTING: Defer Spring Boot, Quarkus, and Micronaut runtime wiring to the matching framework-specific skill without embedding direct framework skill links in this guidance
VERIFY: Run ./mvnw clean verify or mvn clean verify before promoting changes
EDGE CASE: If package layout, module boundaries, framework ownership, or persistence strategy is ambiguous and affects the review, ask a clarifying question before editing architecture-sensitive code
EDGE CASE: Distinguish confirmed boundary violations from assumptions, conventions inferred from naming, and missing context
Use when reviewing, designing, or modifying Java enterprise systems that process personal data and need GDPR-aware engineering controls. This should trigger for requests such as Review a Java service for GDPR privacy controls; Design data-subject rights workflows; Add retention, deletion, pseudonymization, or privacy-safe logging; Assess data transfer, DPIA, breach evidence, or processor/controller boundary concerns before production release. Part of Plinth Toolkit