Performance Profiling

SkillAI & models

Performance profiling is a skill that teaches an AI agent a measure-analyze-fix workflow for website speed. It guides your agent through measuring website speed, finding bottlenecks like slow page loads, and applying fixes. The skill covers Core Web Vitals targets, Lighthouse audits via a bundled script, and browser profiler patterns for runtime and memory issues.

Use Performance Profiling in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Performance Profiling and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the Performance Profiling skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Have an AI agent that can read files and run shell commands.

Performance ProfilingStart free

What your AI can do with it

  • Run Lighthouse audits with scripts/lighthouse_audit.py
  • Check Core Web Vitals targets for LCP, INP, and CLS
  • Analyze bundles for large dependencies and duplicate code
  • Profile runtime with DevTools Performance and Memory patterns
  • Identify common bottlenecks by symptom and prioritize quick wins

Getting started

  1. Have an AI agent that can read files and run shell commands.
  2. Add the performance-profiling skill to the agent's available skills.
  3. Ensure Python is available so the agent can run scripts/lighthouse_audit.py.
  4. Ask the agent to profile a page or bundle and apply fixes.

What this skill tells your AI

The instructions your AI receives, as published by davila7/claude-code-templates in cli-tool/components/skills/development/performance-profiling/SKILL.md and read by ahel’s review.

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.

Signals

GitHub stars
32k
Forks
4k
Last commit
Oct 2026

ahel review

  • K1binfo
    installs-packages (in scripts/lighthouse_audit.py)

Automated review, not a security audit. Ruleset v1+k2.

Others that do the same job

Questions

What is performance profiling?
It is a skill that teaches an agent to measure, analyze, and optimize website performance using Core Web Vitals, Lighthouse audits, and browser profiler patterns.
What tools does it use?
It uses a bundled Lighthouse audit script, Core Web Vitals targets, bundle analysis, and browser DevTools Performance and Memory patterns.
What order should profiling follow?
Measure, analyze, optimize. Start with a baseline, identify the bottleneck, make a targeted fix, then validate the improvement.
What are common bottlenecks?
Slow initial load from large JS or render blocking, slow interactions from heavy event handlers, jank from layout thrashing, and growing memory from leaks.
Advanced
Item type
skill
Key
performance-profiling-davila7
Source
github.com/davila7/claude-code-templates