common-performance-engineering

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. (triggers: **/*.ts, **/*.tsx, **/*.go, **/*.dart, **/*.java, **/*.kt, **/*.swift, **/*.py, performance, optimize, profile, scalability, latency, throughput, memory leak, bottleneck)

385 stars

Best use case

common-performance-engineering is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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. (triggers: **/*.ts, **/*.tsx, **/*.go, **/*.dart, **/*.java, **/*.kt, **/*.swift, **/*.py, performance, optimize, profile, scalability, latency, throughput, memory leak, bottleneck)

Teams using common-performance-engineering should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/common-performance-engineering/SKILL.md --create-dirs "https://raw.githubusercontent.com/HoangNguyen0403/agent-skills-standard/main/.agent/skills/common/common-performance-engineering/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/common-performance-engineering/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How common-performance-engineering Compares

Feature / Agentcommon-performance-engineeringStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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. (triggers: **/*.ts, **/*.tsx, **/*.go, **/*.dart, **/*.java, **/*.kt, **/*.swift, **/*.py, performance, optimize, profile, scalability, latency, throughput, memory leak, bottleneck)

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Performance Engineering Standards

## **Priority: P0 (CRITICAL)**

## Workflow

1. **Baseline**: Profile before changing anything — measure CPU, memory, and latency.
2. **Identify**: Find the top bottleneck (N+1 query, hot loop, memory leak).
3. **Fix**: Apply the targeted optimization from the 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](references/implementation.md) 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](references/implementation.md) — profiling patterns, benchmark setup

Related Skills

react-performance

385
from HoangNguyen0403/agent-skills-standard

Optimize React rendering, bundle size, and data fetching performance. Use when optimizing React rendering performance, reducing re-renders, or improving bundle size. (triggers: **/*.tsx, **/*.jsx, waterfall, bundle, lazy, suspense, dynamic)

react-native-performance

385
from HoangNguyen0403/agent-skills-standard

Optimize React Native rendering for smooth 60fps mobile experiences. Use when optimizing React Native app performance, reducing re-renders, or fixing frame drops. (triggers: **/*.tsx, **/*.ts, FlatList, memo, useMemo, useCallback, performance, optimization)

quality-engineering-zephyr-test-generation

385
from HoangNguyen0403/agent-skills-standard

Generate Zephyr test cases from Jira stories: parse AC, identify platform and market, impact-analyze existing TCs (update vs create new), draft test cases with correct naming/metadata/preconditions, and link back via Create Test Case Issue Link. Use when converting a Jira story into Zephyr TCs, or when requirement changes require updating existing TCs rather than creating duplicates. (triggers: **/user_story.md, generate test cases, zephyr, impact analysis, create test case)

quality-engineering-zephyr-coverage-analysis

385
from HoangNguyen0403/agent-skills-standard

Audit test coverage health, gaps, and QE debt for Jira stories or epics. Produces coverage_analysis_report.md with AC-to-TC heatmap, risk scores, and prioritized action plan. Use when assessing coverage percentage, pre-release readiness, sprint readiness, or identifying missing test cases. Do NOT use for TC creation — use zephyr-test-generation instead. (triggers: coverage analysis, test coverage, coverage gaps, QE debt, QE audit, pre-release readiness, sprint readiness, coverage_analysis_report.md, zephyr coverage, test gap, AC coverage, test-ready)

quality-engineering-quality-assurance

385
from HoangNguyen0403/agent-skills-standard

Write manual test cases with 1-condition-per-TC granularity, Module_Action on Screen when Condition naming, platform prefix rules, and High/Normal/Low priority classification. Use when writing or reviewing manual test cases for Zephyr — to split compound TCs, fix naming violations, assign correct platform tags, or determine bug priority. (triggers: test case, manual test, zephyr, test scenario, naming convention, acceptance criteria)

quality-engineering-jira-integration

385
from HoangNguyen0403/agent-skills-standard

Jira ↔ Zephyr traceability: fetch story AC and components, detect existing TC links, link new Zephyr TCs back to Jira, and apply has-zephyr-tests labels. Use after creating Zephyr test cases that need linking, when fetching a Jira story's details for test generation, or when auditing and cleaning up stale TC links. (triggers: jira issue, zephyr link, has-zephyr-tests, traceability, link test case, EZRX-)

quality-engineering-business-analysis

385
from HoangNguyen0403/agent-skills-standard

Investigate requirements with atomic AC decomposition, actor/permission matrix, platform parity audit, truth table verification, and edge case discovery. Also enforces User Story authoring standards: story structure, scope fences, platform tags, toggle contracts, market isolation, and deferral patterns. Use when writing, reviewing, or improving User Stories, acceptance criteria, or doing impact analysis — especially for stories with multi-condition AC, feature toggles, market variants (VN/MY/SG), or undefined platform behavior. (triggers: **/user_story.md, acceptance criteria, AC, business rules, jira story, toggle, market, write user story, improve user story, review story, BA)

nestjs-performance

385
from HoangNguyen0403/agent-skills-standard

Optimize NestJS throughput with Fastify adapter, singleton scope enforcement, compression, and query projections. Use when switching to Fastify, diagnosing request-scoped bottlenecks, or profiling API overhead. (triggers: main.ts, FastifyAdapter, compression, SINGLETON, REQUEST scope)

ios-performance

385
from HoangNguyen0403/agent-skills-standard

Profile and optimize iOS apps with Instruments, memory management, and rendering techniques. Use when profiling iOS apps with Instruments or optimizing memory and rendering. (triggers: **/*.swift, Instruments, Allocations, Leaks, dequeueReusableCell)

flutter-performance

385
from HoangNguyen0403/agent-skills-standard

Optimization standards for rebuilds and memory. Use when optimizing Flutter widget rebuilds, reducing memory usage, or improving rendering performance. (triggers: lib/presentation/**, pubspec.yaml, const, buildWhen, ListView.builder, Isolate, RepaintBoundary)

common-observability

385
from HoangNguyen0403/agent-skills-standard

Enforce structured JSON logging, OpenTelemetry distributed tracing, and RED metrics across backend services. Use when adding request correlation, setting up tracing spans, defining SLO burn-rate alerts, or instrumenting middleware. (triggers: **/*.service.ts, **/*.handler.ts, **/*.middleware.ts, **/*.interceptor.ts, **/*.go, **/*.java, **/*.kt, **/*.py, logging, tracing, metrics, opentelemetry, observability, slo)

common-mobile-ux-core

385
from HoangNguyen0403/agent-skills-standard

Enforce universal mobile UX principles for touch-first interfaces including touch targets, safe areas, and mobile-specific interaction patterns. Use when building mobile screens, handling touch interactions, or validating safe area compliance. (triggers: **/*_page.dart, **/*_screen.dart, **/*_view.dart, **/*.swift, **/*Activity.kt, **/*Screen.tsx, mobile, responsive, SafeArea, touch, gesture, viewport)