{"id":"8e821f00-06d0-4051-b6d1-0fcea99e7db6","shortId":"vqCeFj","kind":"skill","title":"161-java-profiling-detect","tagline":"Use when you need to set up Java application profiling to detect and measure performance issues — including automated async-profiler v4.0 setup, problem-driven profiling (CPU, memory, threading, GC, I/O), interactive profiling scripts, JFR integration with Java 25 (JEP 518, JEP 5","description":"# Java Profiling Workflow / Step 1 / Collect data to measure potential issues\n\nSet up the Java profiling detection phase: automated environment setup with async-profiler v4.0, problem-driven interactive profiling scripts, and comprehensive data collection for CPU hotspots, memory leaks, lock contention, GC issues, and I/O bottlenecks. Uses JEP 518 (Cooperative Sampling) and JEP 520 (Method Timing) for reduced overhead.\n\n**What is covered in this Skill?**\n\n- Run application with profiling JVM flags (run-java-process-for-profiling.sh)\n- Interactive profiling script (profiler/scripts/profile-java-process.sh) — copy exact template\n- Directory structure: profiler/scripts/, profiler/results/, profiler/current/\n- Automated OS/architecture detection and async-profiler download\n- CPU, memory, lock, GC, I/O profiling modes\n- Flamegraph and JFR output with timestamped results\n\n**Scope:** Use the exact bash script templates without modification or interpretation.\n\n## Constraints\n\nCopy bash scripts exactly from templates. Ensure JVM flags are applied for profiling compatibility. Verify Java processes are running before attaching profiler.\n\n- **CRITICAL**: Copy the bash script templates exactly — do not modify, interpret, or enhance\n- **SETUP**: Create profiler directory structure: profiler/scripts, profiler/results\n- **EXECUTABLE**: Make scripts executable with chmod +x\n- **BEFORE APPLYING**: Read the reference for exact script templates and setup instructions\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- Improve the code with profiling\n- Apply Profiling\n- Refactor the code with profiling\n- Add profiling support\n\n## Workflow\n\n1. **Read profiling setup reference**\n\nRead `references/161-java-profiling-detect.md` and use script templates exactly as provided.\n\n2. **Create profiler workspace and scripts**\n\nCreate `profiler/scripts` and `profiler/results`, copy setup/profile scripts verbatim, and make scripts executable.\n\n3. **Run application with profiling compatibility**\n\nStart Java process with required profiling JVM flags and verify target process availability for profiler attachment.\n\n4. **Collect profiling artifacts**\n\nCapture CPU/memory/lock/GC/I/O data and produce timestamped flamegraph and JFR outputs for analysis.\n\n## Reference\n\nFor detailed guidance, examples, and constraints, see [references/161-java-profiling-detect.md](references/161-java-profiling-detect.md).","tags":["161","java","profiling","detect","cursor","rules","jabrena","agent-skills","ai-skills","claude","claude-code","claude-code-skills"],"capabilities":["skill","source-jabrena","skill-161-java-profiling-detect","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/161-java-profiling-detect","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,626 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.825Z","embedding":null,"createdAt":"2026-04-18T22:02:06.462Z","updatedAt":"2026-04-26T12:53:35.825Z","lastSeenAt":"2026-04-26T12:53:35.825Z","tsv":"'1':54,290 '161':1 '2':304 '25':45 '3':322 '4':344 '5':49 '518':47,100 '520':105 'add':286 'ambigu':237 'analysi':359 'appli':180,220,245,279 'applic':14,118,324 'artifact':347 'ask':240,262 'async':25,73,141 'async-profil':24,72,140 'attach':190,343 'autom':23,68,136 'avail':340 'bash':162,171,195 'bottleneck':97 'captur':348 'case':232,248 'chang':246 'chmod':217 'clarifi':242 'code':276,283 'collect':55,85,345 'compat':183,327 'comprehens':83 'constraint':169,366 'content':92 'cooper':101 'copi':128,170,193,314 'cover':113 'cpu':33,87,144 'cpu/memory/lock/gc/i/o':349 'creat':206,305,310 'critic':192 'data':56,84,350 'detail':362 'detect':5,17,66,138 'directori':131,208 'download':143 'driven':31,78 'edg':231,247 'enhanc':204 'ensur':176 'environ':69 'exact':129,161,173,198,225,301 'exampl':364 'execut':212,215,321 'file':252 'flag':122,178,335 'flamegraph':151,354 'gc':36,93,147 'guidanc':268,363 'hotspot':88 'i/o':37,96,148 'improv':274 'includ':22 'input':251 'instruct':230 'integr':42 'interact':38,79,124 'interpret':168,202 'issu':21,60,94 'java':3,13,44,50,64,185,329 'java-profiling-detect':2 'jep':46,48,99,104 'jfr':41,153,356 'jvm':121,177,334 'leak':90 'lock':91,146 'make':213,319 'measur':19,58 'memori':34,89,145 'method':106 'miss':256,260 'mode':150 'modif':166 'modifi':201 'need':9 'os/architecture':137 'output':154,357 'overhead':110 'perform':20 'phase':67 'potenti':59 'problem':30,77 'problem-driven':29,76 'proceed':265 'process':186,330,339 'produc':352 'profil':4,15,26,32,39,51,65,74,80,120,125,142,149,182,191,207,278,280,285,287,292,306,326,333,342,346 'profiler/current':135 'profiler/results':134,211,313 'profiler/scripts':133,210,311 'profiler/scripts/profile-java-process.sh':127 'provid':303 'question':243 'read':221,291,295 'reduc':109 'refactor':281 'refer':223,294,360 'references/161-java-profiling-detect.md':296,368,369 'report':257 'request':234 'requir':250,332 'result':157 'run':117,188,323 'run-java-process-for-profiling.sh':123 'sampl':102 'scope':158,235 'script':40,81,126,163,172,196,214,226,299,309,316,320 'see':367 'set':11,61 'setup':28,70,205,229,267,293 'setup/profile':315 'skill':116,273 'skill-161-java-profiling-detect' 'source-jabrena' 'start':328 'step':53 'stop':238 'structur':132,209 'support':288 'target':338 'templat':130,164,175,197,227,300 'thread':35 'time':107 'timestamp':156,353 'tool':254 '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,98,159,271,298 'v4.0':27,75 'verbatim':317 'verifi':184,337 'whether':263 'without':165 'workflow':52,289 'workspac':307 'x':218","prices":[{"id":"7a404b73-269c-43d6-8b93-7bd4b559a2ba","listingId":"8e821f00-06d0-4051-b6d1-0fcea99e7db6","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:06.462Z"}],"sources":[{"listingId":"8e821f00-06d0-4051-b6d1-0fcea99e7db6","source":"github","sourceId":"jabrena/cursor-rules-java/161-java-profiling-detect","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/161-java-profiling-detect","isPrimary":false,"firstSeenAt":"2026-04-18T22:02:06.462Z","lastSeenAt":"2026-04-26T12:53:35.825Z"}],"details":{"listingId":"8e821f00-06d0-4051-b6d1-0fcea99e7db6","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"161-java-profiling-detect","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":"6235cd3b9082a64ce60755f09461c97bb908e20a","skill_md_path":"skills/161-java-profiling-detect/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/161-java-profiling-detect"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"161-java-profiling-detect","license":"Apache-2.0","description":"Use when you need to set up Java application profiling to detect and measure performance issues — including automated async-profiler v4.0 setup, problem-driven profiling (CPU, memory, threading, GC, I/O), interactive profiling scripts, JFR integration with Java 25 (JEP 518, JEP 520), or collecting profiling data with flamegraphs and JFR recordings. This should trigger for requests such as Improve the code with profiling; Apply Profiling; Refactor the code with profiling; Add profiling support. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/161-java-profiling-detect"},"updatedAt":"2026-04-26T12:53:35.825Z"}}