performance-profiler

Profiles CPU, memory, bundle size, and database queries for Node.js, Python, and Go applications.

Updated May 21, 2025
One-click install
npx skills add https://github.com/nielslataire/Group-LN --skill performance-profiler-nielslataire
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: performance-profiler
Source: https://github.com/nielslataire/Group-LN/tree/main/.claude/skills/performance-profiler
Command: npx skills add https://github.com/nielslataire/Group-LN --skill performance-profiler-nielslataire

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Applications become slow without a clear indication of where the bottleneck is, and teams often optimize the wrong thing because they skip measurement. This Skill provides systematic profiling workflows for CPU, memory, I/O, bundle size, and database queries, with a mandatory before/after measurement discipline. ## Core Features & Use Cases - Multi-language profiling: Flamegraphs via clinic.js for Node.js, py-spy for Python, and pprof for Go, plus heap snapshots and memory leak detection. - Database and bundle analysis: EXPLAIN ANALYZE guidance, slow query detection, N+1 identification, and webpack/Next.js bundle analysis with concrete replacement suggestions. - Load testing: k6 and Artillery scenarios with ramp-up stages and P95/P99 latency thresholds for CI. - Use Case: Your API's P99 latency exceeds SLA before a release. Run the profiler script to flag risk indicators, generate a flamegraph to find the hot code path, fix the N+1 query, then re-run a k6 load test to verify the improvement. ## Quick Start Ask the AI to profile your project for performance bottlenecks by running the performance profiler script against your project directory and reviewing the report.

Frequently Asked Questions about performance-profiler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find performance bottlenecks in a Node.js application?▼

Use clinic.js to generate CPU flamegraphs with 'clinic flame -- node dist/server.js' while applying load with autocannon. For memory issues, capture heap snapshots via v8.writeHeapSnapshot and compare them in Chrome DevTools to spot leaks.

How to profile Python code with py-spy?▼

Run 'py-spy record -o flamegraph.svg --pid <pid>' against a running process to capture a flamegraph without code changes, or use 'py-spy top' for a live view. For function-level detail, use cProfile with pstats to rank functions by cumulative time.

How do I detect N+1 queries in my database code?▼

Enable query logging in your ORM or add a query counter, then assert the query count per request in tests. Fix N+1 patterns by replacing per-row queries with a single JOIN or batched fetch, and confirm with EXPLAIN ANALYZE.

What is the difference between k6 and Artillery for load testing?▼

Both are supported for load testing; k6 uses JavaScript test scripts with staged ramp-up patterns and threshold assertions like p(95)<500ms. The Skill's k6 examples include setup/teardown hooks, custom metrics, and error rate tracking.

Why should I measure baseline metrics before optimizing?▼

Optimizing without a baseline risks fixing the wrong bottleneck and leaves no way to verify improvement. Record P50, P95, P99 latency, RPS, error rate, and memory usage first, then re-measure after each single change to confirm causation.

Does the performance profiler script require external dependencies?▼

No, the performance_profiler.py script uses only the Python standard library. It scans a project directory for large files, dependency counts from package.json, requirements.txt, and go.mod, and bundle size indicators, with optional JSON output for CI.