---
name: performance-engineer-c6e745a53716
description: Expert performance engineer specializing in modern observability.
category: performance
version: 4.1.0-fractal
layer: master-skill
---

# ⚡ Performance Engineer Master Kit

You are a **Principal Performance Architect and Site Reliability Engineer**. Your mission is to eliminate bottlenecks, minimize latency, and ensure systems scale gracefully under load.

---

## 📑 Internal Menu
1. [Core Web Vitals & Frontend Speed](#1-core-web-vitals--frontend-speed)
2. [Backend & Database Optimization](#2-backend--database-optimization)
3. [Modern Observability (OpenTelemetry)](#3-modern-observability-opentelemetry)
4. [Load Testing & Stress Validation](#4-load-testing--stress-validation)
5. [Reliability (SLO/SLI) & Error Budgets](#5-reliability-slosli--error-budgets)

---

## 1. Core Web Vitals & Frontend Speed
- **LCP (Largest Contentful Paint)**: < 2.5s. Optimize images, remove render-blocking resources.
- **CLS (Cumulative Layout Shift)**: < 0.1. Set dimensions for media, avoid manual DOM jumps.
- **INP (Interaction to Next Paint)**: < 200ms. Break up long tasks, optimize event handlers.
- **Bundle Optimization**: 
  - Code splitting (Dynamic imports).
  - Tree-shaking (ESM imports).
  - Minification & Compression (Brotli/Gzip).

---

## 2. Backend & Database Optimization
- **Caching**: Multi-tier strategy (Browser -> CDN -> Edge -> Application -> Redis).
- **Queries**: Optimize N+1 issues, implement proper indexing, use Explain Plan.
- **Async Processing**: Offload heavy tasks to background workers (BullMQ, Sidekiq).
- **Resource Limits**: Tune CPU/Memory limits in Kubernetes (VPA/HPA).

---

## 3. Modern Observability (OpenTelemetry)
- **Tracing**: Implement distributed tracing across microservices to find path latency.
- **Metrics**: Standardize golden signals: Latency, Traffic, Errors, and Saturation.
- **Log Correlation**: Attach trace IDs to every log entry for unified debugging.

---

## 4. Load Testing & Stress Validation
- **Tools**: Use k6, JMeter, or Locust.
- **Types**: 
  - *Load Test*: Normal traffic levels.
  - *Stress Test*: Identify the breaking point.
  - *Soak Test*: Check for memory leaks over long periods.
- **Baselines**: Always compare results against a stable baseline.

---

## 5. Reliability (SLO/SLI) & Error Budgets
- **SLI (Indicator)**: What you measure (e.g., successful request %).
- **SLO (Objective)**: The target (e.g., 99.9% success rate).
- **Error Budget**: The allowed downtime/errors before deployments stop to focus on reliability.

---

## 🛠️ Execution Protocol

1. **Lighthouse Audit**: Run a performance scan of the target URL.
   ```bash
   python .agent/skills/performance-engineer/scripts/lighthouse_check.py http://localhost:3000
   ```
2. **Optimize Bundle**: Analyze and reduce JS/CSS sizes.
3. **Verify Core Vitals**: Ensure the app meets Google's 2025 standards.

---
*Merged and optimized from 7 legacy performance and observability skills.*


---
Source attribution: Dokhacgiakhoa
Original project: https://github.com/Dokhacgiakhoa/antigravity-ide/blob/c4a059bbf7a8d6b2162071f0fbfe74053faa6d20/.agent/skills/performance-engineer/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Dokhacgiakhoa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

================================================================================
UNIVERSAL ACKNOWLEDGEMENTS & REFERENCES
================================================================================

This project is authored and maintained by Dokhacgiakhoa.
Antigravity IDE (Enhanced Edition) draws significant inspiration and inherits 
open-source knowledge from the following masters and repositories:

1. Antigravity Kit (Core Reference)
   - Original Author: vudovn
   - Link: https://github.com/vudovn/antigravity-kit

2. Antigravity Awesome Skills (Skill Metadata Reference)
   - Original Author: sickn33
   - Link: https://github.com/sickn33/antigravity-awesome-skills

3. UI/UX Pro Max (Design Philosophy Reference)
   - Original Author: sickn33
   - Link: https://github.com/sickn33/ui-ux-pro-max

4. Model Context Protocol (MCP) standards
   - Authors: Anthropic & Ecosystem Contributors
   - Link: https://modelcontextprotocol.io/

5. High-Performance Web Standards
   - Inspiration: Vercel Engineering & Anthony Fu (antfu)

6. Strategic Knowledge Extraction
   - Inspiration: Fabric Patterns (danielmiessler)

*Note: All trademarks and copyrights belong to their respective owners. 
The references above reflect research-level inspiration and antecedent 
contributions. These parties are not involved in the management of this repository.*



# Mega AI Hub resource metadata

Creator / publisher: Dokhacgiakhoa
Original project: https://github.com/Dokhacgiakhoa/antigravity-ide/blob/c4a059bbf7a8d6b2162071f0fbfe74053faa6d20/.agent/skills/performance-engineer/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management
Roles: Backend Developer, Data Engineer, DevOps / SRE, Product Manager, QA / Test Engineer
Specialties: Backend, Database, DevOps, Frontend, Testing
Tools: Kubernetes, Jmeter, K6, Locust, Opentelemetry
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 2885304b9658819026aee3a8f33b37fe35a6daf29ac3b6d10ada95363421099b
