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/orlando-japan/claude-code-setting/frontend-performancenpx skills add orlando-japan/claude-code-setting --skill frontend-performancegit clone --depth 1 https://github.com/orlando-japan/claude-code-settingWrote 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/orlando-japan/claude-code-setting/frontend-performance)<a href="https://agentmods.dev/skills/orlando-japan/claude-code-setting/frontend-performance"><img src="https://agentmods.dev/badge/skills/orlando-japan/claude-code-setting/frontend-performance.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.1 | $0.00028 | $0.01202 |
| Opus 5 | $0.00014 | $0.00601 |
| Sonnet 5 | $0.00006 | $0.00240 |
| Haiku 4.5 | $0.00003 | $0.00120 |
Grade A, and why
frontend-performance 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 5d 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 — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Frontend performance
The user experience is dominated by three things: how fast the page appears, how fast it becomes interactive, and whether it jitters. Google's Core Web Vitals formalize these.
The three metrics
Largest Contentful Paint (LCP)
How long until the biggest element is rendered. Target: < 2.5s.
Usually blocked by:
- Slow server response (TTFB). Fix: caching, closer infra, smaller payload.
- Render-blocking CSS/JS in
<head>. Fix: defer, async, critical CSS inlined. - Large hero images without optimization. Fix: modern formats (WebP, AVIF), responsive sizes,
loading="eager"on LCP image. - Web fonts blocking render. Fix:
font-display: swap, subset fonts, preload critical fonts.
Interaction to Next Paint (INP)
How long from the user interaction to the next paint. Target: < 200ms.
Usually blocked by:
- Long JavaScript tasks on the main thread. Fix: break up tasks, offload to web workers, defer non-critical work.
- Excessive re-renders. Fix: memoization, avoid work in render, virtualize long lists.
- Heavy event handlers. Fix: debounce, throttle, move work off the critical path.
Cumulative Layout Shift (CLS)
How much the page jumps around as it loads. Target: < 0.1.
Usually caused by:
- Images without dimensions. Fix:
widthandheightattributes, or CSSaspect-ratio. - Ads / embeds injected asynchronously. Fix: reserve space.
- Web fonts that swap after load. Fix:
size-adjustdescriptor, match metrics. - Dynamically injected content above existing content. Fix: put it below, or reserve space.
Bundle size
Bigger bundles = more parse time, more network, more JS to execute. Not a linear cost — mobile is much worse than desktop.
Targets
- Initial JS: < 170KB gzipped (or lower for mobile-focused sites).
- CSS: < 50KB gzipped.
- Total transfer for first paint: < 500KB.
How to get there
- Tree-shake — ensure your bundler is pruning unused exports. Use ES modules.
- Code split — per route, per feature. Lazy-load what isn't on the initial page.
- Analyze the bundle —
source-map-explorer,webpack-bundle-analyzer,rollup-plugin-visualizer. Look for anything you didn't expect. - Kill duplicate libraries — two versions of the same lib in the bundle is common and easy to fix.
- Polyfill only what you need — not the whole core-js.
- Compress — gzip minimum, Brotli better.
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.
- 5d ago First seen · 106 lines · 28 tokens per session scan A 7a03e2add0ff
frontend-performance is a skill published in the GitHub repository orlando-japan/claude-code-setting (2 stars, last pushed 3mo ago), licensed MIT. It adds 28 tokens to every session and 1,202 once invoked, about $0.0001 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-08-31.
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…
Website Audit
Comprehensive website auditing skill using Lighthouse, PageSpeed Insights, and web performance APIs to audit performance, accessibility, SEO, best practices, and security.
performance-optimization
Use when performance requirements exist, profiling reveals bottlenecks, or Core Web Vitals need improvement. Do NOT use without evidence — premature optimization adds complexity.
optimize
On-demand performance and optimization analysis. Use when identifying bottlenecks, improving build times, reducing bundle size, or optimizing code performance. Trigger keywords - "optimize", "performance", "bottleneck", "bundle size", "build time", "speed up".
Frontend Performance Testing
Frontend performance testing covering bundle size analysis, render performance, animation frame rate, React re-render detection, and lazy loading verification.
fix-visual-stability
Fix visual stability issues in Next.js e-commerce apps — covers CLS (Cumulative Layout Shift), FOIT (Flash of Invisible Text), and theme flicker.