performance-profiling · davila7 — Claude Code skill: profile, then optimize
A Claude skill that keeps the agent on a fixed loop: measure, find the bottleneck, change one thing, confirm the result. Useful when a page drags.
npx claude-code-templates@latest --skill development/performance-profilingWhat performance-profiling does
The skill lays out an order of operations for performance work. Baseline first, then locate the bottleneck, then make a targeted change, then validate it. Skip the baseline and the agent starts guessing, which sends fixes in the wrong direction.
It ships as reference tables. Core Web Vitals targets for LCP, INP and CLS. A tool-selection table: Lighthouse for page load, a bundle analyzer for size, the Performance and Memory tabs in DevTools for runtime and heap. Symptoms map to likely causes — slow first load, heavy event handlers, janky scrolling, memory that keeps climbing. A separate anti-pattern table pushes back on micro-optimizing and on optimizing before you have data.
For an automated pass there is scripts/lighthouse_audit.py, run through Python. The skill's allowed tools are Read, Glob, Grep and Bash, so it inspects and measures rather than editing files — the agent applies the changes.
What it helps with
- pin down what actually slows a page down
- capture a baseline before touching anything
- inspect a bundle and drop duplicate dependencies
- tell a memory leak apart from normal heap growth
- pick the right tool for a given symptom
Example prompts for the agent
- Run a performance audit of https://example.com with
scripts/lighthouse_audit.py - Take a baseline for LCP and INP, then tell me what to fix first
- Look at the bundle: which dependencies are largest, and what should be split per route
How to install performance-profiling
1claude-code-templates
npx claude-code-templates@latest --skill development/performance-profiling2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill performance-profiling -a claude-code3Manually: put the files in place
~/.claude/skills/performance-profiling/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/performance-profiling/
Manually: put the files in place
.agents/skills/performance-profiling/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/performance-profiling/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates performance-profiling2Manually: put the files in place
.github/skills/performance-profiling/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/performance-profilingManually: put the files in place
.devin/skills/performance-profiling/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about performance-profiling
How do I install performance-profiling in Claude Code?
Use the templates CLI: npx claude-code-templates@latest --skill development/performance-profiling. Alternatively run npx skills add davila7/claude-code-templates --skill performance-profiling -a claude-code.
What does performance-profiling do?
It gives the agent a method for performance work: measure, locate the bottleneck, make one targeted fix, verify it. Alongside that come metric targets, tool selection and a list of common causes.
What is needed to run the audit script?
Python. The script is invoked as python scripts/lighthouse_audit.py https://example.com. The skill only reads and measures — its tools are Read, Glob, Grep and Bash.
Similar skills
All skills for Agent setup: memory, context, orchestration →performance-profiling by other authors comes first.