askill
performance-audit

performance-auditSafety --Repository

Performance profiling with phased workflow, bottleneck patterns, and diagnostic queries. Use when diagnosing slow responses, high memory usage, or optimizing application performance.

1 stars
1.2k downloads
Updated 2/6/2026

Package Files

Loading files...
SKILL.md

Performance Audit

Decision Tree

Performance issue → Where is it slow?
    ├─ API response time → Check DB queries, N+1, missing indexes
    ├─ Page load → Check bundle size, images, network waterfall
    ├─ Memory growing → Check for leaks (event listeners, closures, unclosed resources)
    ├─ Build/CI slow → Check caching, parallelization, unnecessary steps
    └─ Unknown → Profile first, then follow the data

Phases

Phase 1: Measure (baseline) → Phase 2: Identify (profile) → Phase 3: Fix → Phase 4: Verify (compare to baseline)

Key Metrics

MetricTargetTool
API response time (p95)<200msLoad test, APM
Time to First Byte<100mscurl -w, Lighthouse
First Contentful Paint<1.5sLighthouse, WebPageTest
Memory usageStable over timetop, htop, profiler
DB query time<50ms per queryQuery logs, EXPLAIN
Bundle size (JS)<200KB gzippednpx bundlesize, webpack-bundle-analyzer

Profiling Commands

# Node.js
node --prof app.js                 # V8 profiler
clinic doctor -- node app.js       # Auto-diagnose (npm i -g clinic)

# Python
python -m cProfile -s cumtime app.py
py-spy record -o profile.svg -- python app.py

# Database
EXPLAIN ANALYZE SELECT ...;         # PostgreSQL

Common Bottlenecks

PatternSymptomFix
N+1 queriesSlow list pages, many DB callsEager loading, JOIN, batch fetch
Missing indexSlow queries on large tablesAdd index on WHERE/JOIN columns
Unbounded queryMemory spike, timeoutAdd LIMIT, pagination
Synchronous I/OBlocked event loopasync/await, worker threads
Large payloadSlow API, high bandwidthPagination, field selection, compression
No cachingRepeated expensive operationsRedis, in-memory cache, HTTP cache headers
Unoptimized imagesSlow page loadWebP, lazy loading, srcset
Memory leakGrowing memory, eventual crashHeap snapshots, check event listeners/closures

Database Query Analysis

-- PostgreSQL: Find slow queries
SELECT query, mean_exec_time, calls
FROM pg_stat_statements ORDER BY mean_exec_time DESC LIMIT 10;

-- Find missing indexes
SELECT relname, seq_scan, idx_scan
FROM pg_stat_user_tables WHERE seq_scan > idx_scan ORDER BY seq_scan DESC;

Output Format

[IMPACT: HIGH|MEDIUM|LOW] Category - Finding
  Measured: Current value
  Target: Expected value
  Fix: Specific optimization

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

AI review pending.

Metadata

Licenseunknown
Version-
Updated2/6/2026
PublisherBigPapiCB

Tags

apici-cddatabaseobservabilitytesting