Profile programs at the function/method level to identify performance hotspots, bottlenecks, and optimization opportunities. Records execution time, memory usage, and call frequency for each interval. Generates actionable recommendations and visualizations. Use when users need to (1) analyze program performance, (2) identify slow functions or bottlenecks, (3) optimize execution time or memory usage, (4) profile Python, Java, or C/C++ programs with test cases or workload scenarios, or (5) generate performance reports with flame graphs and recommendations.
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill interval-profiling-performance-analyzer
Profile programs to identify performance bottlenecks and generate optimization recommendations with visualizations.
Clarify the profiling task:
Choose based on language and environment:
Python:
scripts/profile_python.py (cProfile + tracemalloc)Java:
scripts/profile_java.py (Java Flight Recorder)C/C++:
scripts/profile_cpp.py (perf or gprof)perf: Linux only, no recompilation neededgprof: Cross-platform, requires -pg compilation flagFor detailed tool information, see references/profiling-tools.md.
Execute the appropriate profiling script:
Python example:
python scripts/profile_python.py target_script.py
Java example:
python scripts/profile_java.py MainClass ./bin 30
# Arguments: MainClass, classpath, duration_seconds
C/C++ example:
python scripts/profile_cpp.py ./program --tool perf
# Or use gprof (requires compilation with -pg):
python scripts/profile_cpp.py ./program --tool gprof
All scripts generate profile_results.json containing:
Create interactive HTML report and flame graph data:
python scripts/generate_visualization.py profile_results.json profile_report.html
Outputs:
profile_report.html: Interactive report with charts and recommendationsflamegraph.txt: Data for flame graph generation (use flamegraph.pl if available)Review the generated report:
Hotspots section: Functions consuming the most time
Recommendations section: Specific suggestions for each hotspot
Memory usage: Identify memory-intensive operations
Summarize findings for the user:
Reference references/optimization-patterns.md for detailed optimization techniques.
User wants to know "why is my program slow?"
User wants to verify optimization effectiveness.
before.jsonafter.jsonUser suspects memory issues.
User wants to profile different workloads.
-g flag for function namessudo for system-wide profiling-pg flag"perf not found" (C/C++):
sudo apt-get install linux-tools-generic
"JFR file not created" (Java):
"No profiling data" (any language):
"Flame graph not generating":
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.
Comprehensive Python library for astronomy and astrophysics. This skill should be used when working with astronomical data including celestial coordinates, physical units, FITS files, cosmological calculations, time systems, tables, world coordinate systems (WCS), and astronomical data analysis. Use when tasks involve coordinate transformations, unit conversions, FITS file manipulation, cosmological distance calculations, time scale conversions, or astronomical data processing.
Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full ASM JSON, flattened CSV for easy import, and exportable Python code for data engineers. Common triggers include converting instrument files, standardizing lab data, preparing data for upload to LIMS/ELN systems, or generating parser code for production pipelines.
Quantum mechanics simulations and analysis using QuTiP (Quantum Toolbox in Python). Use when working with quantum systems including: (1) quantum states (kets, bras, density matrices), (2) quantum operators and gates, (3) time evolution and dynamics (Schrödinger, master equations, Monte Carlo), (4) open quantum systems with dissipation, (5) quantum measurements and entanglement, (6) visualization (Bloch sphere, Wigner functions), (7) steady states and correlation functions, or (8) advanced methods (Floquet theory, HEOM, stochastic solvers). Handles both closed and open quantum systems across various domains including quantum optics, quantum computing, and condensed matter physics.
Retrieve and display GitHub Copilot usage metrics for organizations and enterprises using the GitHub CLI and REST API.
Socratic mentoring for junior developers and AI newcomers. Guides through questions, never answers. Triggers: "help me understand", "explain this code", "I''m stuck", "Im stuck", "I''m confused", "Im confused", "I don''t understand", "I dont understand", "can you teach me", "teach me", "mentor me", "guide me", "what does this error mean", "why doesn''t this work", "why does not this work", "I''m a beginner", "Im a beginner", "I''m learning", "Im learning", "I''m new to this", "Im new to this", "walk me through", "how does this work", "what''s wrong with my code", "what''s wrong", "can you break this down", "ELI5", "step by step", "where do I start", "what am I missing", "newbie here", "junior dev", "first time using", "how do I", "what is", "is this right", "not sure", "need help", "struggling", "show me", "help me debug", "best practice", "too complex", "overwhelmed", "lost", "debug this", "/socratic", "/hint", "/concept", "/pseudocode". Progressive clue systems, teaching techniques, and success metrics.
Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.
High-performance DataFrame library for Python ETL, analytics, and pandas migration. Use for expression-based data manipulation with lazy query optimization, parallel execution, streaming out-of-core processing, Arrow interoperability, and optional GPU execution.
Take arabelatso/interval-profiling-performance-analyzer from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference apt.
Without those the skill loads but fails at the first command.