Skip to main content
skill CX Codex

performance-profiler · onewave-ai — Claude Code skill: install and use

This skill guides performance profiling across network, rendering, memory, and compute. Use it when an app loads slowly, leaks memory, or needs measured tuning.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add OneWave-AI/claude-skills --skill performance-profiler -a claude-code
Open on GitHub

What performance-profiler does

The skill follows a profiling workflow: classify the bottleneck, record a baseline, choose a suitable tool, apply a change, and measure again. Its web section covers Lighthouse, Core Web Vitals, and bundle inspection for Next.js, Webpack, and Vite.

It also walks through React DevTools Profiler, memoization, list virtualization, and lazy loading. For Node.js, it includes CPU profiles, heap snapshots, and Clinic.js commands. Database guidance covers EXPLAIN ANALYZE, missing-index checks, and replacing N+1 access with a single query.

React profiling requires the React DevTools browser extension before the Profiler workflow can be used. The skill also covers compression, cache headers, CDNs, image sizing, and connection pooling.

What it helps with

  • locate a web page loading bottleneck
  • check Core Web Vitals results
  • trace a slow React component
  • inspect a Node.js memory leak
  • analyze slow PostgreSQL queries

Example prompts for the agent

  • Profile this app with Lighthouse and explain which Core Web Vitals need attention.
  • Use React DevTools Profiler to find the slow component and suggest changes I can measure.
  • Analyze these PostgreSQL queries with EXPLAIN ANALYZE and check for missing indexes.

How to install performance-profiler

1Skills CLI (Vercel)

npx skills add OneWave-AI/claude-skills --skill performance-profiler -a claude-code

2Manually: put the files in place

~/.claude/skills/performance-profiler/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/performance-profiler/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about performance-profiler

How do I install performance-profiler in Claude Code?

Run npx skills add OneWave-AI/claude-skills --skill performance-profiler -a claude-code, then check ~/.claude/skills/performance-profiler/SKILL.md.

What does performance-profiler do?

It structures performance checks for web apps, React, Node.js, and PostgreSQL, from baseline measurement through targeted changes and a follow-up measurement.

What is required for React profiling?

Install the React DevTools browser extension, open DevTools, and use its Profiler tab.

Source text

SKILL.md · MIT
---
name: performance-profiler
description: Profile and optimize application performance including load times, memory usage, and rendering. Use when debugging slow performance, memory leaks, or optimizing app speed.
---

# Performance Profiler

## Instructions

When profiling performance:

1. **Identify the bottleneck type**: Network, rendering, memory, or compute
2. **Measure baseline** before optimizing
3. **Profile with appropriate tools**
4. **Apply optimizations**
5. **Measure improvement**

## Web Performance

### Core Web Vitals

```bash
# Lighthouse CLI
npx lighthouse https://yoursite.com --view

# With specific metrics
npx lighthouse https://yoursite.com --only-categories=performance
```

**Target Metrics**:
| Metric | Good | Needs Work | Poor |
|--------|------|------------|------|
| LCP (Largest Contentful Paint) | < 2.5s | 2.5-4s | > 4s |
| INP (Interaction to Next Paint) | < 200ms | 200-500ms | > 500ms |
| CLS (Cumulative Layout Shift) | < 0.1 | 0.1-0.25 | > 0.25 |

### Bundle Analysis

```bash
# Next.js
ANALYZE=true npm run build

# Webpack
npx webpack-bundle-analyzer stats.json

# Vite
npx vite-bundle-visualizer
```

## React Performance

### React DevTools Profiler

1. Install React DevTools browser extension
2. Open DevTools → Profiler tab
3. Click Record, interact with app, stop recording
4. Analyze flame graph for slow components

### Common React Optimizations

