Skip to content
Back to skills

Code Profiler

ASecurity

Use when asked to profile Python code performance, identify bottlenecks, measure execution time, or analyze function call statistics.

  • 99 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 7, 2026
data-aipythonbashperformance

Works with

  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add dkyazzentwatwa/chatgpt-skills --skill code-profiler --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Profiler?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Profiler
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dkyazzentwatwa-code-profiler/badge)](https://www.skillsdirectory.com/skills/dkyazzentwatwa-code-profiler)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-profiler
description: Use when asked to profile Python code performance, identify bottlenecks, measure execution time, or analyze function call statistics.
---

# Code Profiler

Analyze Python code performance, identify bottlenecks, and optimize execution with comprehensive profiling tools.

## Purpose

Performance analysis for:
- Bottleneck identification
- Function execution time measurement
- Memory usage profiling
- Call graph visualization
- Optimization validation

## Features

- **Time Profiling**: Measure function execution times
- **Line-by-Line Analysis**: Profile each line of code
- **Call Statistics**: Function call counts and cumulative time
- **Memory Profiling**: Track memory allocation and usage
- **Flamegraph Visualization**: Visual call stack analysis
- **Comparison**: Before/after optimization comparison

## Quick Start

```python
from code_profiler import CodeProfiler

# Profile function
profiler = CodeProfiler()
profiler.profile_function(my_function, args=(arg1, arg2))
profiler.print_stats(top=10)

# Profile script
profiler.profile_script('script.py')
profiler.export_report('profile_report.html')
```

## CLI Usage

```bash
# Profile Python script
python code_profiler.py script.py

# Profile with line-by-line analysis
python code_profiler.py script.py --line-by-line

# Export HTML report
python code_profiler.py script.py --output report.html
```

Files in this skill

  • SKILL.md1.4 KB
  • scripts/code_profiler.py2.5 KB
  • scripts/requirements.txt43 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.