/145-java-refactoring-high-performance
Use when you need to refactor Java code for high performance — including memory/allocation reduction, CPU hot-path optimization, and syntax/API/control-flow improvements. This should trigger for requests such as Review Java code for high performance; Optimize Java hot path;
$ npx -y skills add jabrena/plinth --skill 145-java-refactoring-high-performance --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/145-java-refactoring-high-performance
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when you need to refactor Java code for high performance — including memory/allocation reduction, CPU hot-path optimization, and syntax/API/control-flow improvements. This should trigger for requests such as Review Java code for high performance; Optimize Java hot path;
SKILL.md
145-java-refactoring-high-performance.SKILL.mdname: 145-java-refactoring-high-performance
description: Use when you need to refactor Java code for high performance — including memory/allocation reduction, CPU hot-path optimization, and syntax/API/control-flow improvements. This should trigger for requests such as Review Java code for high performance; Optimize Java hot path; Reduce Java allocations; Improve Java latency/throughput. Part of Plinth Toolkit
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
version: 0.18.0
Java rules for High Performance
Identify and apply practical Java high-performance techniques using a measure-first approach, with emphasis on allocation reduction, data layout, concurrency discipline, and evidence-based validation.
**What is covered in this Skill?**
- Measure-first workflow for Java code optimization
- JVM/runtime-aware coding guidance
- Allocation reduction techniques with bad/good patterns
- CPU hot-path simplification and loop-level efficiency patterns
- Concurrency/backpressure and timeout/cancellation discipline
- I/O, parsing, and serialization efficiency patterns
- Persistence/query and caching strategy guidance
- Java-centric decision workflow: keep/revert based on measured impact
**Scope:** Practical optimization in application code and APIs. Apply only where profiling indicates real bottlenecks.
Constraints
Performance optimization must be evidence-driven and safe, focused on Java code changes that preserve correctness and maintainability.
- **MEASURE-FIRST**: Establish baseline behavior and identify Java code hot paths before optimization
- **NO PREMATURE OPTIMIZATION**: Only optimize code paths identified by profiling evidence
- **BEFORE APPLYING**: Read the relevant reference(s) for bad/good examples and measurement workflow
- **EDGE CASE**: If hotspot evidence is unclear, ask clarifying questions before changing code
When to use this skill
- Review Java code for high performance
- Optimize Java hot path
- Reduce Java allocations
- Improve Java latency
- Improve Java throughput
Workflow
1. **Identify Java hotspot and baseline behavior**
Confirm the performance-sensitive Java path and baseline behavior before changing code.
2. **Select the relevant reference(s) by bottleneck**
Pick and read only the reference(s) matching the observed hotspot: `references/145-refactoring-high-performance-java-memory-allocation.md` for allocation pressure, primitives vs. wrappers, escape analysis, collection sizing, data layout, and deduplication; `references/145-refactoring-high-performance-java-cpu.md` for CPU-bound hot paths, bit-level parsing, branchless arithmetic, loop unrolling, Unsafe caution, and SIMD/vectorization; `references/145-refactoring-high-performance-java-code-syntax.md` for code shape, lambdas, API return conventions, parsing syntax, I/O strategy, concurrency, and control-flow improvements.
3. **Apply targeted optimizations**
Implement minimal, evidence-backed changes scoped to the chosen domain(s): memory/allocation, CPU/low-level, or code shape/control flow (and adjacent concurrency, I/O, and persistence/caching in Java code).
4. **Validate and compare code-level outcomes**
Compare before/after behavior and keep only Java code changes with meaningful, verified gains.
Reference
For detailed guidance, examples, and constraints, see:
- [references/145-refactoring-high-performance-java-memory-allocation.md](references/145-refactoring-high-performance-java-memory-allocation.md)
- [references/145-refactoring-high-performance-java-cpu.md](references/145-refactoring-high-performance-java-cpu.md)
- [references/145-refactoring-high-performance-java-code-syntax.md](references/145-refactoring-high-performance-java-code-syntax.md)
Read more
name: 145-java-refactoring-high-performance description: Use when you need to refactor Java code for high performance — including memory/allocation reduction, CPU hot-path optimization, and syntax/API/control-flow improvements. This should trigger for requests such as Review Java code for high performance; Optimize Java hot path; Reduce Java allocations; Improve Java latency/throughput. Part of Plinth Toolkit license: Apache-2.0 metadata: author: Juan Antonio Breña Moral version: 0.18.0
Java rules for High Performance
Identify and apply practical Java high-performance techniques using a measure-first approach, with emphasis on allocation reduction, data layout, concurrency discipline, and evidence-based validation.
**What is covered in this Skill?**
- Measure-first workflow for Java code optimization
- JVM/runtime-aware coding guidance
- Allocation reduction techniques with bad/good patterns
- CPU hot-path simplification and loop-level efficiency patterns
- Concurrency/backpressure and timeout/cancellation discipline
- I/O, parsing, and serialization efficiency patterns
- Persistence/query and caching strategy guidance
- Java-centric decision workflow: keep/revert based on measured impact
**Scope:** Practical optimization in application code and APIs. Apply only where profiling indicates real bottlenecks.
Constraints
Performance optimization must be evidence-driven and safe, focused on Java code changes that preserve correctness and maintainability.
- **MEASURE-FIRST**: Establish baseline behavior and identify Java code hot paths before optimization
- **NO PREMATURE OPTIMIZATION**: Only optimize code paths identified by profiling evidence
- **BEFORE APPLYING**: Read the relevant reference(s) for bad/good examples and measurement workflow
- **EDGE CASE**: If hotspot evidence is unclear, ask clarifying questions before changing code
When to use this skill
- Review Java code for high performance
- Optimize Java hot path
- Reduce Java allocations
- Improve Java latency
- Improve Java throughput
Workflow
1. **Identify Java hotspot and baseline behavior**
Confirm the performance-sensitive Java path and baseline behavior before changing code.
2. **Select the relevant reference(s) by bottleneck**
Pick and read only the reference(s) matching the observed hotspot: `references/145-refactoring-high-performance-java-memory-allocation.md` for allocation pressure, primitives vs. wrappers, escape analysis, collection sizing, data layout, and deduplication; `references/145-refactoring-high-performance-java-cpu.md` for CPU-bound hot paths, bit-level parsing, branchless arithmetic, loop unrolling, Unsafe caution, and SIMD/vectorization; `references/145-refactoring-high-performance-java-code-syntax.md` for code shape, lambdas, API return conventions, parsing syntax, I/O strategy, concurrency, and control-flow improvements.
3. **Apply targeted optimizations**
Implement minimal, evidence-backed changes scoped to the chosen domain(s): memory/allocation, CPU/low-level, or code shape/control flow (and adjacent concurrency, I/O, and persistence/caching in Java code).
4. **Validate and compare code-level outcomes**
Compare before/after behavior and keep only Java code changes with meaningful, verified gains.
Reference
For detailed guidance, examples, and constraints, see:
- [references/145-refactoring-high-performance-java-memory-allocation.md](references/145-refactoring-high-performance-java-memory-allocation.md)
- [references/145-refactoring-high-performance-java-cpu.md](references/145-refactoring-high-performance-java-cpu.md)
- [references/145-refactoring-high-performance-java-code-syntax.md](references/145-refactoring-high-performance-java-code-syntax.md)
Languages: Español · 中文 Help this project grow: Become a sponsor
Other skills on plinth.
- /001-commands-inventory
Use when you need to generate a checklist document with embedded commands inventory, following the embedded template exactly and producing INVENTORY-COMMANDS-JAVA.md in the project root. This should trigger for requests such as Create embedded commands inventory checklist;
Open skill - /002-agents-inventory
Use when you need to generate a checklist document with embedded agents inventory, following the embedded template exactly and producing INVENTORY-AGENTS-JAVA.md in the project root. This should trigger for requests such as Create embedded agents inventory checklist; Generate
Open skill - /003-skills-inventory
Use when you need to generate a checklist document with Java system prompts from skills.xml, following the embedded section template and producing INVENTORY-SKILLS-JAVA.md. This should trigger for requests such as Create Java system prompts checklist; Generate
Open skill - /004-commands-installation
Use when you need to install the embedded project commands into command directories (.github/commands, .claude/commands, .cursor/command, .codex/commands), selecting the destination interactively and copying the embedded command definitions from project assets. This should
Open skill - /005-agents-installation
Use when you need to install the embedded robot agents into .github/agents, .claude/agents, .cursor/agents, or .codex/agents, selecting the destination interactively and copying the embedded agent definitions from project assets. This should trigger for requests such as Install
Open skill - /012-agile-epic
Guides the creation of agile epics with comprehensive definition including business value, success criteria, and breakdown into user stories. Use when the user wants to create an agile epic, define large bodies of work, break down features into user stories, or document
Open skill

