Java Design Patterns Reference
decebals/claude-code-java
A practical Java reference for Builder, Factory, Singleton, Strategy, Observer and other patterns, with a table matching problems to patterns.
Agent skill
by Gentleman-Programming in Gentleman-Programming/Gentleman-Skills
Hexagonal architecture layering for Java services with strict boundaries.
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill hexagonal-architecture-layers-java -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills hexagonal-architecture-layers-java --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/community/hexagonal-architecture-layers-java .claude/skills/hexagonal-architecture-layers-java && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "hexagonal-architecture-layers-java" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/hexagonal-architecture-layers-java into .claude/skills/hexagonal-architecture-layers-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hexagonal-architecture-layers-java", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/hexagonal-architecture-layers-javaType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill hexagonal-architecture-layers-java -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills hexagonal-architecture-layers-java --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/community/hexagonal-architecture-layers-java .agents/skills/hexagonal-architecture-layers-java && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "hexagonal-architecture-layers-java" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/hexagonal-architecture-layers-java into .agents/skills/hexagonal-architecture-layers-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hexagonal-architecture-layers-java", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill hexagonal-architecture-layers-java -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills hexagonal-architecture-layers-java --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/community/hexagonal-architecture-layers-java .cursor/skills/hexagonal-architecture-layers-java && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "hexagonal-architecture-layers-java" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/hexagonal-architecture-layers-java into .cursor/skills/hexagonal-architecture-layers-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hexagonal-architecture-layers-java", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Gentleman-Programming/Gentleman-Skills.git --path community/hexagonal-architecture-layers-java--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill hexagonal-architecture-layers-java -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills hexagonal-architecture-layers-java --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/community/hexagonal-architecture-layers-java .gemini/skills/hexagonal-architecture-layers-java && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "hexagonal-architecture-layers-java" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/hexagonal-architecture-layers-java into .gemini/skills/hexagonal-architecture-layers-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hexagonal-architecture-layers-java", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Gentleman-Programming/Gentleman-Skills hexagonal-architecture-layers-javaInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill hexagonal-architecture-layers-java -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/community/hexagonal-architecture-layers-java .github/skills/hexagonal-architecture-layers-java && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "hexagonal-architecture-layers-java" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/hexagonal-architecture-layers-java into .github/skills/hexagonal-architecture-layers-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hexagonal-architecture-layers-java", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Gentleman-Programming/Gentleman-Skills --skill hexagonal-architecture-layers-java -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Gentleman-Programming/Gentleman-Skills hexagonal-architecture-layers-java --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Gentleman-Programming/Gentleman-Skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/community/hexagonal-architecture-layers-java .opencode/skills/hexagonal-architecture-layers-java && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "hexagonal-architecture-layers-java" agent skill from https://github.com/Gentleman-Programming/Gentleman-Skills/tree/main/community/hexagonal-architecture-layers-java into .opencode/skills/hexagonal-architecture-layers-java/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hexagonal-architecture-layers-java", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
hexagonal-architecture-layers-javaHexagonal architecture layering for Java services with strict boundaries.
Hexagonal Architecture Layers Java is an agent skill from Gentleman-Programming/Gentleman-Skills. Hexagonal architecture layering for Java services with strict boundaries. Trigger: When structuring Java apps by Domain/Application/Infrastructure, or refactoring toward clean architecture.
Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Design patterns and Refactoring. It works with Java. The repository describes itself as: Community-driven AI agent skills for Claude Code, OpenCode, and other AI assistants. Curated patterns and community contributions. The licence is MIT.
Read from SKILL.md and the folder at commit c8036a3. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are java).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
alistair.cockburn.usoreilly.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Hexagonal Architecture Layers Java loads about 1k tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 163 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Gentleman-Programming/Gentleman-Skills at commit c8036a3, republished under its MIT licence (© Gentleman-Programming). 163 words, ~1,004 tokens.
.claude/skills/hexagonal-architecture-layers-java/SKILL.md (or your agent's skills folder).Load this skill when:
Domain has no framework annotations, no persistence concerns, and no I/O.
Application defines use cases and ports, calling domain logic and delegating I/O to ports.
Infrastructure implements ports and wires adapters (controllers, repositories, clients).
package com.acme.order.domain;
public record OrderId(String value) { }
public final class Order {
private final OrderId id;
private final Money total;
public Order(OrderId id, Money total) {
this.id = id;
this.total = total;
}
public OrderId id() { return id; }
public Money total() { return total; }
}package com.acme.order.application.port;
import com.acme.order.domain.Order;
import com.acme.order.domain.OrderId;
public interface OrderRepositoryPort {
OrderId nextId();
void save(Order order);
}package com.acme.order.application.usecase;
import com.acme.order.application.port.OrderRepositoryPort;
import com.acme.order.domain.Order;
import com.acme.order.domain.OrderId;
import com.acme.order.domain.Money;
public interface PlaceOrderUseCase {
OrderId place(Money total);
}
public final class PlaceOrderService implements PlaceOrderUseCase {
private final OrderRepositoryPort repository;
public PlaceOrderService(OrderRepositoryPort repository) {
this.repository = repository;
}
@Override
public OrderId place(Money total) {
OrderId id = repository.nextId();
Order order = new Order(id, total);
repository.save(order);
return id;
}
}package com.acme.order.infrastructure.persistence;
import com.acme.order.application.port.OrderRepositoryPort;
import com.acme.order.domain.Order;
import com.acme.order.domain.OrderId;
import org.springframework.stereotype.Repository;
@Repository
public final class OrderJpaAdapter implements OrderRepositoryPort {
private final SpringOrderRepository repository;
private final OrderMapper mapper;
public OrderJpaAdapter(SpringOrderRepository repository, OrderMapper mapper) {
this.repository = repository;
this.mapper = mapper;
}
@Override
public OrderId nextId() {
return new OrderId(java.util.UUID.randomUUID().toString());
}
@Override
public void save(Order order) {
repository.save(mapper.toEntity(order));
}
}// BAD: domain tied to JPA
@jakarta.persistence.Entity
public class Order {
@jakarta.persistence.Id
private String id;
}// BAD: domain depends on Spring repository
public class Order {
private final SpringOrderRepository repository;
}| Task | Pattern |
|---|---|
| Persist domain data | Define output port in application, implement in infrastructure |
| Expose use case | Define input port and service in application |
| Keep domain pure | No annotations, no I/O, no framework imports |
© Gentleman-Programming, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in community/hexagonal-architecture-layers-java of Gentleman-Programming/Gentleman-Skills.
Open the folder on GitHubat commit c8036a3
Hexagonal Architecture Layers Java next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Hexagonal Architecture Layers Java this skillGentleman-Programming/Gentleman-Skills | 657 | — | ~1k | Automated safety check: Pass | MIT | |
| Java Design Patterns Referencedecebals/claude-code-java | 750 | 1 repos | ~4.4k | Automated safety check: Pass | MIT | |
| Swiftui View RefactorDimillian/Skills | 4k | 5 repos | ~2k | Automated safety check: Pass | MIT | |
| RTK Rust Design Patternsrtk-ai/rtk | 83k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Architecture PatternsKartikLabhshetwar/better-shot | 2.4k | 2 repos | ~1.4k | Automated safety check: Pass | Custom licence | |
| AST Visitor Pattern for Unionsprisma/orm | 48k | — | ~830 | Automated safety check: Pass | Apache-2.0 |
decebals/claude-code-java
A practical Java reference for Builder, Factory, Singleton, Strategy, Observer and other patterns, with a table matching problems to patterns.
Dimillian/Skills
Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage.
rtk-ai/rtk
Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.
KartikLabhshetwar/better-shot
Deep dive into software architecture for macOS. An agent skill from KartikLabhshetwar/better-shot.
prisma/orm
Replaces a plain TypeScript union plus switch statements with frozen subclasses and a visitor interface when several places dispatch on the same variants.
ramziddin/solid-skills
A skill your agent uses when writing code, implementing features, refactoring, planning architecture, designing systems, reviewing code, or debugging.
Gentleman-Programming/Gentleman-Skills
Core catalog of 8 critical Elixir/Phoenix anti-patterns covering error handling, separation of concerns, Ecto queries, and testing.
Gentleman-Programming/Gentleman-Skills
Creates new AI agent skills following the Agent Skills spec.
Gentleman-Programming/Gentleman-Skills
Angular architecture: Scope Rule, project structure, file naming, style guide.
Gentleman-Programming/Gentleman-Skills
Angular core patterns: standalone components, signals, inject, control flow, zoneless.
Gentleman-Programming/Gentleman-Skills
Angular forms: Signal Forms (experimental) and Reactive Forms.
Gentleman-Programming/Gentleman-Skills
Angular performance: NgOptimizedImage, @defer, lazy loading, SSR.
Works with
Categories
Hexagonal architecture layering for Java services with strict boundaries. Hexagonal Architecture Layers Java is an agent skill from Gentleman-Programming/Gentleman-Skills. Hexagonal architecture layering for Java services with strict boundaries.
Hexagonal Architecture Layers Java fits situations like: tasks that involve Design patterns; tasks that involve Refactoring.
Run `npx skills add Gentleman-Programming/Gentleman-Skills --skill hexagonal-architecture-layers-java -a claude-code`. Or copy the skill folder (community/hexagonal-architecture-layers-java in Gentleman-Programming/Gentleman-Skills) into .claude/skills/hexagonal-architecture-layers-java in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Gentleman-Programming/Gentleman-Skills --skill hexagonal-architecture-layers-java -a codex`. Or copy the skill folder (community/hexagonal-architecture-layers-java in Gentleman-Programming/Gentleman-Skills) into .agents/skills/hexagonal-architecture-layers-java in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Gentleman-Programming/Gentleman-Skills --skill hexagonal-architecture-layers-java -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hexagonal-architecture-layers-java, .gemini/skills/hexagonal-architecture-layers-java, .github/skills/hexagonal-architecture-layers-java and .opencode/skills/hexagonal-architecture-layers-java in your project.
SKILL.md names no scripts, command-line tools or credentials: Hexagonal Architecture Layers Java is instructions for the agent only.
SKILL.md names 2 domains. As links in the text: alistair.cockburn.us and oreilly.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Hexagonal Architecture Layers Java is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Hexagonal Architecture Layers Java: Java Design Patterns Reference (decebals/claude-code-java, 750 stars), Swiftui View Refactor (Dimillian/Skills, 4k stars), RTK Rust Design Patterns (rtk-ai/rtk, 83k stars) and Architecture Patterns (KartikLabhshetwar/better-shot, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Gentleman-Programming (a GitHub organization) maintains it in Gentleman-Programming/Gentleman-Skills, which has 657 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on March 28, 2026.
Source: Gentleman-Programming/Gentleman-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.