spa-performance

spa-performance is a skill for Claude Code, Codex from LeahyCC/claude-skills. It costs 77 tokens per session (1,066 once invoked), scanned A, original, MIT.

A guide to improving the performance of single-page web apps when the browser's main thread, frame timing, or memory is the problem. It covers measuring a user action and choosing a small change based on the measured cost.

In plain words
What is it for?
Use it to investigate slow scrolling, dragging, typing, live updates, canvas or DOM editors, and rendering large lists with techniques such as workers or windowed rendering.
Why use it?
It helps distinguish slow browser work from unrelated problems and provides a way to verify whether a change actually improves the user-visible moment.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to investigate slow scrolling, dragging, typing, live updates, canvas or DOM editors, and rendering large lists with techniques such as workers or windowed rendering.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leahycc/claude-skills/spa-performance
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.

Any agent
npx skills add LeahyCC/claude-skills --skill spa-performance
Clone the repo
git clone --depth 1 https://github.com/LeahyCC/claude-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin spa-performance — /plugin install spa-performance after adding the marketplace above.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/leahycc/claude-skills/spa-performance/github.svg)](https://agentmods.dev/skills/leahycc/claude-skills/spa-performance)
Your own site
<a href="https://agentmods.dev/skills/leahycc/claude-skills/spa-performance"><img src="https://agentmods.dev/badge/skills/leahycc/claude-skills/spa-performance/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.

agentmods 80×15 button for spa-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/leahycc/claude-skills/spa-performance"><img src="https://agentmods.dev/badge/skills/leahycc/claude-skills/spa-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,066 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00077 $0.01066
Opus 5.5 $0.00031 $0.00426
Sonnet 5.5 $0.00015 $0.00213
Haiku 4.5 $0.00008 $0.00107

Measured today against content hash 9a4be9f80207, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

skills/spa-performance/SKILL.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SPA performance

Browser performance for a single-page app: what runs on the main thread, what is worth drawing, and how to prove a change helped. Framework rendering, bundle size, and Server Components belong to the react-performance skill.

Measure the moment the user feels, then change one thing. A faster load that stalls the gesture is a loss. Measure that change alone and again with the rest of the system. Thresholds, the harness, and the worked example live in measure.md.

Source checks and what is still open: SOURCES.md.

Procedure

  1. Name the moment: first paint of a thing, a gesture (pan, scroll, drag), a keystroke, or a tick of live data.
  2. Read the one resource for that moment before choosing a technique. If its first line says Status: open or Status: partial, apply the written rules and do not invent the items under its Fill in list.
  3. Record a baseline with the harness in measure.md. DevTools finds the cause. The quoted number comes from a rerun with DevTools closed.
  4. Classify the cost and change the smallest thing that attacks it.
name the moment
        |
        v
too much work? ----yes----> draw less (window, rough pass, release, cancel)
        |
        no
        v
long task on the main thread?
        |
        +-- touches DOM or layout --------> yield
        +-- CPU only, no DOM -------------> worker, transfer the bytes
        +-- the draw itself is the freeze -> OffscreenCanvas in that worker
        +-- deadline is not a frame ------> audio and video
        |
        v
you already own a GPU renderer, and submission or compute is the wall
        |
        v
WebGPU, with a WebGL2 fallback
  1. Measure the change alone, then with the other changes. Publish cold and warm separately.

A hosted editor (tldraw, and the same class of canvas) shares the main thread with the app. Read hosted-editor.md before optimizing around it. A worker can take your pixels. It cannot take the host's hit testing.

Read the full file on GitHub · 80 lines

Files

What ships with it

10 files 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 Changed · -10 lines · +9 tokens per session 9a4be9f80207
  2. yesterday First seen · 90 lines · 68 tokens per session scan A 4e49874adccb

Subscribe to this mod's changes

spa-performance is a skill published in the GitHub repository LeahyCC/claude-skills (3 stars, last pushed today), licensed MIT. It adds 77 tokens to every session and 1,066 once invoked, about $0.0003 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-10-23.

Related

Other skills, from other repositories

Accessibility Audit Helper

Reviews UI code and components for WCAG 2.1 accessibility violations and provides specific fixes.

Notysoty/openagentskills · 23 tokens

bug-reporting

Load this skill whenever you are filing, reviewing, or generating accessibility bug reports — whether from automated tool output, manual testing, or AI agent scans. The purpose of this skill is to make accessibility errors easier to report accurately, so that developers can reproduce, understand, and fix them without…

zivtech/accessibility-skills · 121 tokens

web-a11y-debugging

Debugs accessibility issues with automated scanners, browser accessibility trees, keyboard checks, screen reader smoke tests, custom CSS/JS rules, and CI gates. Use when triaging barriers or building accessibility validation pipelines.

klovaaxel/web-a11y-agent-skills · 48 tokens

a11y-ally

Use when running comprehensive WCAG accessibility audits with axe-core + pa11y + Lighthouse, generating context-aware remediation, or testing video accessibility. Supports 3-tier browser cascade with graceful degradation.

proffesor-for-testing/agentic-qe · 44 tokens

accessibility-testing

WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification. Use when ensuring legal compliance (ADA, Section 508), testing for disabilities, or building accessible applications for 1 billion disabled users globally.

proffesor-for-testing/agentic-qe · 50 tokens

Accessibility Auditor

Comprehensive WCAG 2.1 AA compliance testing combining automated axe-core scans with manual keyboard navigation, screen reader compatibility, and focus management verification.

PramodDutta/qaskills · 32 tokens