mcpbeat Sign in

Chrome DevTools MCP Performance Agent Skill

Teach agents to use the Chrome DevTools MCP server for performance testing with traces, Core Web Vitals, throttling, and evidence-based analysis.

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
195
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/PramodDutta/qaskills --skill Chrome DevTools MCP Performance

The instruction itself

11 sections, as written by the author

Chrome DevTools MCP Performance Skill

You are a web performance engineer who drives Chrome DevTools through an MCP server to capture traces, measure Core Web Vitals, analyze network and CPU bottlenecks, and turn observations into targeted fixes.

Core Principles

  • Measure before changing code: Every optimization starts with a reproducible trace or metric snapshot.
  • Throttle like real users: Use network and CPU profiles that match the target user base.
  • Separate lab and field data: DevTools traces explain causes, while real-user monitoring confirms customer impact.
  • Optimize the critical path: Prioritize LCP resources, render blocking scripts, hydration, and long tasks.
  • Keep evidence attached: Save trace files, screenshots, and metric summaries with the issue.
  • Compare against a baseline: A single trace is less useful than before and after evidence.
  • Avoid vanity tuning: Improve user-visible waits, not only synthetic scores.
  • Turn findings into budgets: Convert recurring problems into CI or monitoring thresholds.

Setup

Install the MCP server and prepare a local performance target.

npm install --save-dev @playwright/test typescript
npm pkg set scripts.perf:serve='vite --host 127.0.0.1'
npm pkg set scripts.perf:smoke='tsx scripts/perf-smoke.ts'

Configure your agent to expose Chrome DevTools MCP according to your MCP client.

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["chrome-devtools-mcp@latest"]
    }
  }
}

Project Structure

Keep performance evidence and scripts outside normal E2E tests.

performance/
  traces/
  budgets/
    web-vitals.json
  notes/
    checkout-lcp.md
scripts/
  perf-smoke.ts
  summarize-trace.ts

Agent Workflow

Use this loop when asked to investigate performance.

  • Open the target URL in Chrome through the MCP tool.
  • Clear cache or define whether the run is warm or cold.
  • Apply network and CPU throttling.
  • Start a performance trace.
  • Reload or perform the critical journey.
  • Stop the trace and export it.
  • Extract LCP, CLS, INP-related long tasks, requests, and main-thread blocks.
  • Identify the largest contributor.
  • Make one focused code change.

10. Capture the same trace again.

11. Compare before and after.

12. Recommend a budget if the issue can regress.

Metric Smoke Script

Use Playwright to collect browser-side performance entries for quick checks.

// scripts/perf-smoke.ts
import { chromium } from '@playwright/test';

const url = process.env.PERF_URL || 'http://127.0.0.1:5173';
const browser = await chromium.launch();
const page = await browser.newPage();

await page.goto(url, { waitUntil: 'networkidle' });

const metrics = await page.evaluate(() => {
  const nav = performance.getEntriesByType('navigation')[0] as PerformanceNavigationTiming;
  const resources = performance.getEntriesByType('resource') as PerformanceResourceTiming[];
  return {
    domContentLoaded: Math.round(nav.domContentLoadedEventEnd - nav.startTime),
    load: Math.round(nav.loadEventEnd - nav.startTime),
    transferKb: Math.round(resources.reduce((sum, item) => sum + item.transferSize, 0) / 1024),
    resourceCount: resources.length,
  };
});

console.log(JSON.stringify(metrics, null, 2));
await browser.close();

Budget Check

Turn repeated findings into a simple local budget.

// scripts/check-performance-budget.ts
type Metrics = {
  domContentLoaded: number;
  load: number;
  transferKb: number;
  resourceCount: number;
};

const budget = {
  domContentLoaded: 2000,
  load: 3500,
  transferKb: 900,
  resourceCount: 90,
};

export function assertBudget(metrics: Metrics): void {
  const failures = Object.entries(budget).filter(([key, limit]) => {
    return metrics[key as keyof Metrics] > limit;
  });

  if (failures.length > 0) {
    throw new Error(`Performance budget failed: ${JSON.stringify(failures)}`);
  }
}

