webperf-interaction
Intelligent interaction performance analysis with automated workflows for INP debugging, scroll jank investigation, and main thread blocking. Includes decision trees that automatically run script attribution when long frames detected, break down input latency phases, and correlate layout shifts with interactions. Features workflows for complete interaction audit, third-party script impact analysis, and animation performance debugging. Cross-skill integration with Core Web Vitals (INP/CLS correlation) and Loading (script execution analysis). Use when the user asks about slow interactions, janky scrolling, unresponsive pages, or INP optimization. Compatible with Chrome DevTools MCP.
What this skill does
# WebPerf: Interaction & Animation JavaScript snippets for measuring web performance in Chrome DevTools. Execute with `mcp__chrome-devtools__evaluate_script`, capture output with `mcp__chrome-devtools__get_console_message`. ## Scripts - `scripts/Forced-Synchronous-Layout.js` — Forced Synchronous Layout Detector - `scripts/Input-Latency-Breakdown.js` — Input Latency Breakdown - `scripts/Interactions.js` — Interactions - `scripts/Layout-Shift-Loading-and-Interaction.js` — Layout Shift Tracking - `scripts/Long-Animation-Frames-Helpers.js` — LoAF Helpers - `scripts/Long-Animation-Frames-Script-Attribution.js` — Long Animation Frames Script Attribution - `scripts/Long-Animation-Frames.js` — Long Animation Frames (LoAF) - `scripts/LongTask.js` — Long Tasks - `scripts/Scroll-Performance.js` — Scroll Performance Analysis ## Common Workflows ### Complete Interaction Performance Audit When the user asks for interaction analysis or "audit responsiveness": 1. **Interactions.js** - List all user interactions with timing 2. **Input-Latency-Breakdown.js** - Break down interaction phases 3. **Long-Animation-Frames.js** - Detect blocking animation frames 4. **LongTask.js** - Identify long tasks blocking the main thread 5. **Scroll-Performance.js** - Measure scroll smoothness ### INP Deep Dive When INP is slow (>200ms) or the user asks "debug INP" or "slow interactions": 1. **Interactions.js** - Identify which interactions are slow 2. **Input-Latency-Breakdown.js** - Break down into input delay, processing time, presentation delay 3. **Long-Animation-Frames.js** - Find animation frames >50ms that block interactions 4. **Long-Animation-Frames-Script-Attribution.js** - Identify scripts causing the blocking 5. **Long-Animation-Frames-Helpers.js** - Get detailed timing and attribution helpers ### Scroll Jank Investigation When the user reports "scroll jank", "choppy scrolling", or "scroll performance issues": 1. **Scroll-Performance.js** - Measure scroll smoothness and frame drops 2. **Long-Animation-Frames.js** - Detect frames causing jank (>50ms) 3. **Layout-Shift-Loading-and-Interaction.js** - Check for layout shifts during scroll 4. **Long-Animation-Frames-Script-Attribution.js** - Find scripts running during scroll ### Main Thread Blocking Analysis When the page feels unresponsive or the user asks "why is the page frozen": 1. **LongTask.js** - List all tasks >50ms blocking the main thread 2. **Long-Animation-Frames.js** - Correlate with animation frame timing 3. **Long-Animation-Frames-Script-Attribution.js** - Attribute blocking to specific scripts 4. Cross-reference with **webperf-loading** skill: - JS-Execution-Time-Breakdown.js (script parsing/execution time) - First-And-Third-Party-Script-Info.js (identify third-party blockers) ### Layout Shift During Interaction When the user reports "things move when I click" or CLS issues during interaction: 1. **Layout-Shift-Loading-and-Interaction.js** - Separate loading vs interaction shifts 2. **Interactions.js** - Correlate shifts with specific interactions 3. **CLS.js** (from Core Web Vitals skill) - Measure total CLS 4. Cross-reference with **webperf-media** skill: - Image-Element-Audit.js (images without dimensions causing shifts) ### Animation Performance Analysis When animations feel sluggish or the user asks "debug animation performance": 1. **Long-Animation-Frames.js** - Identify frames taking too long to render 2. **Long-Animation-Frames-Helpers.js** - Detailed frame timing analysis 3. **Long-Animation-Frames-Script-Attribution.js** - Find scripts delaying frames 4. **Scroll-Performance.js** - If scroll animations are involved ### Third-Party Script Impact on Interactions When interactions are slow and third-party scripts are suspected: 1. **Long-Animation-Frames-Script-Attribution.js** - Identify third-party scripts in long frames 2. **LongTask.js** - Measure long task frequency 3. Cross-reference with **webperf-loading** skill: - First-And-Third-Party-Script-Info.js (list all third-party scripts) - First-And-Third-Party-Script-Timings.js (measure script loading impact) - Script-Loading.js (check for blocking scripts) ## Decision Tree Use this decision tree to automatically run follow-up snippets based on results: ### After Interactions.js - **If any interaction > 200ms** → Run **Input-Latency-Breakdown.js** on slow interactions; also run **webperf-core-web-vitals:INP.js** for official INP measurement - **If many interactions > 200ms** → Main thread congestion, run: 1. **Long-Animation-Frames.js** (blocking frames) 2. **LongTask.js** (long tasks) 3. **Long-Animation-Frames-Script-Attribution.js** (culprit scripts) - **If specific interaction types are slow (e.g., click vs keyboard)** → Focus on that interaction type - **If interactions occur during page load** → Cross-check with **webperf-loading:JS-Execution-Time-Breakdown.js** ### After Input-Latency-Breakdown.js - **If Input Delay > 50ms** → Main thread was busy, run: 1. **Long-Animation-Frames.js** (what was blocking) 2. **LongTask.js** (long task before interaction) - **If Processing Time > 100ms** → Heavy event handlers, run: 1. **Long-Animation-Frames-Script-Attribution.js** (which scripts) 2. **webperf-loading:First-And-Third-Party-Script-Info.js** (third-party involvement) - **If Presentation Delay > 50ms** → Rendering bottleneck, run: 1. **Long-Animation-Frames.js** (frame rendering time) 2. **Layout-Shift-Loading-and-Interaction.js** (check for layout work) ### After Long-Animation-Frames.js - **If many frames > 50ms** → Run **Long-Animation-Frames-Script-Attribution.js** to identify causes - **If frames > 100ms** → Critical blocking, run: 1. **Long-Animation-Frames-Script-Attribution.js** (detailed attribution) 2. **LongTask.js** (related long tasks) 3. **webperf-loading:JS-Execution-Time-Breakdown.js** (script execution cost) - **If frames occur during scroll** → Run **Scroll-Performance.js** to measure impact - **If frames occur during page load** → Cross-check with **webperf-loading:Event-Processing-Time.js** ### After Long-Animation-Frames-Script-Attribution.js - **If third-party scripts are causing long frames** → Run: 1. **webperf-loading:First-And-Third-Party-Script-Info.js** (list all third-party scripts) 2. **webperf-loading:Script-Loading.js** (check loading strategy) 3. Recommend deferring or removing problematic scripts - **If first-party scripts are causing long frames** → Recommend: - Code splitting - Debouncing/throttling event handlers - Web Workers for heavy computation - **If forced reflow/layout detected** → Analyze DOM manipulation patterns ### After LongTask.js - **If many long tasks (>5)** → Main thread is congested, run: 1. **Long-Animation-Frames-Script-Attribution.js** (detailed attribution) 2. **webperf-loading:JS-Execution-Time-Breakdown.js** (script execution analysis) 3. **webperf-loading:First-And-Third-Party-Script-Info.js** (identify heavy scripts) - **If long tasks > 500ms** → Critical blocking, investigate: - Synchronous third-party scripts - Heavy computation without Web Workers - Excessive DOM manipulation - **If long tasks correlate with interactions** → Run **Interactions.js** to see impact ### After Scroll-Performance.js - **If scroll FPS < 30** → Severe jank, run: 1. **Long-Animation-Frames.js** (blocking frames during scroll) 2. **Long-Animation-Frames-Script-Attribution.js** (scripts running on scroll) 3. **Layout-Shift-Loading-and-Interaction.js** (layout work during scroll) - **If scroll FPS 30-50** → Noticeable jank, investigate: - Scroll event handlers - Passive event listeners - CSS will-change properties - **If scroll FPS > 50** → Good, but check for layout shifts during scroll ### After Layout-Shift-Loading-and-Interaction.js - **If shifts occur during page load** → Cross-reference with **webperf-core-web-vitals:CLS.js** - **If shifts occur during interaction** → This impacts INP a
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.