CO

common-performance-engineering

Enforces performance engineering standards including profiling, bottleneck identification, and optimization.

Install

mkdir -p .claude/skills/common-performance-engineering && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19269" && unzip -o skill.zip -d .claude/skills/common-performance-engineering && rm skill.zip

Installs to .claude/skills/common-performance-engineering

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Enforce universal standards for high-performance development. Use when profiling bottlenecks, reducing latency, fixing memory leaks, improving throughput, or optimizing algorithm complexity in any language.
206 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Profile CPU, memory, and latency to establish a performance baseline.
  • Identify performance bottlenecks like N+1 queries or hot loops.
  • Apply targeted optimizations for memory efficiency and CPU usage.
  • Verify performance improvements and check for regressions through re-profiling.
  • Optimize network and I/O operations using techniques like batching and caching.
  • Improve UI/UX performance by minimizing main thread work and using virtualization.

How it works

The skill follows a structured workflow of baselining, identifying bottlenecks, applying fixes, and verifying improvements to enhance application performance across various resource types.

Inputs & outputs

You give it
Application code or system under test
You get back
Performance metrics and optimized code

When to use common-performance-engineering

  • Profile CPU usage in a critical path
  • Identify and fix a memory leak
  • Optimize an algorithm for better complexity
  • Reduce network payload using compression

About this skill

Performance Engineering Standards

Priority: P0 (CRITICAL)

Workflow

  1. Baseline: Profile before changing anything — measure CPU, memory, and latency.
  2. Identify: Find top bottleneck (N+1 query, hot loop, memory leak).
  3. Fix: Apply targeted optimization from sections below.
  4. Verify: Re-profile to confirm improvement and check for regressions.

Resource Management

  • Memory Efficiency:
  • Avoid memory leaks: explicit cleanup of listeners, observers, and streams.
  • Optimize data structures: Set for lookups, List for iteration.
  • Lazy Initialization: Initialize expensive objects only when needed.
  • CPU Optimization:
  • Aim for O(1) or O(n); avoid O(n^2) in critical paths.
  • Offload heavy computations to background threads or workers.
  • Memoize pure, expensive functions.

See implementation examples for memoization and batching patterns.

Network & I/O

  • Payload Reduction: Use efficient serialization (Protobuf, JSON minification) and compression (gzip/br).
  • Batching: Group multiple small requests into single bulk operations.
  • Caching: Implement multi-level caching (Memory -> Storage -> Network) with appropriate TTL and invalidation.
  • Non-blocking I/O: Always use asynchronous operations for file system and network access.

UI/UX Performance

  • Minimize Main Thread Work: Keep animations and interactions fluid by offloading to workers.
  • Virtualization: Use lazy loading or virtualization for long lists/large datasets.
  • Tree Shaking: Ensure build tools remove unused code and dependencies.

Monitoring & Testing

  • Benchmarking: Write micro-benchmarks for performance-critical functions.
  • SLIs/SLOs: Define Service Level Indicators (latency, throughput) and Objectives.
  • Load Testing: Test system behavior under peak and stress conditions.

Anti-Patterns

  • No premature optimization: Profile first, fix proven bottlenecks only.
  • No N+1 queries: Always batch and paginate data-access operations.
  • No synchronous I/O on main thread: Async all file/network access.

References

Canonical response anchors

When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:

  • lazy

  • Additional task-grounded exact anchors: premature

When not to use it

  • Optimizing without prior profiling.
  • Implementing N+1 queries.
  • Using synchronous I/O on the main thread.

Limitations

  • Requires profiling before making changes.
  • Discourages premature optimization.
  • Avoids synchronous I/O on the main thread.

How it compares

This skill provides a systematic, evidence-based approach to performance optimization, contrasting with ad-hoc changes that may not address actual bottlenecks.

Compared to similar skills

common-performance-engineering side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
common-performance-engineering (this skill)013dNo flagsIntermediate
codex-code-review17moReviewIntermediate
dead-code16moReviewIntermediate
generate-subsystem-skills16moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry