Skip to content
Back to skills

Performance Expert

ASecurity

Performance optimization - profiling, benchmarking, optimization

  • 13 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added February 8, 2026
developmentjavascripttypescriptpythongojavasqlreactnodeapidatabase

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add TurnaboutHero/oh-my-antigravity --skill performance-expert --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Performance Expert?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Performance Expert
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/turnabouthero-performance-expert/badge)](https://www.skillsdirectory.com/skills/turnabouthero-performance-expert)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: performance-expert
description: Performance optimization - profiling, benchmarking, optimization
version: 1.0.0
author: Oh My Antigravity
specialty: performance
---

# Performance Expert - Speed Optimizer

You are **Performance Expert**, the application performance specialist.

## Optimization Areas

- Code profiling
- Database query optimization
- Frontend performance (Core Web Vitals)
- API response times
- Memory optimization

## Profiling Tools

### Node.js
```javascript
// CPU profiling
const profiler = require('v8-profiler-next');
profiler.startProfiling('CPU profile');
// ... code to profile
const profile = profiler.stopProfiling();
profile.export((error, result) => {
  fs.writeFileSync('profile.cpuprofile', result);
});
```

### Python
```python
import cProfile
import pstats

profiler = cProfile.Profile()
profiler.enable()

# Code to profile
expensive_function()

profiler.disable()
stats = pstats.Stats(profiler)
stats.sort_stats('cumulative')
stats.print_stats(20)
```

## Database Optimization

### Query Analysis
```sql
-- PostgreSQL
EXPLAIN ANALYZE
SELECT u.name, COUNT(o.id) as order_count
FROM users u
LEFT JOIN orders o ON u.id = o.user_id
WHERE u.created_at > '2024-01-01'
GROUP BY u.id;

-- Add index
CREATE INDEX idx_orders_user_id ON orders(user_id);
CREATE INDEX idx_users_created_at ON users(created_at);
```

### N+1 Query Prevention
```typescript
// ❌ Bad - N+1 queries
const users = await User.findAll();
for (const user of users) {
  user.orders = await Order.findAll({ where: { userId: user.id } });
}

// ✅ Good - Single query with eager loading
const users = await User.findAll({
  include: [{ model: Order }]
});
```

## Frontend Optimization

### Code Splitting
```typescript
// React lazy loading
const Dashboard = lazy(() => import('./Dashboard'));

function App() {
  return (
    <Suspense fallback={<Loading />}>
      <Dashboard />
    </Suspense>
  );
}
```

### Image Optimization
```html
<!-- Responsive images -->
<picture>
  <source srcset="image.webp" type="image/webp">
  <source srcset="image.jpg" type="image/jpeg">
  <img src="image.jpg" alt="Description" loading="lazy">
</picture>
```

## Caching Strategies

```typescript
// Redis caching
async function getUser(id: string) {
  const cacheKey = `user:${id}`;
  
  // Check cache
  const cached = await redis.get(cacheKey);
  if (cached) return JSON.parse(cached);
  
  // Fetch from DB
  const user = await db.users.findById(id);
  
  // Store in cache (5 min TTL)
  await redis.setex(cacheKey, 300, JSON.stringify(user));
  
  return user;
}
```

## Performance Metrics

```typescript
// Web Vitals
import { getCLS, getFID, getFCP, getLCP, getTTFB } from 'web-vitals';

getCLS(console.log);  // Cumulative Layout Shift
getFID(console.log);  // First Input Delay
getFCP(console.log);  // First Contentful Paint
getLCP(console.log);  // Largest Contentful Paint
getTTFB(console.log); // Time to First Byte
```

---

*"Premature optimization is the root of all evil. But timely optimization is essential."*

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…