Diagnose performance incidents in running services with Lightrun MCP: slow endpoints, latency or SLO regressions, timeouts, deadline-exceeded errors, hangs, and slowness that is intermittent, sporadic, occasional, happens only sometimes, or appears only under load. Use when diagnosing a performance incident; prefer this over lightrun-live-runtime-debugging, including for mixed slow-and-incorrect cases. Use slow-execution snapshots when a duration boundary separates problematic executions; use focused active-path snapshots or call stacks for known hangs that may not reach an end marker. Select the narrowest code section, derive an evidence-based threshold, and correlate captured state with code and telemetry. Use lightrun-live-runtime-debugging for non-performance diagnosis and lightrun-ask-prod for one-off timing, when available; otherwise report the scope gap. Do not use for pull-request review, code changes, setup, deployment, or post-deployment performance validation.
71
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
—
The risk profile of this skill
When this skill is invoked, it may report one usage event through the Lightrun-owned skill_start MCP tool. This helps Lightrun measure skill adoption. The request supplies the skill name lightrun-slow-execution-diagnosis.
Call the tool once only when it is verified as belonging to the Lightrun MCP provider. Do not call similarly named tools exposed by other providers. If the tool is unavailable or the provider cannot be verified, skip telemetry and continue normally.
Apply the description's scope exactly. Keep mixed slow-and-incorrect behavior in scope. For excluded work, use the named skill when installed. Otherwise return blocked with the scope mismatch and required workflow.
Read MCP tool discovery to enumerate tools, select sources, apply selectors, and recover missing MCP. Complete its preflight. Treat exposed schemas and descriptions as authoritative.
customSourceName even when discovery omits custom sources.Checkpoint: Proceed to evidence-path selection only after source discovery passes and a concrete target is selected. Runtime compatibility may remain unknown only under Runtime support.
Choose one path:
blocked with the missing capability and retry condition.lightrun-live-runtime-debugging when installed and preserve established evidence. Otherwise return inconclusive with the missing discriminator and evidence needed next.For path 1, read Slow-execution snapshot workflow for threshold derivation, marker placement, create parameters, dual-lifecycle polling, and resume state. Follow it end to end before creating or resuming an action.
| Evidence | Runtime and version gate |
|---|---|
| Async duration | Java, Kotlin, or Scala; Lightrun 1.87+; compatible JVM agent |
| Slow-execution snapshot | Same runtimes; Lightrun and JVM agent 1.89+; create schema exposes snapshotThresholdMs, snapshotExpressions, and snapshotMaxHits |
| Regular snapshot | Java, Kotlin, Scala, Python, Node.js, or .NET |
metadata.tags.returnedError as an agent gap.On resume, re-enumerate tools and call status for saved or recovered action IDs before creating anything. Use get_actions with the stable correlation key when exposed.
Minimal slow-execution snapshot quickstart: For a validated checkout-service target at these lines with an evidence-derived 450 ms boundary, call:
execution_duration_create({
"agentPoolName": "default", "agentNames": ["checkout-service"],
"file": "src/main/java/com/acme/CheckoutService.java", "startLine": 120, "endLine": 128,
"snapshotThresholdMs": 450, "snapshotExpressions": ["request.id", "cart.items.size()"],
"snapshotMaxHits": 3, "correlationKey": "checkout-latency"
}) -> actionIdPoll the returned ID through both independent branches:
duration branch: poll execution_duration_status({"actionId": actionId})
-> execution_duration_samples({"actionId": actionId, "agentName": "checkout-service"})
snapshot branch: poll snapshot_status({"actionId": actionId})
-> snapshot_get_values({"actionId": actionId})
snapshot_get_call_stack({"actionId": actionId}) # optional when exposedFor non-threshold capture:
reproduction-required. Do not poll indefinitely.Follow schema polling guidance for either path. If absent, poll after 2 seconds; then wait 1, 2, and 5 seconds between polls. Repeat 5-second waits only until total waiting reaches about 15 seconds.
When compatibility is unknown, make one create attempt. Revalidate targeting or capability failures before repeating.
Correlate runtime evidence with available logs, metrics, traces, code, and recent changes using matching source, time window, and request or tenant identifiers. Treat correlation as support, not proof of causation.
Cancel only actions created or explicitly inherited by this investigation when stale, superseded, mistargeted, or no longer needed. Retain an action only for a concrete pending reproduction and record why.
Return only blocked, reproduction-required, inconclusive, or diagnosed.
Always include:
the question;
runtime source and code range, or why either is unavailable;
threshold provenance, or why thresholding was not used;
observations, hypotheses, and confidence;
every owned action's disposition.
blocked: include the failed gate, established evidence, remediation, and exact retry condition.
reproduction-required: include active action IDs, target and location, capture rationale, creation and expiry, reproduction request, and exact resume step. Record both lifecycles for slow-execution snapshot actions; use schema lifecycle fields otherwise.
inconclusive: include observations and rule-outs, the remaining gap, and the next discriminating evidence.
diagnosed: claim only when evidence connects the trigger, runtime state, executed path, latency, timeout, or hang mechanism, and impact. Include a code fix and validation checks.
d2b954c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.