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 agentmods add skills/juanmhidalgo/claude-plugins/performance-optimizationnpx 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.svg" alt="Measured on agentmods" 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 | $0.00035 | $0.01014 |
| Opus 5 | $0.00017 | $0.00507 |
| Sonnet 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 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.
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.
- today 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 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.
Other skills, from other repositories
performance-analysis
Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms.
ncu-cuda-profiling
Automated NCU (Nsight Compute) profiling workflow with full metrics collection and persistent storage.
performance-optimization
Optimizes application performance. Use when performance requirements exist, when you suspect performance regressions, or when Core Web Vitals or load times need improvement. Use when profiling reveals bottlenecks that need fixing.
performance-optimizer
Systematic performance profiling and optimization for Python and web backends — measure first, fix second, verify the fix.
performance-expert
Expert-level performance optimization, profiling, benchmarking, and tuning.
performance-optimizer
Profile, diagnose, and fix performance bottlenecks in applications. Use when optimizing slow queries, reducing load times, improving runtime performance, or reducing memory usage.