mcpField
P
performance-profiler

performance-profiler

github.com/alirezarezvaniDevelopment28.9k727 installsUpdated 2d ago
Repository

About performance-profiler

A performance-profiling skill for engineering teams working with Node.js, Python, and Go applications. It helps locate CPU, memory, I/O, database, and load issues, with an emphasis on measuring before and after optimization.

Key features

  1. 01Profile CPU and generate flamegraphs
  2. 02Inspect memory use and leaks
  3. 03Analyze application bundle size
  4. 04Optimize database queries
  5. 05Run load tests with k6 and Artillery
  6. 06Establish before-and-after baselines

Use cases

  1. 01Find bottlenecks behind slow application responses
  2. 02Investigate steadily growing memory use
  3. 03Verify P99 latency before a release
  4. 04Test traffic capacity before launch

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/alirezarezvani/claude-skills --skill performance-profiler

After installing, type/performance-profilerin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
optimization-playbook.md
profiling-recipes.md
scripts/
performance_profiler.py

Details

From the project README

Performance Profiler

Tier: POWERFUL
Category: Engineering
Domain: Performance Engineering


Overview

Systematic performance profiling for Node.js, Python, and Go applications. Identifies CPU, memory, and I/O bottlenecks; generates flamegraphs; analyzes bundle sizes; optimizes database queries; detects memory leaks; and runs load tests with k6 and Artillery. Always measures before and after.

Core Capabilities

  • CPU profiling — flamegraphs for Node.js, py-spy for Python, pprof for Go
  • Memory profiling — heap snapshots, leak detection, GC pressure
  • Bundle analysis — webpack-bundle-analyzer, Next.js bundle analyzer
  • Database optimization — EXPLAIN ANALYZE, slow query log, N+1 detection
  • Load testing — k6 scripts, Artillery scenarios, ramp-up patterns
  • Before/after measurement — establish baseline, profile, optimize, verify

When to Use

  • App is slow and you don't know where the bottleneck is
  • P99 latency exceeds SLA before a release
  • Memory usage grows over time (suspected leak)
  • Bundle size increased after adding dependencies
  • Preparing for a traffic spike (load test before launch)
  • Database queries taking >100ms

Quick Start

# Analyze a project for performance risk indicators
python3 scripts/performance_profiler.py /path/to/project

# JSON output for CI integration
python3 scripts/performance_profiler.py /path/to/project --json

# Custom large-file threshold
python3 scripts/performance_profiler.py /path/to/project --large-file-threshold-kb 256

Golden Rule: Measure First

# Establish baseline BEFORE any optimization
# Record: P50, P95, P99 latency | RPS | error rate | memory usage

# Wrong: "I think the N+1 query is slow, let me fix it"
# Right: Profile → confirm bottleneck → fix → measure again → verify improvement

Node.js Profiling

→ See references/profiling-recipes.md for details

References

Comments

Markdown supported