Our review
Profiles code execution speed to identify bottlenecks.
Strengths
- Supports multiple profiling methods (time, cProfile, line_profiler)
- Analyzes cumulative time and call counts
- Provides optimization suggestions
Limitations
- Requires local execution capability
- Line profiler needs extra installation
When a script or function is slow and you need to pinpoint the costly parts.
For production performance analysis or very simple scripts.
Security analysis
SafeThe skill only provides guidance on profiling Python code using standard tools. It does not instruct the AI to execute any commands or contain dangerous operations.
No concerns found
Examples
Profile the execution of my script 'data_processing.py' and show the cumulative time sorted results.Add @profile decorator to my function 'process_data' and run line profiler on 'app.py' to see per-line time.Wrap this function in a timer to measure its execution time: [function code]name: profile description: 指定したコードの実行速度をプロファイリングし、ボトルネックを特定する
Profile Code
This skill helps find performance bottlenecks in the code.
Instructions
-
Identify Target:
- Ask user for the script or function call to profile.
-
Run Profiler:
- Simple Timer: For quick checks, wrap code in
time.perf_counter(). - cProfile: Run
python -m cProfile -s cumulative <script_name.py>. - Line Profiler: If detailed line-by-line analysis is needed, suggesting adding
@profiledecorator and runningkernprof -l -v <script_name.py>(requiresline_profilerinstalled).
- Simple Timer: For quick checks, wrap code in
-
Analyze Output:
- Look for functions with high
cumtime(cumulative time). - Look for functions with high call counts (
ncalls).
- Look for functions with high
-
Report:
- Summarize which parts of the code are consuming the most time.
- Suggest potential optimizations (vectorization, caching, algorithm change).
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.