New to Claude Skills? Learn how to install them โ†’

davila7 on GitHub

Performance Profiling

Free

Measure, analyze, and optimize your web performance.

Get this skill

Free ยท Opens the source repo

What Performance Profiling does

Performance Profiling is a skill designed for developers and designers who want to enhance the performance of their web applications. It provides a structured approach to measuring, analyzing, and optimizing web performance, specifically focusing on Core Web Vitals, which are critical metrics for user experience. By utilizing the included lighthouse_audit.py script, users can automate performance audits for their websites, helping them to identify areas that require improvement.

The skill outlines a comprehensive profiling workflow consisting of four essential steps: establishing a baseline, identifying bottlenecks, implementing fixes, and validating improvements. This systematic approach ensures that performance enhancements are data-driven and effective. Additionally, it provides guidance on selecting the right tools for various profiling tasks, whether it's analyzing page load times with Lighthouse or examining memory usage through DevTools.

Moreover, the skill delves into bundle analysis, helping users recognize common issues such as large dependencies and duplicate code. It suggests actionable optimization techniques, including code splitting and tree shaking, to streamline application performance. The resource also highlights common bottlenecks and quick win priorities, allowing users to tackle the most impactful performance issues first.

Overall, Performance Profiling serves as a practical resource for those looking to improve their web applications' performance through proven techniques and tools, making it a valuable addition to any developer's toolkit.

When to use it

Use this skill when you need to measure and optimize the performance of your web applications, especially during development and production stages.

When not to use it

This skill may not be suitable for applications where performance is not a critical concern or for users unfamiliar with web performance metrics.

What you can build with it

Automating Performance Audits

Use the `lighthouse_audit.py` script to run automated performance audits on your website, identifying critical areas for improvement.

Improving User Experience

Apply the insights from Core Web Vitals to enhance the loading speed and interactivity of your web applications, leading to a better user experience.

Streamlining Code Bundles

Analyze your code bundles to identify large or duplicate dependencies, and implement optimization techniques to reduce load times.

How to install Performance Profiling

View source

1. Install with the skills CLI

npx skills add davila7/claude-code-templates/performance-profiling --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by davila7

Performance Profiling

Measure, analyze, optimize - in that order.

๐Ÿ”ง Runtime Scripts

Execute these for automated profiling:

ScriptPurposeUsage
scripts/lighthouse_audit.pyLighthouse performance auditpython scripts/lighthouse_audit.py https://example.com

1. Core Web Vitals

Targets

MetricGoodPoorMeasures
LCP< 2.5s> 4.0sLoading
INP< 200ms> 500msInteractivity
CLS< 0.1> 0.25Stability

When to Measure

StageTool
DevelopmentLocal Lighthouse
CI/CDLighthouse CI
ProductionRUM (Real User Monitoring)

2. Profiling Workflow

The 4-Step Process

1. BASELINE โ†’ Measure current state
2. IDENTIFY โ†’ Find the bottleneck
3. FIX โ†’ Make targeted change
4. VALIDATE โ†’ Confirm improvement

Profiling Tool Selection

ProblemTool
Page loadLighthouse
Bundle sizeBundle analyzer
RuntimeDevTools Performance
MemoryDevTools Memory
NetworkDevTools Network

3. Bundle Analysis

What to Look For

IssueIndicator
Large dependenciesTop of bundle
Duplicate codeMultiple chunks
Unused codeLow coverage
Missing splitsSingle large chunk

Optimization Actions

FindingAction
Big libraryImport specific modules
Duplicate depsDedupe, update versions
Route in mainCode split
Unused exportsTree shake

4. Runtime Profiling

Performance Tab Analysis

PatternMeaning
Long tasks (>50ms)UI blocking
Many small tasksPossible batching opportunity
Layout/paintRendering bottleneck
ScriptJavaScript execution

Memory Tab Analysis

PatternMeaning
Growing heapPossible leak
Large retainedCheck references
Detached DOMNot cleaned up

5. Common Bottlenecks

By Symptom

SymptomLikely Cause
Slow initial loadLarge JS, render blocking
Slow interactionsHeavy event handlers
Jank during scrollLayout thrashing
Growing memoryLeaks, retained refs

6. Quick Win Priorities

PriorityActionImpact
1Enable compressionHigh
2Lazy load imagesHigh
3Code split routesHigh
4Cache static assetsMedium
5Optimize imagesMedium

7. Anti-Patterns

โŒ Don'tโœ… Do
Guess at problemsProfile first
Micro-optimizeFix biggest issue
Optimize earlyOptimize when needed
Ignore real usersUse RUM data

Remember: The fastest code is code that doesn't run. Remove before optimizing.

Frequently asked questions about Performance Profiling

Similar skills