122-java-type-design skill
✓ VerifiedRefactor Java code to improve type design quality through hierarchies, value objects, generic parameters, and fluent interfaces.
- GitHub stars
- 462
- Files
- 2
- Last commit
- Nov 11, 2026
- License
- Apache-2.0
- Allowed tools
- —
What does the 122-java-type-design skill do?
122-java-type-design is an agent skill. Refactor Java code to improve type design quality through hierarchies, value objects, generic parameters, and fluent interfaces.
Summary generated from the skill's SKILL.md.
About the 122-java-type-design skill
Refactoring Java code to improve type design quality is the primary function of this skill. Developers use it to transform messy or primitive-heavy codebases into structured systems using clear type hierarchies, domain-specific value objects, and fluent interfaces. It is particularly useful when an agent needs to eliminate primitive obsession by replacing basic types with wrappers like EmailAddress or Money, or when it must ensure financial precision by implementing BigDecimal for monetary operations.
An agent should load this skill when tasked with reviewing Java code, creating type-safe wrappers, or designing generic type parameters. The process relies on the references/122-java-type-design.md file to guide improvements through good and bad code pattern examples. To maintain project integrity, the skill requires running mvn compile or ./mvnw compile before any changes and executing mvn clean verify or ./mvnw clean verify after refactoring to ensure the code remains functional.
What an agent can do with it
- 1Eliminate primitive obsessionReplace basic primitive types with domain-specific value objects to increase type safety.
- 2Implement financial precisionUpdate numeric types to use BigDecimal for sensitive monetary calculations.
- 3Design fluent interfacesCreate domain-specific builder patterns and method chaining for better readability.
- 4Establish type hierarchiesOrganize code using nested static classes and logical structural patterns.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the 122-java-type-design skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the 122-java-type-design skill in Claude Code
~/.claude/skills/122-java-type-design/SKILL.md
$ npx degit jabrena/plinth/skills/122-java-type-design ~/.claude/skills/122-java-type-designInstall the 122-java-type-design skill in Claude Code (project)
.claude/skills/122-java-type-design/SKILL.md
$ npx degit jabrena/plinth/skills/122-java-type-design .claude/skills/122-java-type-designInstall the 122-java-type-design skill in Codex
~/.agents/skills/122-java-type-design/SKILL.md
$ npx degit jabrena/plinth/skills/122-java-type-design ~/.agents/skills/122-java-type-designInstall the 122-java-type-design skill in Gemini CLI
~/.gemini/skills/122-java-type-design/SKILL.md
$ npx degit jabrena/plinth/skills/122-java-type-design ~/.gemini/skills/122-java-type-designInstall the 122-java-type-design skill in Claude.ai
npx degit jabrena/plinth/skills/122-java-type-design 122-java-type-design && zip -r 122-java-type-design.zip 122-java-type-design # claude.ai → Customize → Skills → + → Create skill → Upload a skill → 122-java-type-design.zip
Automated checks
Ran Nov 15, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachablejabrena/plinth/skills/122-java-type-design is public and reachablegithub.com/jabrena/plinth/tree/HEAD/skills/122-java-type-des ↗Pass
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-11github.com/jabrena/plinth/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/jabrena/plinth/blob/HEAD/skills/122-java-type-des ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/jabrena/plinth/blob/HEAD/skills/122-java-type-des ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 71 linesgithub.com/jabrena/plinth/blob/HEAD/skills/122-java-type-des ↗Pass
SKILL.md
View on GitHubType Design Thinking in Java
Review and improve Java code using comprehensive type design principles that apply typography concepts to code structure and organization for maximum clarity and maintainability.
What is covered in this Skill?
- Clear type hierarchies: nested static classes, logical structure
- Consistent naming conventions: domain-driven patterns, uniform interface/implementation naming
- Strategic whitespace for readability
- Type-safe wrappers: value objects replacing primitive obsession (EmailAddress, Money)
- Generic type parameters: flexible reusable types, bounded parameters
- Domain-specific fluent interfaces: builder pattern, method chaining
- Type weights: conceptual importance — core domain vs supporting vs utility
- Type contrast through interfaces: contract vs implementation separation
- Aligned method signatures: consistent parameter and return types across related classes
- Self-documenting code: clear descriptive names
- BigDecimal for precision-sensitive calculations (financial/monetary operations)
- Strategic type selection: Optional, Set vs List, interfaces over concrete types
Scope: The reference is organized by examples (good/bad code patterns) for each core area. Apply recommendations based on applicable examples.
Constraints
Before applying any type design changes, ensure the project compiles. If compilation fails, stop immediately — do not proceed until resolved. After applying improvements, run full verification.
- MANDATORY: Run
./mvnw compileormvn compilebefore applying any change - SAFETY: If compilation fails, stop immediately and do not proceed — compilation failure is a blocking condition
- VERIFY: Run
./mvnw clean verifyormvn clean verifyafter applying improvements - BEFORE APPLYING: Read the reference for detailed examples, good/bad patterns, and constraints
- EDGE CASE: If request scope is ambiguous, stop and ask a clarifying question before applying changes
- EDGE CASE: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance
When to use this skill
- Review Java code for type design
- Improve type design in Java code
- Fix primitive obsession in Java code
- Create value objects in Java code
- Create type hierarchies in Java code
- Create fluent interfaces in Java code
Workflow
- Compile project before type-design changes
Run ./mvnw compile or mvn compile and stop immediately if compilation fails.
- Read type-design reference and inspect code
Read references/122-java-type-design.md and identify type hierarchy, naming, and value-object improvements.
- Apply type-design refactorings
Implement selected type-safety and readability improvements based on applicable patterns.
- Verify with full build
Run ./mvnw clean verify or mvn clean verify after applying improvements.
Reference
For detailed guidance, examples, and constraints, see references/122-java-type-design.md.
Files in this skill
2122-java-type-design skill questions
How do I install the 122-java-type-design skill in Claude Code?
Run npx degit jabrena/plinth/skills/122-java-type-design ~/.claude/skills/122-java-type-design. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the 122-java-type-design skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
What should I do if the Java project fails to compile?
You must stop immediately and do not proceed with any changes until the compilation issue is resolved.
How can I ensure the type design changes didn't break the project?
After applying improvements, you should run the full verification command using Maven.
What specific type design improvements does this skill cover?
It covers establishing clear type hierarchies, eliminating primitive obsession with value objects, using generic type parameters, and designing fluent interfaces.