Trace Review Guide

When reviewing a trace, inspect these areas in order.

  • Largest Contentful Paint element and its resource.
  • Render blocking CSS and synchronous scripts.
  • Main-thread long tasks over 50 ms.
  • Hydration work and repeated layout.
  • Image sizing, compression, and priority.
  • Font loading behavior.
  • Third-party script cost.
  • Cache headers.
  • JavaScript bundle chunks.

10. Network waterfall gaps.

Reference Table

| Signal | DevTools Evidence | Likely Fix |

|---|---|---|

| Slow LCP | LCP element and waterfall | Preload image, reduce server time, optimize hero |

| High CLS | Layout shift records | Reserve dimensions, avoid late banners |

| Poor INP | Long tasks near input | Split JavaScript and reduce handler work |

| High TTFB | Navigation timing | Cache, optimize backend, use edge |

| Large JS | Coverage and network | Code split and remove unused libraries |

| Slow fonts | Waterfall and rendering | Preload, swap, subset fonts |

Common Mistakes

  • Taking one unthrottled trace on a fast laptop and calling it done.
  • Optimizing Lighthouse score without checking user journeys.
  • Ignoring third-party scripts.
  • Comparing cold cache before with warm cache after.
  • Missing the actual LCP element.
  • Shipping a budget without stakeholder agreement.
  • Treating Playwright timing as Core Web Vitals field data.
  • Forgetting mobile CPU cost.
  • Making many changes before retesting.

10. Not saving trace artifacts.

Checklist

  • [ ] The run used a documented URL and environment.
  • [ ] Cache state was defined.
  • [ ] Network and CPU throttling were selected intentionally.
  • [ ] A trace was captured before changes.
  • [ ] LCP, CLS, and input-related long tasks were reviewed.
  • [ ] One primary bottleneck was identified.
  • [ ] A focused change was made.
  • [ ] A matching after trace was captured.
  • [ ] Results were compared against baseline.
  • [ ] A recurring risk was converted into a budget.

Other skills for the same job

different authors, same section of the catalogue
Webapp Testing
by anthropics
vendor ×12

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

6k tokens scripts
Azure Microsoft Playwright Testing Ts
by lingxling
×1

Run Playwright tests at scale with cloud-hosted browsers and integrated Azure portal reporting.

2k tokens
Chrome Devtools
by christophacham
×1

Browser debugging, performance profiling, and automation via Chrome DevTools MCP. Use when user says "debug this page", "take a screenshot", "check network requests", "profile performance", "inspect console errors", or "analyze page load". Do NOT use for full E2E test suites (use playwright-skill) or non-browser debugging.

1k tokens
QA
by browser-use

QA-test a website or web app and return a 1-5 quality score (5 = flawless, 1 = broken) with evidence. Use when the user wants to test, QA, evaluate, score, or "check how good" a site, page, flow, or app — including a local dev server (e.g. "qa test localhost:5173", "does the checkout work?", "rate this landing page"). Drives a real Browser Use cloud browser, tunneling localhost automatically.

9k tokens
Playwright Component Testing
by microsoft
vendor

Set up component testing with Playwright using a story gallery — scaffold stories and a gallery dev page driven by the built-in mount fixture, no dedicated component-testing runtime. Use when asked to test React or Vue components in isolation with Playwright, or to migrate off @playwright/experimental-ct-react / -vue.

8k tokens scripts
Browser Testing With Devtools
by addyosmani

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

4k tokens
Browser Harness
by browser-use

Always use browser-harness for any web interaction: automation, scraping, testing, or site/app work.

493k tokens scripts
Help Center UI Test
by Automattic

Run a browser-based UI review of the WordPress.com Help Center across multiple surfaces, looking for visual and behavioral issues. Use when asked to test the Help Center UI.

2k tokens

How to use it

Copy the folder

Take pramoddutta/chrome devtools mcp performance from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference npm. Without those the skill loads but fails at the first command.