Latency analysis

From vladkesler/initrunner · View interactive version

Latency analysis is an AI agent skill from the GitHub repository vladkesler/initrunner. Analyze endpoint latency trends using historical check data from memory. Detects slow degradation, spikes vs sustained issues, and calculates baseline deviations.

How to use this skill

Skill file

Latency trend analysis skill using episodic memory.

When to activate

Use this skill when comparing current latency against historical data,

or when the user asks about performance trends for an endpoint.

Methodology

1. Gather history

Recall the last 10 episodic memories for the endpoint:

recall("<endpoint-host-and-path> check")

Extract latency values from each recalled episode.

2. Calculate baseline

Compute the rolling baseline as the median latency from recalled

episodes. If fewer than 3 data points exist, note "insufficient data

for baseline" and skip trend analysis.

3. Measure deviation

deviation = (current - baseline) / baseline * 100

Classification:

sustained

4. Determine trend direction

Compare the last 3 readings against the previous 3:

5. Alert criteria

All three conditions must hold for a degradation alert:

  1. Current latency > baseline * 1.5
  2. At least 3 consecutive elevated readings (not a single spike)
  3. Trend direction is "degrading" or "stable at elevated"

MUST

MUST NOT

history (200ms might be normal for one endpoint, degraded for another)

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.