/lightrun-ai:lightrun-slow-execution-diagnosisfrom lightrun-ai
Diagnoses performance incidents in running services using Lightrun MCP: slow endpoints, latency regressions, timeouts, hangs, and intermittent slowness. Uses runtime history and slow-execution snapshots to correlate state with code and telemetry.
Ships in lightrun-ai. 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.
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.
Frame the performance hypotheses and identify the evidence that would distinguish them. Follow Runtime History reads. Treat exposed schemas and descriptions as authoritative. History reads do not require active agents or new-action preflight.
Complete source-discovery preflight before creating any live action, including baseline timing. Historical conclusions remain subject to the evidence checks above, not live-source availability.
customSourceName even when discovery omits custom sources.Checkpoint: Run source discovery and select a concrete target before creating a live action. Runtime compatibility may remain unknown only under Runtime support. Use existing latency evidence to select the code path and derive a threshold before live-source preflight. Run preflight only when creating a live action.
For a remaining live evidence need, 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.
These gates apply to live action creation, including baseline timing, rather than history reads.
| 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"
}) -> actionId
Poll 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 exposed
For 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;
historical versus newly captured live evidence, with Runtime History hit IDs and capture times when available, source/version scope, and completeness limitations;
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.
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (lightrun-platform/lightrun-ai) — no native marketplace selected
npx claudepluginhub p/lightrun-platform-lightrun-skills5 skills in this plugin
/lightrun-ask-prodAnswer questions about production system behavior — captured variable values, execution durations, hit counts, and value distributions — using suitable existing Runtime History first, then live instrumentation with Lightrun MCP tools when needed. Use when the question requires runtime evidence rather than static code analysis (e.g. "show recent requests to this endpoint", "show the runtime distribution for this operation", "what values appear for this expression in production?", "which branch runs for customer X?"). Do not use for incident diagnosis, pull-request review, code changes, setup, or deployment. Route latency, timeout, deadline, SLO, or hang diagnosis to lightrun-slow-execution-diagnosis when available; route other diagnosis, or fallback when that skill is unavailable, to lightrun-live-runtime-debugging when available. If neither diagnosis skill is available, report the scope gap./lightrun-error-remediation-automationGuide deterministic runtime investigations in environments using Lightrun MCP tools, using suitable Runtime History before new live actions, with preflight gating, recovery/resume rules, evidence-first diagnosis, PR-first fix proposal delivery, and local source-code fallback only when PR creation is not possible./lightrun-live-runtime-debuggingDiagnose bugs and incidents using suitable captured Runtime History before focused live capture with Lightrun MCP. Use when static analysis or logs cannot explain the failure mechanism, when a hypothesis must be tested against runtime values or control flow, or when resuming Lightrun async actions. For latency, timeout, deadline, SLO, or hang diagnosis, use lightrun-slow-execution-diagnosis when available; if unavailable, continue here with best-effort evidence. Do not use for one-off production measurements (use lightrun-ask-prod when available; otherwise report the measurement-scope gap), pull-request review, code changes, setup, or deployment./lightrun-runtime-aware-pr-reviewUse when reviewing a pull request with runtime or production evidence — for example to review a PR with runtime verification, gather production evidence, or simulate a patch on live samples. Reviews a pull request by diffing against the PR merge base, checking Runtime History before collecting live samples for remaining gaps, and simulating the patch on captured production inputs.2 plugins in one repository ship this exact skill · first indexed Nov 18, 2026
Other plugins' skills for the same job