frontend-performance

frontend-performance is a skill for Claude Code, Codex from orlando-japan/claude-code-setting. It costs 28 tokens per session (1,202 once invoked), scanned A, original, MIT.

A guide for making websites load quickly, respond promptly to input, and avoid visible movement while loading. It uses Core Web Vitals, Google’s measurements for loading speed, interaction delay, and layout stability.

In plain words
What is it for?
Use it when Core Web Vitals get worse, pages feel slow, JavaScript bundles become too large, or interactions and layouts need performance improvements.
Why use it?
It helps identify why a page appears slowly, feels unresponsive, or shifts as content loads. The guide connects those problems to common causes such as large images, blocking scripts, and unnecessary page updates.

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/orlando-japan/claude-code-setting/frontend-performance
Any agent
npx skills add orlando-japan/claude-code-setting --skill frontend-performance
Clone the repo
git clone --depth 1 https://github.com/orlando-japan/claude-code-setting

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 frontend-performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/orlando-japan/claude-code-setting/frontend-performance.svg)](https://agentmods.dev/skills/orlando-japan/claude-code-setting/frontend-performance)
Your own site
<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>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,202 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00028 $0.01202
Opus 5 $0.00014 $0.00601
Sonnet 5 $0.00006 $0.00240
Haiku 4.5 $0.00003 $0.00120

Measured 5d ago against content hash 7a03e2add0ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

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.

templates/extra/skills/frontend-performance/SKILL.md · 106 lines

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: width and height attributes, or CSS aspect-ratio.
  • Ads / embeds injected asynchronously. Fix: reserve space.
  • Web fonts that swap after load. Fix: size-adjust descriptor, 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 bundlesource-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.

Read the full file on GitHub · 106 lines

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. 5d ago First seen · 106 lines · 28 tokens per session scan A 7a03e2add0ff

Subscribe to this mod's changes

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.

Related

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…

ericrisco/rsc-harness · 91 tokens

Website Audit

Comprehensive website auditing skill using Lighthouse, PageSpeed Insights, and web performance APIs to audit performance, accessibility, SEO, best practices, and security.

PramodDutta/qaskills · 33 tokens

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.

juanmhidalgo/claude-plugins · 35 tokens

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".

MadAppGang/claude-code · 57 tokens

Frontend Performance Testing

Frontend performance testing covering bundle size analysis, render performance, animation frame rate, React re-render detection, and lazy loading verification.

PramodDutta/qaskills · 29 tokens

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.

EtaYang10th/spark-skills · 37 tokens