{"id":"97fd5679-03b5-46a2-80b6-4e08df45fd20","shortId":"7eG2CP","kind":"skill","title":"163-java-profiling-refactor","tagline":"Use when you need to refactor Java code based on profiling analysis findings — including reviewing docs/profiling-problem-analysis and docs/profiling-solutions, identifying specific performance bottlenecks, and implementing targeted code changes to address CPU, memory, or threadi","description":"# Java Profiling Workflow / Step 3 / Refactor code to fix issues\n\nImplement refactoring based on profiling analysis: review profiling-problem-analysis-YYYYMMDD.md and profiling-solutions-YYYYMMDD.md, identify specific performance bottlenecks, and refactor code to fix them. Ensure all tests pass after changes.\n\n**What is covered in this Skill?**\n\n- Review analysis notes: docs/profiling-problem-analysis-YYYYMMDD.md, docs/profiling-solutions-YYYYMMDD.md\n- Identify specific bottlenecks from the documented findings\n- Refactor code to address CPU hotspots, memory leaks, threading issues, or other performance problems\n- Run verification: ./mvnw clean verify or mvn clean verify\n\n**Scope:** Changes must pass all tests. Apply fixes incrementally and verify after each significant change.\n\n## Constraints\n\nVerify that changes pass all tests before considering the refactoring complete.\n\n- **MANDATORY**: Run `./mvnw clean verify` or `mvn clean verify` after applying refactoring\n- **SAFETY**: If tests fail, fix issues before proceeding\n- **BEFORE APPLYING**: Read the analysis and solutions documents for specific recommendations\n- **EDGE CASE**: If request scope is ambiguous, stop and ask a clarifying question before applying changes\n- **EDGE CASE**: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance\n\n## When to use this skill\n\n- Refactor the code with profiling\n- Apply profiling\n- Refactor the code with profiling\n- Optimize hot path\n- Performance refactoring\n\n## Workflow\n\n1. **Review profiling analysis artifacts**\n\nRead `docs/profiling-problem-analysis-YYYYMMDD.md` and `docs/profiling-solutions-YYYYMMDD.md` to select target bottlenecks.\n\n2. **Apply targeted performance refactors**\n\nImplement focused code changes for documented CPU, memory, or threading hotspots, incrementally and safely.\n\n3. **Verify behavior and performance build integrity**\n\nRun `./mvnw clean verify` or `mvn clean verify`; if tests fail, fix issues before continuing.\n\n4. **Prepare handoff for verification phase**\n\nSummarize implemented changes and expected metric improvements for Step 4 comparison.\n\n## Reference\n\nFor detailed guidance, examples, and constraints, see [references/163-java-profiling-refactor.md](references/163-java-profiling-refactor.md).","tags":["163","java","profiling","refactor","cursor","rules","jabrena","agent-skills","ai-skills","claude","claude-code","claude-code-skills"],"capabilities":["skill","source-jabrena","skill-163-java-profiling-refactor","topic-agent-skills","topic-ai-skills","topic-claude","topic-claude-code","topic-claude-code-skills","topic-claude-code-subagents","topic-claude-skills","topic-cursor-agent","topic-cursor-ai","topic-cursor-skills","topic-cursorai","topic-github-copilot"],"categories":["cursor-rules-java"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/jabrena/cursor-rules-java/163-java-profiling-refactor","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add jabrena/cursor-rules-java","source_repo":"https://github.com/jabrena/cursor-rules-java","install_from":"skills.sh"}},"qualityScore":"0.631","qualityRationale":"deterministic score 0.63 from registry signals: · indexed on github topic:agent-skills · 362 github stars · SKILL.md body (2,314 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-26T12:53:35.959Z","embedding":null,"createdAt":"2026-04-18T22:02:08.011Z","updatedAt":"2026-04-26T12:53:35.959Z","lastSeenAt":"2026-04-26T12:53:35.959Z","tsv":"'/mvnw':109,145,275 '1':235 '163':1 '2':248 '3':43,267 '4':289,304 'address':34,96 'ambigu':180 'analysi':17,54,82,167,238 'appli':122,153,164,188,222,249 'artifact':239 'ask':183,205 'base':14,51 'behavior':269 'bottleneck':27,62,88,247 'build':272 'case':175,191 'chang':32,74,117,130,134,189,256,297 'clarifi':185 'clean':110,114,146,150,276,280 'code':13,31,45,65,94,219,226,255 'comparison':305 'complet':142 'consid':139 'constraint':131,312 'continu':288 'cover':77 'cpu':35,97,259 'detail':308 'docs/profiling-problem-analysis':21 'docs/profiling-problem-analysis-yyyymmdd.md':84,241 'docs/profiling-solutions':23 'docs/profiling-solutions-yyyymmdd.md':85,243 'document':91,170,258 'edg':174,190 'ensur':69 'exampl':310 'expect':299 'fail':158,284 'file':195 'find':18,92 'fix':47,67,123,159,285 'focus':254 'guidanc':211,309 'handoff':291 'hot':230 'hotspot':98,263 'identifi':24,59,86 'implement':29,49,253,296 'improv':301 'includ':19 'increment':124,264 'input':194 'integr':273 'issu':48,102,160,286 'java':3,12,39 'java-profiling-refactor':2 'leak':100 'mandatori':143 'memori':36,99,260 'metric':300 'miss':199,203 'must':118 'mvn':113,149,279 'need':9 'note':83 'optim':229 'pass':72,119,135 'path':231 'perform':26,61,105,232,251,271 'phase':294 'prepar':290 'problem':106 'proceed':162,208 'profil':4,16,40,53,221,223,228,237 'profiling-problem-analysis-yyyymmdd.md':56 'profiling-solutions-yyyymmdd.md':58 'question':186 'read':165,240 'recommend':173 'refactor':5,11,44,50,64,93,141,154,217,224,233,252 'refer':306 'references/163-java-profiling-refactor.md':314,315 'report':200 'request':177 'requir':193 'review':20,55,81,236 'run':107,144,274 'safe':266 'safeti':155 'scope':116,178 'see':313 'select':245 'setup':210 'signific':129 'skill':80,216 'skill-163-java-profiling-refactor' 'solut':169 'source-jabrena' 'specif':25,60,87,172 'step':42,303 'stop':181 'summar':295 'target':30,246,250 'test':71,121,137,157,283 'thread':101,262 'threadi':38 'tool':197 'topic-agent-skills' 'topic-ai-skills' 'topic-claude' 'topic-claude-code' 'topic-claude-code-skills' 'topic-claude-code-subagents' 'topic-claude-skills' 'topic-cursor-agent' 'topic-cursor-ai' 'topic-cursor-skills' 'topic-cursorai' 'topic-github-copilot' 'use':6,214 'verif':108,293 'verifi':111,115,126,132,147,151,268,277,281 'whether':206 'workflow':41,234","prices":[{"id":"698800a1-0d13-4493-9f98-ebd416310048","listingId":"97fd5679-03b5-46a2-80b6-4e08df45fd20","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"jabrena","category":"cursor-rules-java","install_from":"skills.sh"},"createdAt":"2026-04-18T22:02:08.011Z"}],"sources":[{"listingId":"97fd5679-03b5-46a2-80b6-4e08df45fd20","source":"github","sourceId":"jabrena/cursor-rules-java/163-java-profiling-refactor","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/163-java-profiling-refactor","isPrimary":false,"firstSeenAt":"2026-04-18T22:02:08.011Z","lastSeenAt":"2026-04-26T12:53:35.959Z"}],"details":{"listingId":"97fd5679-03b5-46a2-80b6-4e08df45fd20","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"163-java-profiling-refactor","github":{"repo":"jabrena/cursor-rules-java","stars":362,"topics":["agent-skills","ai-skills","claude","claude-code","claude-code-skills","claude-code-subagents","claude-skills","cursor-agent","cursor-ai","cursor-skills","cursorai","github-copilot","intellij-idea","java","prompting","system-prompts"],"license":"apache-2.0","html_url":"https://github.com/jabrena/cursor-rules-java","pushed_at":"2026-04-26T12:50:01Z","description":"A curated and opinionated collection of Skills and Agents to be used in modern SDLC workflows for Java Enterprise development with your favorite AI Agent harness.","skill_md_sha":"fd99607f7fc79a72c6baf89b70f13f3de63c4de7","skill_md_path":"skills/163-java-profiling-refactor/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/163-java-profiling-refactor"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"163-java-profiling-refactor","license":"Apache-2.0","description":"Use when you need to refactor Java code based on profiling analysis findings — including reviewing docs/profiling-problem-analysis and docs/profiling-solutions, identifying specific performance bottlenecks, and implementing targeted code changes to address CPU, memory, or threading issues. This should trigger for requests such as Refactor the code with profiling; Apply profiling; Refactor the code with profiling; Optimize hot path. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/163-java-profiling-refactor"},"updatedAt":"2026-04-26T12:53:35.959Z"}}