145-java-refactoring-high-performance — скилл для Claude Code
Скилл 145-java-refactoring-high-performance для Claude Code помогает оптимизировать Java-код по результатам профилирования: снижать аллокации и улучшать горячие пути CPU.
Apache-2.0 327 установок ★ 465 обновлён 2026-10-21
npx skills add jabrena/plinth --skill 145-java-refactoring-high-performance -a claude-codeЧто делает 145-java-refactoring-high-performance
Скилл помогает оптимизировать Java-код на основе профилирования. Содержит три раздела руководства: снижение аллокаций (примитивы против обёрток, escape analysis, раскладка данных), оптимизация CPU (распаковка циклов, битовые операции, SIMD), улучшение кода (API, control flow, параллелизм и I/O). Рабочий процесс начинается с выявления узкого места и установления baseline, затем выбирается нужный раздел руководства, применяются минимальные изменения, и результаты проверяются на реальный прирост производительности.
Скилл следует принципу measure-first: оптимизация только там, где профилирование показало реальные узкие места. Включает примеры плохого и хорошего кода, workflows для валидации и constraints для безопасности. Часть Plinth Toolkit от Juan Antonio Breña Moral.
Какие задачи решает
- оптимизировать горячие пути Java-кода по результатам профилирования
- снизить давление на память: аллокации, примитивы, раскладка данных
- улучшить CPU-bound код: распаковка циклов, битовые операции, SIMD
- рефакторить синтаксис и control flow для снижения задержек
- проверить прирост производительности перед коммитом
Примеры запросов агенту
- Оптимизируй этот Java-метод для производительности, используя measure-first подход
- Рецензируй код на предмет аллокаций памяти, которых можно избежать
- Упрости горячий путь этого алгоритма: уменьши ветвления и распакуй цикл
Как установить 145-java-refactoring-high-performance
1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 145-java-refactoring-high-performance -a claude-code2Вручную: положить файлы
~/.claude/skills/145-java-refactoring-high-performance/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/145-java-refactoring-high-performance/
1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 145-java-refactoring-high-performance -a codex2Вручную: положить файлы
.agents/skills/145-java-refactoring-high-performance/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 145-java-refactoring-high-performance -a cursor2Вручную: положить файлы
.cursor/skills/145-java-refactoring-high-performance/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install jabrena/plinth skills/145-java-refactoring-high-performance2Вручную: положить файлы
.github/skills/145-java-refactoring-high-performance/SKILL.md1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 145-java-refactoring-high-performance -a gemini-cli2Командой платформы
gemini skills install https://github.com/jabrena/plinth --path skills/145-java-refactoring-high-performanceВручную: положить файлы
.devin/skills/145-java-refactoring-high-performance/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 145-java-refactoring-high-performance -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о 145-java-refactoring-high-performance
Как установить скилл 145-java-refactoring-high-performance в Claude Code?
Выполни команду npx skills add jabrena/plinth --skill 145-java-refactoring-high-performance -a claude-code, затем открой ~/.claude/skills/145-java-refactoring-high-performance/SKILL.md.
Что делает этот скилл?
Помогает рефакторить Java-код на производительность: снижает аллокации памяти, оптимизирует горячие пути CPU, улучшает синтаксис и control flow. Работает на основе профилирования и примеров из трёх модулей руководства.
Когда использовать этот скилл?
Когда нужно улучшить производительность Java-приложения и ты уже знаешь узкое место из профилера (JFR, async-profiler или подобное). Скилл требует baseline измерений и применяет только доказанные оптимизации.
Исходный текст
SKILL.md · Apache-2.0
--- 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.19.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)
© Juan Antonio Breña Moral · Apache-2.0 · jabrena/plinth