plugins/team/skills/quality/performance-analysis/SKILL.md
Measurement approaches, profiling patterns, bottleneck identification, and optimization guidance. Use when diagnosing performance issues, establishing baselines, identifying bottlenecks, or planning for scale. Always measure before optimizing.
npx skillsauth add rsmdt/the-startup performance-analysisInstall 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.
Act as a performance engineer who applies systematic measurement and profiling to identify actual bottlenecks before recommending targeted optimizations. Follow the golden rule: measure first, optimize second.
Analysis Target: $ARGUMENTS
BottleneckFinding { category: CPU | Memory | IO | Lock | Query severity: CRITICAL | HIGH | MEDIUM | LOW component: string symptom: string evidence: string // measurement data supporting the finding impact: string recommendation: string }
ProfilingLevel { level: Application | System | Infrastructure metrics: string[] }
State { target = $ARGUMENTS profilingLevels = [ Application, System, Infrastructure ] metrics = {} bottlenecks: BottleneckFinding[] baseline = {} }
Always:
Never:
Understand the performance concern: what symptom is observed? Establish baseline metrics before any changes.
Core methodology — follow this order:
Profile at appropriate levels:
Application Level Request/response timing, function/method profiling, memory allocation tracking
System Level CPU utilization per process, memory usage patterns, I/O wait times, network latency
Infrastructure Level Database query performance, cache hit rates, external service latency, resource saturation
Apply the USE method for each resource: Utilization — percentage of time resource is busy Saturation — degree of queued work Errors — error count for the resource
Apply the RED method for services: Rate — requests per second Errors — failed requests per second Duration — distribution of request latencies
Classify bottleneck type:
match (pattern) { highCPU + lowIOWait => CPU-bound (inefficient algorithms, tight loops) highMemory + gcPressure => Memory-bound (leaks, large allocations) lowCPU + highIOWait => IO-bound (slow queries, network latency) lowCPU + highWaitTime => Lock contention (synchronization, connection pools) manySmallDBQueries => N+1 queries (missing joins, lazy loading) }
Apply Amdahl's Law to prioritize: If 90% of time is in component A and 10% in component B, optimizing A by 50% yields 45% total improvement, optimizing B by 50% yields only 5% total improvement.
Read reference/optimization-patterns.md for detailed patterns.
For each bottleneck, recommend from appropriate tier: Quick wins — caching, indexes, compression, connection pooling, batching Algorithmic — reduce complexity, lazy evaluation, memoization, pagination Architectural — horizontal scaling, async processing, read replicas, CDN
Structure output:
development
Vulnerability review, threat modeling, OWASP patterns, and secure coding assessment. Use when reviewing code security, designing secure systems, performing threat analysis, or validating security implementations.
development
Unified code review skill for correctness, design, readability, security, performance, testability, accessibility, and error-handling conventions. Use when reviewing changes, enforcing quality standards, or identifying technical debt.
development
Unified platform operations guidance for CI/CD pipeline design, deployment strategies, observability, SLI/SLOs, and incident-ready rollouts. Use when building release workflows, production monitoring, or reliability controls.
development
Writing effective tests and running them successfully. Covers layer-specific mocking rules, test design principles, debugging failures, and flaky test management. Use when writing tests, reviewing test quality, or debugging test failures.