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.zipInstalls 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.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
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
- Baseline: Profile before changing anything — measure CPU, memory, and latency.
- Identify: Find top bottleneck (N+1 query, hot loop, memory leak).
- Fix: Apply targeted optimization from sections below.
- 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:
Setfor lookups,Listfor 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
- Implementation Patterns — profiling patterns, benchmark setup
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| common-performance-engineering (this skill) | 0 | 13d | No flags | Intermediate |
| codex-code-review | 1 | 7mo | Review | Intermediate |
| dead-code | 1 | 6mo | Review | Intermediate |
| generate-subsystem-skills | 1 | 6mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by HoangNguyen0403
View all by HoangNguyen0403 →You might also like
codex-code-review
tyrchen
Perform comprehensive code reviews using OpenAI Codex CLI. This skill should be used when users request code reviews, want to analyze diffs/PRs, need security audits, performance analysis, or want automated code quality feedback. Supports reviewing staged changes, specific files, entire directories, or git diffs.
dead-code
parcadei
Find unused functions and dead code in the codebase
generate-subsystem-skills
llama-farm
Generate specialized skills for each subsystem in the monorepo. Creates shared language skills and subsystem-specific checklists for high-quality AI code generation.
generating-api-sdks
jeremylongshore
Generate client SDKs in multiple languages from OpenAPI specifications. Use when generating client libraries for API consumption. Trigger with phrases like "generate SDK", "create client library", or "build API SDK".
ast-grep-find
parcadei
AST-based code search and refactoring via ast-grep MCP
naming-analyzer
davila7
Suggest better variable, function, and class names based on context and conventions.