Claude Cursor Skill

performance-profiler

Use for a slow endpoint, memory leak, CPU spike, large bundle or performance budget in Node.js, Python or Go, before optimizing. Measures before and after with performance_profiler.py, flamegraphs and k6 load tests.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Download beginwithu-agent-skills-skills_performance-profiler-a960304.zip · 10 KB

Install

skills CLI npx skills add https://github.com/beginwithu/agent-skills/tree/main/skills/performance-profiler
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install beginwithu-agent-skills@llmmart
Git git clone https://github.com/beginwithu/agent-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole beginwithu/agent-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

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

Files (agent-skills)
  • references
    • optimization-playbook.md 3.2 KB
      Loading…
    • profiling-recipes.md 11.3 KB
      Loading…
  • scripts
    • performance_profiler.py 6 KB
      Loading…
  • LICENSE 1 KB · in bundle
  • SKILL.md 2.5 KB
    ---
    name: performance-profiler
    description: "Use for a slow endpoint, memory leak, CPU spike, large bundle or performance budget in Node.js, Python or Go, before optimizing. Measures before and after with performance_profiler.py, flamegraphs and k6 load tests."
    ---
    
    # 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
    
    ```bash
    # 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
    
    ```bash
    # 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
    
    - [references/profiling-recipes.md](references/profiling-recipes.md) — Node.js/Python/Go profiling commands, flamegraph generation, heap snapshots
    - [references/optimization-playbook.md](references/optimization-playbook.md) — before/after measurement template, quick-win optimization checklist (DB/Node/bundle/API), common pitfalls, best practices
    
    

Comments

Sign in to join the conversation.

No comments yet. Start the conversation.

Reviews (0)

No reviews yet.