From aj-geddes-useful-ai-prompts-4
Identifies and debugs performance regressions from code changes using metric comparisons and profiling to restore baseline metrics.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4This skill uses the workspace's default tool permissions.
- [Overview](#overview)
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
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 |