Measure hot paths with real data shapes, optimize measured bottlenecks, verify wins.
Scanned 9/29/2026
npx -y skills add aniruddhaadak80/skills --skill code-quality-performance-profiling-python --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Code Quality Performance Profiling Python?
Add the live security badge to your README โ it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/aniruddhaadak80-code-quality-performance-profiling-python)More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.
---
name: code-quality-performance-profiling-python
description: "Measure hot paths with real data shapes, optimize measured bottlenecks, verify wins."
---
# Profile before optimizing (Python)
> Measure hot paths with real data shapes, optimize measured bottlenecks, verify wins.
**Track:** ๐งฐ Engineering Essentials ยท **Domain:** Code Quality ยท **Level:** intermediate ยท **~35 min**
**Who this is for:** All Software Engineers
## When to Use This Skill
Measure hot paths with real data shapes, optimize measured bottlenecks, verify wins.
Use it whenever a matching task appears in conversation โ the agent loads these instructions on demand.
## Steps
1. Define target metric: p95 latency? memory ceiling? throughput?
2. Build benchmark using PRODUCTION-shaped data volumes
3. Profile CPU + memory + allocations; identify top three offenders
4. Optimize one offender at a time; re-measure after each change
5. Check second-order effects: cache misses, GC pressure, lock contention
6. Record before/after numbers in the PR for future archaeologists
7. Profile with py-spy and cProfile; watch the GIL on CPU-bound paths
8. Pin environments via lockfiles; verify wheels exist for your platforms
## Common Pitfalls
- Optimizing intuition while profile shows I/O waits
- Micro-benchmarks on toy data lying about production
## Commands
**Install with skills CLI**
```bash
npx skills add aniruddhaadak80/skills --skill code-quality-performance-profiling-python
```
**Install globally**
```bash
npx skills add aniruddhaadak80/skills --skill code-quality-performance-profiling-python -g
```
---
Part of [aniruddhaadak80/skills](https://github.com/aniruddhaadak80/skills) ยท Browse all at https://skills.sh/aniruddhaadak80/skillsIs this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!