latency-analysis

latency-analysis is a skill for Claude Code, Codex from vladkesler/initrunner. It costs 30 tokens per session (449 once invoked), scanned A, original, Apache-2.0.

A method for analyzing whether an endpoint is becoming slower by comparing recent response times with historical checks. An endpoint is a specific web address or service operation that can be monitored.

In plain words
What is it for?
Use it to assess latency trends, calculate deviation from the usual response time, classify an endpoint as normal or degraded, and decide when an alert is warranted.
Why use it?
It separates normal fluctuations and isolated spikes from sustained performance problems using a historical baseline.

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/vladkesler/initrunner/latency-analysis
Any agent
npx skills add vladkesler/initrunner --skill latency-analysis
Clone the repo
git clone --depth 1 https://github.com/vladkesler/initrunner

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for latency-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/vladkesler/initrunner/latency-analysis.svg)](https://agentmods.dev/skills/vladkesler/initrunner/latency-analysis)
Your own site
<a href="https://agentmods.dev/skills/vladkesler/initrunner/latency-analysis"><img src="https://agentmods.dev/badge/skills/vladkesler/initrunner/latency-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 449 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00030 $0.00449
Opus 5 $0.00015 $0.00225
Sonnet 5 $0.00006 $0.00090
Haiku 4.5 $0.00003 $0.00045

Measured 5d ago against content hash 28f74fdd972c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

latency-analysis scanned grade A with 0 findings 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 5d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/roles/api-monitor/skills/latency-analysis/SKILL.md · 71 lines

What it actually says

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:

  • <25% deviation: Normal fluctuation -- no action
  • 25-100% deviation: Elevated -- note but do not alert unless sustained
  • >100% deviation: Degraded -- check if sustained
  • Timeout: Down -- immediate alert

4. Determine trend direction

Compare the last 3 readings against the previous 3:

  • All decreasing or stable: improving
  • Mixed or flat: stable
  • All increasing: degrading

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

  • Use actual data from memory -- never estimate without checking
  • State the baseline and current values in any alert
  • Include the number of consecutive elevated readings

MUST NOT

  • Alert on a single spike (wait for 3 consecutive readings)
  • Assume a baseline without checking memory
  • Use absolute thresholds without comparing to this endpoint's own history (200ms might be normal for one endpoint, degraded for another)
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. 5d ago First seen · 71 lines · 30 tokens per session scan A 28f74fdd972c

Subscribe to this mod's changes

latency-analysis is a skill published in the GitHub repository vladkesler/initrunner (41 stars, last pushed 7d ago), licensed Apache-2.0. It adds 30 tokens to every session and 449 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.