/gabbe-ops:performance-auditfrom gabbe-ops
Identifies performance bottlenecks through measurement: load tests, CPU/memory profiles, Web Vitals, N+1 queries, slow SQL, and bundle size. Verifies each fix with before/after benchmarks.
Ships in gabbe-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Identify performance bottlenecks through measurement (never guessing), propose evidence-based optimizations, and verify improvements with benchmarks. Performance changes must not introduce regressions.
Establish performance baseline (always measure before optimizing)
# API endpoint load testing
npx [email protected] -c 100 -d 30 http://localhost:3000/api/users
# Node.js profiling
node --prof src/server.js
node --prof-process isolate-*.log > profile.txt
# PHP profiling with Blackfire
blackfire curl http://localhost:8000/api/endpoint
# Python profiling (py-spy)
py-spy record -o profile.svg --pid <PID>
# or cProfile
python -m cProfile -o output.pstats src/main.py
blackfire curl http://localhost:8000/api/users
Web Vitals audit (for web applications)
# Lighthouse CI
npx [email protected] http://localhost:3000 --output=json --output-path=./lighthouse-report.json
# Target thresholds (Core Web Vitals):
LCP (Largest Contentful Paint): < 2.5s (Good), < 4s (Needs Improvement)
INP (Interaction to Next Paint): < 200ms (Good), < 500ms (Needs Improvement)
CLS (Cumulative Layout Shift): < 0.1 (Good), < 0.25 (Needs Improvement)
Detect N+1 query patterns
# Enable query logging (development only)
# Prisma:
const prisma = new PrismaClient({ log: ['query'] });
# Laravel:
DB::listen(fn($q) => logger($q->sql));
php artisan telescope # if Laravel Telescope installed
N+1 pattern to look for:
// BAD: N+1 — one query per user
const users = await prisma.user.findMany();
const usersWithOrders = await Promise.all(
users.map(u => prisma.order.findMany({ where: { userId: u.id } }))
);
// GOOD: single query with include
const users = await prisma.user.findMany({
include: { orders: true }
});
Database query analysis
-- PostgreSQL: check slow queries
SELECT query, mean_exec_time, calls
FROM pg_stat_statements
ORDER BY mean_exec_time DESC
LIMIT 20;
-- Check missing indexes
EXPLAIN ANALYZE SELECT * FROM users WHERE email = '[email protected]';
-- Look for: Seq Scan on large tables = missing index
Memory and CPU profiling
# Node.js: clinic.js for comprehensive profiling
npx [email protected] doctor -- node src/server.js
npx [email protected] flame -- node src/server.js # Flamegraph for CPU
# Python: cProfile
python -m cProfile -o profile.stats src/main.py
python -m pstats profile.stats
Frontend performance
# Bundle size analysis
npx [email protected] dist/stats.json # Webpack
npx [email protected] # Vite
# Look for: unnecessarily large bundles, duplicate dependencies
# Target: main bundle < 200KB gzipped for initial load
Identify and fix top bottlenecks
Common fixes:
include/with eager loadingVerify improvement with benchmark
# Before fix: baseline benchmark saved
npx [email protected] -c 100 -d 30 http://localhost:3000/api/users > before.txt
# After fix: run same benchmark
npx [email protected] -c 100 -d 30 http://localhost:3000/api/users > after.txt
# Compare: must show measurable improvement
Run regression tests
Generate performance report
## Performance Audit Report
Date: [date]
### Baseline (before optimization)
- API /users: p50=450ms, p99=2100ms, 45 req/s
- Web Vitals: LCP=3.8s (Needs Improvement), CLS=0.05
### Issues Found
- [CRITICAL] N+1 query in UserService.getAll() — 1 + N queries per request
- [HIGH] Missing index on users.email column
- [MEDIUM] API response includes 47 fields, frontend uses 8
### Optimizations Applied
- Added Prisma include for orders (removes N+1)
- Added index: CREATE INDEX idx_users_email ON users(email)
- Added response projection to return only needed fields
### After Optimization
- API /users: p50=45ms (-99%), p99=120ms (-94%), 380 req/s (+744%)
- Web Vitals: LCP=1.8s (Good)
### Verification
- All 247 tests passing (no regressions)
- Benchmark improvement: confirmed and significant
Performance report with before/after benchmarks + list of optimizations applied + verification results.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub andreibesleaga/gabbe --plugin gabbe-ops26 skills in this plugin
/caching-strategyChoose a cache pattern (cache-aside, read-through, write-through, write-behind) with TTLs, invalidation, key naming and fallbacks for Redis or Memcached. Use when you add a cache, see stale data, or a hot key overloads the store./capacity-planningEstimate how many instances, how much memory, IO and connections a service needs, from a baseline, a growth factor, a load test and headroom. Use when you plan for a traffic increase, size a cluster or set autoscaling limits./cloud-deployConfigure and deploy an app to Vercel, Railway or AWS (SST) with config files in the repo, parity of environments and no hand-set options. Use when you pick a hosting platform or write vercel.json, railway.toml or sst.config.ts./configuration-managementWrite a software configuration management plan - branching model, baselines, change control, reproducible builds, versioning, SBOM and configuration audit. Use when a project has no clear release identity, builds differ between machines, or you must choose trunk or git-flow./cost-optimizationFind cloud spend that can be cut (idle compute, unused storage, network, over-sized databases) and report each item with savings and risk. Use when the cloud bill grows, a FinOps review is due, or you look for unused resources./decommission-sunsetPlan the retirement of a service or product - deprecation timeline, data retention and export, user notices, contracts, traffic drain, teardown and checks afterwards. Use when the human decides to retire or shut down a system.Other plugins' skills for the same job