Identify and debug performance regressions from code changes. Use comparison and profiling to locate what degraded performance and restore baseline metrics.
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 |
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/performance-regression-debugging · pinned to the source commit
# Run from your project root
git clone https://github.com/aj-geddes/useful-ai-prompts.git .skillboard-tmp
git -C .skillboard-tmp checkout 3f5182cfd739fc113f4af5244a1cf342ad7f7911
mkdir -p ".claude/skills"
cp -r ".skillboard-tmp/skills/performance-regression-debugging" ".claude/skills/"
rm -rf .skillboard-tmpReview the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
sudo apt update && sudo apt install -y gitnpm install -g @anthropic-ai/claude-code# Run from your project root
git clone https://github.com/aj-geddes/useful-ai-prompts.git .skillboard-tmp
git -C .skillboard-tmp checkout 3f5182cfd739fc113f4af5244a1cf342ad7f7911
mkdir -p ".claude/skills"
cp -r ".skillboard-tmp/skills/performance-regression-debugging" ".claude/skills/"
rm -rf .skillboard-tmpDestination: .claude/skills/performance-regression-debugging
Scanner static-checks@0.1.0 · commit 3f5182cfd739. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
No static rules matched. This is not a safety guarantee.