Skip to main content
skill CX Codex

profiling-performance — Claude Code skill: usage and install

This skill profiles web application CPU performance using browser MCP tools. It captures call stacks and pinpoints slow functions causing interface lag.

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

What profiling-performance does

The skill automates web application CPU profiling through the cursor-ide-browser MCP server. The agent opens a target local page, invokes browser_profile_start, simulates clicks or scrolling, and captures performance traces with browser_profile_stop.

Captured profiles are written to ~/.cursor/browser-logs/ as raw Chrome DevTools JSON files and Markdown summaries. By inspecting hitCount and function names in call frames, the agent detects main-thread blocking, unnecessary re-renders, and heavy external library calls.

A running local server is required before profiling begins. Profiling in React development mode introduces extra runtime overhead, so measuring a production build provides much more reliable numbers. The summary file can miss subtle execution details, which makes reading raw JSON mandatory.

What it helps with

  • capture CPU profiles during page interactions
  • locate synchronous functions blocking the browser main thread
  • identify redundant React component re-renders
  • compare execution samples before and after code changes

Example prompts for the agent

  • Profile CPU performance on the orders page and find out why scrolling lags.
  • Record a profile while submitting the search form and pinpoint slow functions.
  • Inspect the raw profile JSON in browser-logs and suggest ways to reduce re-renders.

How to install profiling-performance

1Skills CLI (Vercel)

npx skills add spencerpauly/awesome-cursor-skills --skill profiling-performance -a claude-code

2Manually: put the files in place

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

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

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

Questions about profiling-performance

How do I install profiling-performance in Claude Code?

Run npx skills add spencerpauly/awesome-cursor-skills --skill profiling-performance -a claude-code in your terminal.

What does profiling-performance do?

It captures a Chrome DevTools CPU profile during page interactions, highlights execution bottlenecks, and suggests code optimizations.

Why should you profile a production build instead of dev mode?

Development mode in frameworks like React introduces profiling overhead. Testing a production build ensures call stack measurements reflect actual production performance.

Source text

SKILL.md · CC0-1.0
---
name: profiling-performance
description: Profile a running web application's CPU performance using Cursor's built-in browser profiler. Captures call stacks, identifies slow functions, and suggests optimizations. Use when a page feels slow or janky.
---

# Performance Profile

Use this skill when a web application feels slow, janky, or unresponsive. Cursor's built-in browser has CPU profiling tools that capture real call stacks and timing data.

## How It Works

The `cursor-ide-browser` MCP provides `browser_profile_start` and `browser_profile_stop` tools that capture Chrome DevTools-format CPU profiles. Profile data is written to `~/.cursor/browser-logs/` as both raw JSON and a human-readable summary.

## Steps

1. **Ensure the app is running** — start the dev server if it isn't already running.

2. **Navigate to the slow page**:

   ```
   Tool: browser_navigate
   Arguments: { "url": "http://localhost:3000/slow-page" }
   ```

3. **Start profiling**:

   ```
   Tool: browser_profile_start
   ```

4. **Reproduce the slow interaction** — use browser tools to trigger the slow behavior:
   - Click buttons, scroll, type in inputs, navigate between pages
   - Use `browser_click`, `browser_scroll`, `browser_fill` to interact
   - Wait a few seconds for the interaction to complete

5. **Stop profiling**:

   ```
   Tool: browser_profile_stop
   ```

   This writes two files to `~/.cursor/browser-logs/`:
   - `cpu-profile-{timestamp}.json` — raw Chrome DevTools profile
   - `cpu-profile-{timestamp}-summary.md` — human-readable summary

6. **Analyze the results** — read both files. Key things to look for in the raw JSON:
   - `profile.nodes[].hitCount` — how many samples hit each function
   - `profile.nodes[].callFrame.functionName` — the function names
   - `profile.samples.length` — total number of samples collected

   Cross-reference with the summary to identify:
   - Functions consuming the most CPU time
   - Unexpected re-renders or layout thrashing
   - Expensive third-party library calls
   - Synchronous operations blocking the main thread

7. **Suggest fixes** — based on the profile data, recommend specific optimizations:
   - Memoize expensive computations
   - Debounce rapid event handlers
   - Move heavy work to a Web Worker
   - Lazy-load components or routes
   - Virtualize long lists

## Notes

- Always read the raw `.json` profile to verify the summary — the summary can miss nuances.
- Profile in development mode first, but be aware that React dev mode adds overhead. For accurate measurements, profile a production build.
- Short profiles (2-5 seconds of interaction) are usually more useful than long ones.
- Compare before/after profiles to verify your optimization actually helped.

© spencerpauly · CC0-1.0 · spencerpauly/awesome-cursor-skills

Similar skills

Everything for Frontend and UI →

From the same set60

detecting-port-conflicts Detects EADDRINUSE and port conflicts in terminal output, identifies blocking processes with lsof, and kills them or picks an open port for your dev server. CX Codex +1 418installs setting-up-ci A skill that writes a GitHub Actions pipeline with linting, tests, type-checking and a deploy step. Useful when the repo has no CI yet. CX Codex +1 415installs adding-api-docs This skill writes OpenAPI/Swagger documentation for an API: endpoint schemas, request and response types, and an interactive docs page. CX Codex +1 413installs parallel-test-fixing The skill runs your test suite and assigns each failing test file to a separate subagent for parallel fixes. It helps when multiple test files break simultaneously across a codebase. CX Codex +1 412installs python-tdd-with-uv Runs your agent through red-green-refactor in Python and sets the project up on uv. Useful when tests come before the code. CX Codex +1 409installs recording-browser-flow-as-test Walks through browser interactions step by step via MCP and outputs a clean Playwright test based on accessibility tree selectors. CX Codex +1 406installs verifying-markdown-formatting Walks a Markdown file through a formatting checklist and fixes what it finds: headings, lists, links, code blocks, spacing. Useful before committing a README or docs. CX Codex +1 404installs exporting-to-png Teaches the agent to render code snippets, Mermaid diagrams, terminal logs, and SVG files into PNG images via CLI utilities or headless browsers. CX Codex +1 401installs

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