Runid latency analysis

From hua-bang/pulse-agent · View interactive version

Runid latency analysis is an AI agent skill from the GitHub repository hua-bang/pulse-agent. Analyze runId latency and performance from devtools data. Use when asked to investigate a specific runId's timing, identify bottlenecks across LLM/Tool/Engine Plugin, or produce a fixed bilingual (ZH+EN) diagnosis report with metrics and hypotheses.

How to use this skill

Skill file

RunId Latency Analysis

Overview

Provide a fixed, structured diagnosis for a specific runId using devtools data and timing spans, with clear bottleneck classification and next actions. Output both Chinese and English reports (Chinese first).

Workflow

  1. Confirm inputs and scope
  1. Load run data
  1. Extract metrics
  1. Diagnose bottleneck category
  1. Produce report (fixed bilingual template, Chinese then English)

Fixed Report Template (ZH + EN)

RunId 延迟报告 (中文)

1) 摘要
- RunId: <runId>
- 总体结论: <一句话结论>
- 主要瓶颈: <LLM/Tool/Plugin/Idle>

2) 关键指标 (LLM)
- TTFB: <value or N/A>
- TTFT: <value or N/A>
- TTFT(text): <value or N/A>
- Stream: <value or N/A>
- Tool Wait (during LLM): <value or N/A>
- Tool Exec (during LLM): <value or N/A>
- Cached input tokens: <value or N/A>
- Total tokens: <value or N/A>

3) Tool 耗时 (Top 3)
- <toolName>#<index>: wait <x>, exec <y>, notes <...>
- <toolName>#<index>: wait <x>, exec <y>, notes <...>
- <toolName>#<index>: wait <x>, exec <y>, notes <...>

4) Engine Plugin 耗时 (Top 3)
- <pluginName>.<hook>: <duration>
- <pluginName>.<hook>: <duration>
- <pluginName>.<hook>: <duration>

5) Timeline 备注
- Turn 边界: <T1..Tn>
- Idle gaps: <位置/原因>

6) 诊断
- <简短推理 + 证据>

7) 下一步行动
- <action 1>
- <action 2>

RunId Latency Report (English)

1) Summary
- RunId: <runId>
- Overall impression: <one-line conclusion>
- Primary bottleneck: <LLM/Tool/Plugin/Idle>

2) Key Metrics (LLM)
- TTFB: <value or N/A>
- TTFT: <value or N/A>
- TTFT(text): <value or N/A>
- Stream: <value or N/A>
- Tool Wait (during LLM): <value or N/A>
- Tool Exec (during LLM): <value or N/A>
- Cached input tokens: <value or N/A>
- Total tokens: <value or N/A>

3) Tool Spans (Top 3)
- <toolName>#<index>: wait <x>, exec <y>, notes <...>
- <toolName>#<index>: wait <x>, exec <y>, notes <...>
- <toolName>#<index>: wait <x>, exec <y>, notes <...>

4) Engine Plugin Spans (Top 3)
- <pluginName>.<hook>: <duration>
- <pluginName>.<hook>: <duration>
- <pluginName>.<hook>: <duration>

5) Timeline Notes
- Turn boundaries: <T1..Tn>
- Idle gaps: <where/why>

6) Diagnosis
- <short reasoning with evidence>

7) Next Actions
- <action 1>
- <action 2>

Handling Missing Data

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.