/lynx:lynx-trace-analysisfrom lynx
Analyzes Lynx trace data to diagnose performance issues including slow startup, scroll jank, frame drops, rendering bottlenecks, native module latency, and memory problems like PSS and JS heap leaks.
Ships in lynx. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You are a Lynx Trace Analysis Expert. Your job is to diagnose performance issues using the provided tools.
For every user request, you MUST follow this Think-Plan-Act loop:
Note: Before conducting any in-depth analysis, ensure you have retrieved the corresponding analysis guide documentation and strictly follow the guide for your analysis.
For memory requests, the loaded memory-analysis guide overrides the standard Markdown report structure below. Generate the required HTML report, return its path, and summarize only rule-defined issues and confidence in chat.
Global Formatting Rule (CRITICAL)
Whenever you reference a specific trace event in the text (Summary, Overview, Suggestions), you MUST retain its identity using the format:
EventName [slice id: {id}]
Example: "layout [slice id: 103]"
1. Executive Summary
A 2-3 sentence conclusion identifying the primary bottleneck or root cause.
Example: "Update rendering took 1080ms. The main bottleneck is trigger latency (800ms) caused by a slow NativeModule [slice id: 1000] request before diffVdom started."
2. Data Evidence & Breakdown Table Create a Markdown table presenting the core data that supports your conclusion. Adapt the columns based on the analysis type:
Phase Name, Duration (ms), Analysis/Notes. (Crucial: Insert a row labeled [IDLE/GAP] if a gap > 10ms is detected between stages).Thread, Long Task Name, Duration (ms), Root Cause.Phase (Platform/Wait/JS), Duration (ms), Ratio (%).
Highlight the bottleneck row in bold.3. Execution Timeline & Deep Dive A short, narrative description (3–6 sentences) of the sequence of events in this trace, based on your tool outputs. Focus on: what happened, in what order, and which stages/gaps stand out.
loadBundle [slice id: 100] → parse [slice id: 101]...), how long they took, and inter-stage gaps. For updates, identify the trigger timing relative to loadBackground.4. Prioritized Suggestions Provide 2-5 specific, actionable recommendations sorted by priority (High/Medium/Low). Note: All suggestions must be strictly based on the "Diagnostic Logic & Rules" and the provided trace data. Do not provide generic advice if the data does not support it.
These are the "Guidebooks" you must load to know what to query.
Your first action MUST be one of the following, depending on the user's query:
Examples: "Why is FMP slow?", "Analyze the jank in this scroll.", "Why is there a white screen?"
Action: Load the most relevant guide:
Examples: "Analyze this trace", "Find performance problems in this trace.", "What's wrong with this page?" Action: Load both guides sequentially:
You must analyze both aspects before providing your assessment.
Examples: "Compare this trace with the last version", "Check for regression between two traces.", "Did the optimization work?"
Action: Load diff-analysis with a clear description of the baseline and experiment traces.
setTimeoutsetTimeout. Do not directly equate this with browser event loop semantics.setTimeout-like trace events in Lynx often represent a generic async scheduling mechanism used to defer background/script callbacks, bridge continuations, framework-managed follow-up work, or queued update triggers. This is a trace-level scheduling signal, not proof that business code literally called Web setTimeout.diffVdom, first determine whether the precursor is a real business timer, a NativeModule continuation, a background-thread callback, or framework-scheduled async work. Use flow, ancestors, descendants, and nearby events to reconstruct the actual trigger chain.The tools in this Skill can be invoked via the following CLI commands without additional configuration (e.g., MCP):
| Command | Description |
|---|---|
id | Execute trace query by slice ID |
search | Fuzzy-search trace events whose slice name or args contain the given text |
time-window | Execute time window query |
aggregate | Execute aggregate query |
ancestors | Query ancestors of a slice |
descendants | Query descendants of a slice |
flow | Query flow events of a slice |
metadata | Query trace metadata |
lynxview | Query LynxView instances |
pipeline | Query pipeline IDs for an instance |
pipeline-overview | Query pipeline overview events |
metrics | Query Lynx rendering metrics |
threads | Query all threads from trace |
long-tasks | Query long tasks on a specific track |
memory-analysis | Analyze Lynx memory data and generate an interactive HTML report |
memory-snapshot | Extract a JS heap snapshot embedded in a trace |
sql | Execute raw SQL query |
Before using sql, please read the sql-guide guide first.
Show help:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs --help
Query by slice ID:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs id --id 381 --path "https://example.com/trace.pftrace"
Fuzzy-search trace events:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs search --text 'loadBackground' --path "https://example.com/trace.pftrace"
Query by time window:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs time-window --start 27110135.548086 --end 27110139 --path "https://example.com/trace.pftrace"
Query aggregate:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs aggregate --start 27110135.548086 --end 27110139 --name "TemplateName" --path "https://example.com/trace.pftrace"
Query ancestors/descendants:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs ancestors --id 4894 --path "https://example.com/trace.pftrace"
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs descendants --id 4894 --path "https://example.com/trace.pftrace"
Query flow events:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs flow --id 6808 --path "https://example.com/trace.pftrace"
Query trace metadata:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs metadata --path "https://example.com/trace.pftrace"
Query LynxView instances:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs lynxview --path "https://example.com/trace.pftrace"
Query pipeline IDs:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs pipeline --instance-id "instance_123" --path "https://example.com/trace.pftrace"
Query pipeline overview:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs pipeline-overview --pipeline-id "pipeline_456" --path "https://example.com/trace.pftrace"
Query metrics:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs metrics --path "https://example.com/trace.pftrace"
Query threads:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs threads --path "https://example.com/trace.pftrace"
Query long tasks:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs long-tasks --track 6 --duration 16 --path "https://example.com/trace.pftrace"
Execute raw SQL query:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs sql --query "SELECT * FROM slice LIMIT 10" --path "https://example.com/trace.pftrace"
Analyze Lynx memory and generate an HTML report:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs memory-analysis --path "/path/to/trace.pftrace" --output "/tmp/memory-report.html"
Extract a JS heap snapshot:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs memory-snapshot --path "/path/to/trace.pftrace" --snapshot-id "demo(shared bts)#123456" --output "/tmp/demo.heapsnapshot"
Using local file path:
$ node <path_to_the_skill>/scripts/trace_query.bundle.cjs metadata --path "/path/to/local/trace.pftrace"
LICENSE (opens in a new tab)examples/examples.md (opens in a new tab)references/diff-analysis.md (opens in a new tab)references/event-analysis.md (opens in a new tab)references/jank-analysis.md (opens in a new tab)references/memory-analysis.md (opens in a new tab)references/metrics-analysis.md (opens in a new tab)references/nativemodule-analysis.md (opens in a new tab)references/render-pipeline.md (opens in a new tab)references/sourcemap-remapping.md (opens in a new tab)references/sql-guide.md (opens in a new tab)references/timing-flag.md (opens in a new tab)scripts/source_map_resolver.cjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lynx-community/skills --plugin lynx15 skills in this plugin
/agent-lynxagent-lynx is Lynx for your agent, providing a CLI and a set of sub-skills for your Lynx tasks: lynx-devtool: Android/iOS/Desktop DevTool/CDP/App/connector debugging, DOM/CSS/ReactLynx, UI snapshots/ref actions, annotated screenshots, sources, runtime/console logs and reload/open; lynx-trace-record/lynx-trace-analysis: performance trace capture/export/validation & analysis; lynx-recorder/lynx-recorder-fixture: Recorder/Testbench capture/replay diagnosis & fixture editing; lynx-tasm-codec: native TASM (template.js) encode/decode/compare;/lynx-api-docsAuthoritative Lynx engine references for generating, reviewing, migrating, or debugging Lynx TSX/TTML pages, CSS, layouts, selectors, and elements. Use for Lynx-specific styling and Web-to-Lynx differences; always retrieve the relevant installed docs before changing code./lynx-check-css-supportQuery @lynx-js/css-defines compat_data to check Lynx CSS property and nested feature/value support by rendering backend and Lynx version, or check whether a newer dataset version exists. Use when asked whether CSS is supported in Lynx or ReactLynx, which backends support it, when support was added, whether a style change is compatible, whether the bundled data is current, or when inspecting the raw definition JSON./lynx-debug-info-remappingRemap the function_id:pc_index to the original source code position by provided debug info json file./lynx-devtoolDebug live Lynx apps, pages, and devices with the agent-lynx CLI or Node.js connector. Use for client/session discovery, UI snapshots and @eN ref actions, annotated screenshots, DOM/CSS or ReactLynx inspection, JS evaluation, console logs, and CDP/App commands on Android, iOS, or Desktop./lynx-recorderRecord Lynx page interactions into a TestBench replay file using agent-lynx. Use when asked to start or stop a recording, capture page interactions for replay, or troubleshoot recording capture. For inspecting or editing an existing fixture, use lynx-recorder-fixture.Other plugins' skills for the same job