performance-optimization

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

Use when performance requirements exist, profiling reveals bottlenecks, or Core Web Vitals need improvement. Do NOT use without evidence — premature optimization adds complexity.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/juanmhidalgo/claude-plugins/performance-optimization
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
Origin unknown 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 $0.00035 $0.01014
Opus 5 $0.00017 $0.00507
Sonnet 5 $0.00007 $0.00203
Haiku 4.5 $0.00003 $0.00101

Measured today against content hash c90872fde1aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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. today 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 9d ago), licensed MIT. It adds 35 tokens to every session and 1,014 once invoked, about $0.0002 per session on Opus 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.