Ask Prod Skill🔗
The Ask Prod Skill helps an AI assistant answer questions about live production or staging behavior using Lightrun MCP. It guides the assistant to collect focused runtime data from running services, then translate that data into a clear answer.
The skill is available in the lightrun-ai repository as lightrun-ask-prod.
Before using this skill, install the shared Lightrun AI Skills package and complete the requirements in Lightrun AI Skills.
When to use this skill🔗
Use the Ask Prod Skill when you want an AI assistant to answer a specific question that requires live runtime evidence from Lightrun MCP.
This skill is useful when you need to know:
- The current value of a variable, field, cache entry, request, response, or runtime expression.
- How long an operation takes in a live environment.
- How often a line of code or branch executes.
- What range of values an expression takes over time.
- Which branch or path runs for a specific customer, tenant, request, or condition.
How to use this skill🔗
Start a new AI assistant chat and ask the assistant to use the Ask Prod Skill for the question you want answered.
Use a prompt like this:
Use the Lightrun Ask Prod Skill to answer this production question.
Question:
How many available connections are in the database connection pool?
Target service:
payment-service in production.
What I know:
The pool is managed by ConnectionPoolManager. I want the current available connection count from the live service, not an estimate from code.
The assistant should identify the specific value or measurement you are asking for, locate the relevant code, run the Lightrun MCP preflight check, select the right runtime source, and collect runtime data from the live service.
Example questions🔗
The Ask Prod Skill can help answer questions such as:
- How many available connections are in the database connection pool?
- How many users are currently logged in to a service?
- Give me an example of an HTTP request sent to
POST /api/v1/users. - Give me an example of the response JSON from the external sales tax service.
- Is this cache key currently in use?
- How long does it take to process an average trade request?
- Is this list ever empty in production?
- What values can this expression take when
varXis true? - Which branch runs for a specific customer?
What the skill does🔗
The skill gives the assistant a structured workflow for answering production questions with live runtime evidence:
- It starts by clarifying the value, behavior, or measurement being requested.
- It chooses the Lightrun MCP capability that matches the question.
- It locates the exact source file and line number needed for runtime instrumentation.
- It runs
get_runtime_sourcesto discover available agent pools, agents, tags, and custom sources. - It collects data with the relevant runtime tool.
- It summarizes the result in plain language and explains any remaining uncertainty.
This approach helps the assistant avoid guessing from static code and keeps the final answer grounded in live application behavior.
Runtime capabilities🔗
The assistant selects the runtime capability based on the question:
| If the question asks... | The assistant uses... |
|---|---|
| What is the current value of an expression? | Snapshot expression capture with snapshot_create, snapshot_status, and snapshot_get_values |
| How long does an operation take? | Execution duration with get_runtime_execution_duration |
| How often does a line or branch run? | Execution count with get_runtime_execution_count |
| What range of numeric values appears over time? | Numeric metrics with get_runtime_numeric_metric |
Expected investigation flow🔗
During a successful Ask Prod investigation, the assistant should:
- Restate the question and identify the runtime value, behavior, or measurement needed.
- Locate the source file and line number that can produce the requested data.
- Run
get_runtime_sourcesto discover available Lightrun runtime sources. - Select the most relevant agent pool and agents, or ask you to choose when several sources match.
- Choose the correct Lightrun MCP tool for the requested measurement.
- Collect data from the live service, using a 60-second sampling window by default.
- Extend the sampling window when the operation is infrequent or no data is returned.
- Return a direct answer with the collected runtime evidence and any limits of the result.
Troubleshooting🔗
The assistant cannot find Lightrun MCP tools🔗
Confirm that Lightrun MCP is installed, enabled, and authenticated in your AI client. Then ask the assistant to list the available Lightrun MCP tools.
For setup instructions, see the MCP quickstart guide.
get_runtime_sources returns no sources🔗
Confirm that the target application is running with the Lightrun agent connected and that your Lightrun user has access to the relevant agent pool, tag, or custom source.
Several runtime sources match the question🔗
Include the service name, environment, tag, agent pool, custom source, customer segment, or region in your prompt. If the assistant still finds several plausible targets, choose the runtime source manually.
Runtime actions return no data🔗
Confirm that the selected runtime source matches the code path you are asking about. If the operation is infrequent, ask the assistant to use a longer sampling window and trigger the relevant flow again.
The code location is unclear🔗
Add the class, function, endpoint, field name, or repository path to your prompt. The assistant should ask for clarification when it cannot identify a reliable instrumentation location.