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.
npx skills add juanmhidalgo/claude-plugins --skill performance-optimizationgit clone --depth 1 https://github.com/juanmhidalgo/claude-pluginsWrote 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.
[](https://agentmods.dev/skills/juanmhidalgo/claude-plugins/performance-optimization)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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. |
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.
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.
- 1mo ago First seen · 115 lines · 35 tokens per session scan A c90872fde1aa
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.
Other skills, from other repositories
performance
Use when a page or interaction is slow for one user and the fix starts from a measurement — a failing Core Web Vital (LCP, INP, CLS), a heavy JS bundle, wasted re-renders, an over-broad client boundary: profile, attribute the cost to one phase, fix it, re-measure. NOT surviving concurrent load (that is scaling), NOT…
performance-analysis
Performance analysis, bottleneck detection, and optimization recommendations. Use when profiling slow code or systems, hunting a performance regression, or producing an optimization plan with measurable targets.
performance-optimizer
Analyze and optimize code performance, identify bottlenecks, and suggest improvements.
performance-engineer
Enforces measure-profile-optimize order, preventing intuition-driven optimization of non-bottlenecks. Now with mathematical depth metrics, optimization ROI calculus, optimization , and verification gates.
performance-analysis
Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms.
performance-engineer
!cat skills/shared/protocols/ux-protocol.md 2>/dev/null || true !cat .production-grade.yaml 2>/dev/null || echo "No config — using defaults".