web-performance

A browser-performance debugging guide for finding why web pages stutter, respond slowly, shift layout, or take too long to show content. It uses browser timing records to connect slow frames to the responsible code.

In plain words
What is it for?
Use it to investigate janky scrolling and animation, dropped frames, slow clicks or typing, poor INP, slow LCP, and layout shifts (CLS).
Why use it?
It helps replace guesswork and basic timers with evidence from the browser about which code caused a slow frame or interaction.

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/millionco/debug-agent/web-performance
Any agent
npx skills add millionco/debug-agent --skill web-performance
Clone the repo
git clone --depth 1 https://github.com/millionco/debug-agent

Made for: Claude Code, Codex.

Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,877 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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 $0.00057 $0.03877
Opus 5 $0.00028 $0.01938
Sonnet 5 $0.00011 $0.00775
Haiku 4.5 $0.00006 $0.00388

Measured yesterday against content hash 0cc46a9960ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

web-performance scanned grade A with 1 finding 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 yesterday.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

To clear the log file via HTTP without deleting/recreating it: `curl -X DELETE <endpoint>` returns `{"ok":true,"cleared":true}`.
.agents/skills/web-performance/SKILL.md · 257 lines

How it starts

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

Web Performance

Overview

Browser performance debugging via PerformanceObserver, with LoAF (long-animation-frame) as the primary signal. LoAF is the only entry type that, in one record, attributes a slow frame to a specific sourceURL + sourceFunctionName + sourceCharPosition + invokerType, with per-script forcedStyleAndLayoutDuration (sync reflow), pauseDuration (sync XHR / alert), and blockingDuration. Code inspection and performance.now() cannot reach this. Start with LoAFs, conclude from LoAFs.

When to use

Symptoms:

  • Jank, dropped frames, janky scroll/swipe, complaints about frame rate
  • Slow click / keypress / touch response, "unresponsive" complaints, poor INP
  • Slow LCP, layout shifts (CLS)
  • Animation stutter, transition jank, expensive renders during interaction

Do NOT use for:

  • Backend / non-browser perf — use raw NDJSON file appends from your server runtime
  • Memory leaks, bundle-size regressions — heap snapshots / bundle analyzers
  • Logic bugs unrelated to timing — use raw fetch instrumentation

Core pattern

Before — manual performance.now() (wrong):

const t0 = performance.now();
drawSeries(data);
console.log("drawSeries took", performance.now() - t0);

Tells you a number. Doesn't tell you the function caused a long frame, what scheduled it, or whether it forced sync layout. Requires you to already suspect drawSeries.

After — LoAF observer (right):

new PerformanceObserver((list) => {
  for (const loaf of list.getEntries()) send(loaf);
}).observe({ type: "long-animation-frame", buffered: true });

Reports every frame > 50ms across the whole page, with scripts[].sourceURL + sourceFunctionName + sourceCharPosition + invokerType + forcedStyleAndLayoutDuration for each script that ran in the frame. You don't need to know where the bug is in advance.

Workflow

  1. Generate 3-5 hypotheses about what's slow and where.
  2. Start the logging server (Implementation → STEP 0).
  3. Inject the LoAF observer as the first script in <head> or top of SPA entry.
  4. Reproduce — automate via Playwright/Puppeteer if possible; otherwise give numbered steps and ask the user to confirm in their UI (do NOT ask them to type "done").
  5. Clear the log file before each run via the deletion tool (NOT rm).
  6. Analyze LoAFs first; consult secondary signals only if LoAF is silent. Mark hypotheses CONFIRMED / REJECTED / INCONCLUSIVE with cited entries.
  7. Fix only with 100% confidence. Keep instrumentation in place; tag post-fix runs with runId="post-fix".
  8. Verify by re-running and comparing before/after LoAFs with cited lines. If failed, revert rejected-hypothesis code (keep instrumentation), generate new hypotheses, iterate.
  9. Cleanup — remove the #region debug log block only after verified success + explicit user confirmation.

Read the full file on GitHub · 257 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. yesterday First seen · 257 lines · 57 tokens per session scan A 0cc46a9960ea

Subscribe to this mod's changes

web-performance is a skill published in the GitHub repository millionco/debug-agent (302 stars, last pushed 3mo ago), licensed MIT. It adds 57 tokens to every session and 3,877 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

design-taste-frontend-v1

The original v1 taste-skill, preserved for projects depending on its exact behavior. The current default is design-taste-frontend (v2 experimental), which is a substantial rewrite. Use this v1 install name only if you need exact backward compatibility.

Leonxlnx/taste-skill · 61 tokens

brandkit

Premium brand-kit image generation skill for creating high-end brand-guidelines boards, logo systems, identity decks, and visual-world presentations. Trained for minimalist, cinematic, editorial, dark-tech, luxury, cultural, security, gaming, developer-tool, and consumer-app brand systems. Optimized for intentional…

Leonxlnx/taste-skill · 89 tokens

high-end-visual-design

Teaches the AI to design like a high-end agency. Defines the exact fonts, spacing, shadows, card structures, and animations that make a website feel expensive. Blocks all the common defaults that make AI designs look cheap or generic.

Leonxlnx/taste-skill · 53 tokens

gpt-taste

Elite UX/UI & Advanced GSAP Motion Engineer. Enforces Python-driven true randomization for layout variance, strict AIDA page structure, wide editorial typography (bans 6-line wraps), gapless bento grids, strict GSAP ScrollTriggers (pinning, stacking, scrubbing), inline micro-images, and massive section spacing.

Leonxlnx/taste-skill · 72 tokens

iflytek-hyper-tts

Use when user asks to synthesize speech, convert text to audio, or read text aloud. 讯飞超拟人语音合成 - 支持文本转语音、语音合成(发音人/语速/语调/音量/输出格式)。大模型语音合成技能。语音合成, 文字转语音, 超拟人, TTS.

iflytek/iFly-Skills · 92 tokens

iflytek-voiceclone-tts

Use when user asks to clone a voice, train a custom voice model, or synthesize speech with a cloned voice. iFlytek Voice Clone tts(声音复刻) — train a custom voice model from audio samples and synthesize speech with the cloned voice. Supports the full workflow: get training text → create task → upload audio → submit…

iflytek/iFly-Skills · 99 tokens