performance-optimization

performance-optimization is a skill for Claude Code from juanmhidalgo/claude-plugins. It costs 35 tokens per session (1,014 once invoked), scanned A, original, MIT.

A set of instructions for improving performance through a measure, identify, fix, verify, and monitor process. It explains Core Web Vitals, which are browser metrics for loading speed, interaction response, and visual stability.

In plain words
What is it for?
Use it to investigate slow page loads, laggy interactions, large frontend bundles, slow server responses, database queries, and layout shifts.
Why use it?
It keeps performance work evidence-based and focuses changes on confirmed bottlenecks.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the performance plugin — 1 skill, 2 commands shipped together

Good fit Use it to investigate slow page loads, laggy interactions, large frontend bundles, slow server responses, database queries, and layout shifts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/juanmhidalgo/claude-plugins/performance-optimization
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add juanmhidalgo/claude-plugins --skill performance-optimization
Clone the repo
git clone --depth 1 https://github.com/juanmhidalgo/claude-plugins

Made for: Claude Code.

Or install performance, the plugin that ships this one along with the rest of its 1 skill, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for performance-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/performance-optimization/github.svg)](https://agentmods.dev/skills/juanmhidalgo/claude-plugins/performance-optimization)
Your own site
<a href="https://agentmods.dev/skills/juanmhidalgo/claude-plugins/performance-optimization"><img src="https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/performance-optimization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for performance-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/juanmhidalgo/claude-plugins/performance-optimization"><img src="https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/performance-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,014 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01014
Opus 5.5 $0.00014 $0.00406
Sonnet 5.5 $0.00007 $0.00203
Haiku 4.5 $0.00003 $0.00101

Measured 1mo ago against content hash c90872fde1aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

performance-optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

performance/skills/performance-optimization/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Performance Optimization

Measure before optimizing. Performance work without measurement is guessing. Profile first, identify the actual bottleneck, fix it, measure again.

The Optimization Workflow

1. MEASURE  → Establish baseline with real data
2. IDENTIFY → Find the actual bottleneck (not assumed)
3. FIX      → Address the specific bottleneck
4. VERIFY   → Measure again, confirm improvement
5. GUARD    → Add monitoring or tests to prevent regression

Core Web Vitals Targets

Metric Good Needs Work Poor
LCP (Largest Contentful Paint) ≤ 2.5s ≤ 4.0s > 4.0s
INP (Interaction to Next Paint) ≤ 200ms ≤ 500ms > 500ms
CLS (Cumulative Layout Shift) ≤ 0.1 ≤ 0.25 > 0.25

Symptom-Based Decision Tree

What is slow?
├── First page load
│   ├── Large bundle? → Measure bundle size, check code splitting
│   ├── Slow server response? → Measure TTFB, check API/database
│   └── Render-blocking resources? → Check waterfall for CSS/JS blocking
├── Interaction feels sluggish
│   ├── UI freezes? → Profile main thread, look for long tasks (>50ms)
│   ├── Form input lag? → Check re-renders, controlled component overhead
│   └── Animation jank? → Check layout thrashing, forced reflows
├── Page after navigation
│   ├── Data loading? → Measure API times, check for fetch waterfalls
│   └── Client rendering? → Profile component render, check N+1 fetches
└── Backend / API
    ├── Single endpoint slow? → Profile queries, check indexes
    ├── All endpoints slow? → Check connection pool, memory, CPU
    └── Intermittent? → Check lock contention, GC pauses, external deps

Performance Budget

Target Threshold
JavaScript bundle (initial, gzipped) < 200KB
CSS (gzipped) < 50KB
Images (above the fold) < 200KB each
API response time (p95) < 200ms
Lighthouse Performance score ≥ 90

Anti-Rationalizations

Excuse Reality
"We'll optimize later" Performance debt compounds. Fix obvious anti-patterns now, defer micro-optimizations.
"It's fast on my machine" Your machine isn't the user's. Profile on representative hardware and networks.
"This optimization is obvious" If you didn't measure, you don't know. Profile first.
"Users won't notice 100ms" Research shows 100ms delays impact conversion rates. Users notice more than you think.
"The framework handles performance" Frameworks can't fix N+1 queries, oversized bundles, or missing indexes.

Read the full file on GitHub · 115 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 115 lines · 35 tokens per session scan A c90872fde1aa

Subscribe to this mod's changes

performance-optimization is a skill published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 5d ago), licensed MIT. It adds 35 tokens to every session and 1,014 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.