skills/ariegoldkin/performance-optimization/SKILL.md
Full-stack performance analysis, optimization patterns, and monitoring strategies
npx skillsauth add aiskillstore/marketplace performance-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive frameworks for analyzing and optimizing application performance across the entire stack.
| Metric | Good | Needs Work | |--------|------|------------| | LCP (Largest Contentful Paint) | < 2.5s | < 4s | | INP (Interaction to Next Paint) | < 200ms | < 500ms | | CLS (Cumulative Layout Shift) | < 0.1 | < 0.25 | | TTFB (Time to First Byte) | < 200ms | < 600ms |
| Operation | Target | |-----------|--------| | Simple reads | < 100ms | | Complex queries | < 500ms | | Write operations | < 200ms | | Index lookups | < 10ms |
| Category | Symptoms | Tools | |----------|----------|-------| | Network | High TTFB, slow loading | Network tab, WebPageTest | | Database | Slow queries, pool exhaustion | EXPLAIN ANALYZE, pg_stat_statements | | CPU | High usage, slow compute | Profiler, flame graphs | | Memory | Leaks, GC pauses | Heap snapshots | | Rendering | Layout thrashing | React DevTools, Performance tab |
Seq Scan into Index Scaninclude instead of loops-- Find slow queries (PostgreSQL)
SELECT query, calls, mean_time / 1000 as mean_seconds
FROM pg_stat_statements ORDER BY total_time DESC LIMIT 10;
-- Verify index usage
EXPLAIN ANALYZE SELECT * FROM orders WHERE user_id = 123;
See
templates/database-optimization.tsfor N+1 fixes and pagination patterns
L1: In-Memory (LRU, memoization) - fastest
L2: Distributed (Redis/Memcached) - shared
L3: CDN (edge, static assets) - global
L4: Database (materialized views) - fallback
const cached = await redis.get(key);
if (cached) return JSON.parse(cached);
const data = await db.query(...);
await redis.setex(key, 3600, JSON.stringify(data));
return data;
See
templates/caching-patterns.tsfor full implementation
lazy() for route-based splittingmemo(), useCallback(), useMemo()See
templates/frontend-optimization.tsxfor patterns
# Lighthouse audit
lighthouse http://localhost:3000 --output=json
# Bundle analysis
npx @next/bundle-analyzer # Next.js
npx vite-bundle-visualizer # Vite
See
templates/api-optimization.tsfor middleware examples
See
templates/performance-metrics.tsfor Prometheus metrics setup
Use Opus 4.5 extended thinking for:
| Template | Purpose |
|----------|---------|
| database-optimization.ts | N+1 fixes, pagination, pooling |
| caching-patterns.ts | Redis cache-aside, memoization |
| frontend-optimization.tsx | React memo, virtualization, code splitting |
| api-optimization.ts | Compression, ETags, field selection |
| performance-metrics.ts | Prometheus metrics, performance budget |
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.