From aj-geddes-useful-ai-prompts-4
Identifies and debugs performance regressions from code changes using baseline comparison and profiling. Helps restore degraded metrics like response time, memory usage, and bundle size.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:performance-regression-debuggingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
Performance regressions occur when code changes degrade application performance. Detection and quick resolution are critical.
Minimal working example:
// Before: 500ms response time
// After: 1000ms response time (2x slower = regression)
// Capture baseline metrics
const baseline = {
responseTime: 500, // ms
timeToInteractive: 2000, // ms
largestContentfulPaint: 1500, // ms
memoryUsage: 50, // MB
bundleSize: 150, // KB gzipped
};
// Monitor after change
const current = {
responseTime: 1000,
timeToInteractive: 4000,
largestContentfulPaint: 3000,
memoryUsage: 150,
bundleSize: 200,
};
// Calculate regression
const regressions = {};
for (let metric in baseline) {
const change = (current[metric] - baseline[metric]) / baseline[metric];
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Detection & Measurement | Detection & Measurement |
| Root Cause Identification | Root Cause Identification |
| Fixing & Verification | Fixing & Verification |
| Prevention Measures | Prevention Measures |
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4Detects performance regressions across git versions by comparing benchmarks for latency (p50/p95/p99), throughput, memory, CPU/I/O, with statistical tests and reports.
Detects performance regressions in CI/CD pipelines by comparing metrics against baselines using statistical analysis. Trigger with phrases like 'detect performance regression'.
Diagnoses slow code, APIs, queries, memory growth, frontend load, build regressions, and scalability limits using a structured measurement-based workflow.