```tsx
// 1. Memoize expensive components
const MemoizedList = React.memo(function List({ items }) {
  return items.map(item => <Item key={item.id} {...item} />);
});

// 2. Use useMemo for expensive calculations
const sortedItems = useMemo(() => {
  return [...items].sort((a, b) => a.name.localeCompare(b.name));
}, [items]);

// 3. Use useCallback for stable function references
const handleClick = useCallback((id: string) => {
  setSelected(id);
}, []);

// 4. Virtualize long lists
import { FixedSizeList } from 'react-window';

function VirtualList({ items }) {
  return (
    <FixedSizeList
      height={400}
      itemCount={items.length}
      itemSize={50}
      width="100%"
    >
      {({ index, style }) => (
        <div style={style}>{items[index].name}</div>
      )}
    </FixedSizeList>
  );
}

// 5. Lazy load components
const HeavyComponent = React.lazy(() => import('./HeavyComponent'));

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

## Node.js Performance

### Profiling

```bash
# CPU profile
node --prof app.js
node --prof-process isolate-*.log > profile.txt

# Heap snapshot
node --inspect app.js
# Then use Chrome DevTools Memory tab

# Clinic.js (comprehensive)
npx clinic doctor -- node app.js
npx clinic flame -- node app.js
npx clinic bubbleprof -- node app.js
```

### Memory Leak Detection

```javascript
// Add to app for debugging
const used = process.memoryUsage();
console.log({
  heapUsed: `${Math.round(used.heapUsed / 1024 / 1024)} MB`,
  heapTotal: `${Math.round(used.heapTotal / 1024 / 1024)} MB`,
  external: `${Math.round(used.external / 1024 / 1024)} MB`,
});
```

## Database Performance

```sql
-- PostgreSQL: Analyze slow queries
EXPLAIN ANALYZE SELECT * FROM users WHERE email = '[email protected]';

-- Find missing indexes
SELECT relname, seq_scan, idx_scan
FROM pg_stat_user_tables
WHERE seq_scan > idx_scan;
```

### Query Optimization

```typescript
// Bad: N+1 query
const users = await db.user.findMany();
for (const user of users) {
  const posts = await db.post.findMany({ where: { userId: user.id } });
}

// Good: Single query with include
const users = await db.user.findMany({
  include: { posts: true }
});

// Good: Select only needed fields
const users = await db.user.findMany({
  select: { id: true, name: true, email: true }
});
```

## Quick Wins Checklist

- [ ] Enable gzip/brotli compression
- [ ] Add caching headers
- [ ] Lazy load images (`loading="lazy"`)
- [ ] Preconnect to external domains
- [ ] Use CDN for static assets
- [ ] Minimize JavaScript bundle
- [ ] Defer non-critical JS
- [ ] Optimize images (WebP, proper sizing)
- [ ] Add database indexes
- [ ] Use connection pooling

© OneWave-AI · MIT · OneWave-AI/claude-skills

Similar skills

Everything for Frontend and UI →

performance-profiler by other authors comes first.

From the same set95

deal-review-framework A skill that runs a deal through MEDDIC and BANT, scores the risk, asks for stage evidence and flags red flags. CX Codex +1 317installs skill-composer-studio Chains standalone agent skills into multi-step pipelines with automated data handoffs and conditional routing. Built for orchestrating complex composite tasks. CX Codex +1 314installs champion-identifier Reads LinkedIn profiles inside a target account and points to the person most likely to push your product from within. Useful before cold outreach into a large account. CX Codex +1 312installs team-chemistry-evaluator Evaluates sports team psychology, roster compatibility, and leadership dynamics. Helps predict how new signings or trades affect locker room culture. CX Codex +1 311installs intent-signal-aggregator A skill that gathers buying signals — job posts, funding rounds, leadership changes — and ranks accounts by how ready they are to buy. CX Codex +1 310installs practice-plan-creator The skill lays out a sport practice session by block: warm-up, skill work, scrimmage, cool-down, matched to group level and time. CX Codex +1 310installs deal-momentum-analyzer Scores deal velocity using email response times, meeting frequency, and stakeholder engagement. It flags stalling pipeline deals before they drop off. CX Codex +1 309installs quota-setting-calculator A skill that builds sales quota models top-down or bottom-up, with adjustments for ramp periods and territory complexity. CX Codex +1 309installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor