本文へ移動
cccskills
無料GitHub で公開

profiling-performance

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.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md2.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use Cursor's browser aria snapshots to audit a page for accessibility issues — missing labels, broken tab order, contrast, and ARIA misuse.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

Add PostHog analytics to a web application, including event tracking, page views, feature flags, and session replay.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

Generate OpenAPI/Swagger documentation for an API, including endpoint schemas, request/response types, and interactive docs UI.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

Add authentication to a web application using NextAuth.js (Auth.js), including OAuth providers, session management, and protected routes.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

Dockerize an application with a production-ready Dockerfile, docker-compose setup, and .dockerignore.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

Set up Playwright end-to-end testing in a project, including test configuration, example tests, and CI integration.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

0xAidan のスキルをすべて見る

このスキルの問題を報告する