lgtm

Query Loki logs, Prometheus/Mimir metrics, and Tempo traces to investigate production issues.

Updated Jan 23, 2026
One-click install
npx skills add https://github.com/pokgak/agent-skills --skill lgtm-pokgak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lgtm
Source: https://github.com/pokgak/agent-skills/tree/main/skills/lgtm
Command: npx skills add https://github.com/pokgak/agent-skills --skill lgtm-pokgak

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Quickly investigate production incidents by correlating logs, metrics, and distributed traces instead of manually guessing where the failure started.

Core Features & Use Cases

  • Unified observability querying (LGTM stack): Search Loki logs, analyze Prometheus/Mimir metrics, and inspect Tempo traces for end-to-end context.
  • Context-efficient orchestration pattern: Uses a discovery-and-investigation workflow so the agent gathers valid label/service values before running targeted queries.
  • Actionable summaries instead of raw JSON: Extracts the signal (counts, trends, top offenders, trace IDs) and returns concise results for faster decision-making.
  • Error/health-oriented workflows: Detects error spikes, latency issues, and service health regressions across time ranges.

Use when you need to answer questions like: Why are errors increasing, what changed in latency, where is the request spending time, and which services are impacted?

Quick Start

Ask the agent to: Investigate why the checkout app is seeing elevated error rates in production over the last hour using logs, metrics, and traces.

Frequently Asked Questions about lgtm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug production incidents by correlating logs, metrics, and traces?

Debug production incidents by querying Loki logs, Prometheus metrics, and Tempo traces to correlate observability signals across services. The tool orchestrates discovery of labels and services before running targeted queries to identify root causes for errors and latency regressions.

What is the best way to investigate elevated error rates across microservices?

Investigate elevated error rates by orchestrating a discovery-and-investigation workflow that searches Loki logs, analyzes Prometheus metrics, and inspects Tempo traces. It extracts actionable signals like error counts, trends, and top offenders into concise summaries instead of raw JSON.

Do I need a specific configuration file to query Loki logs and Prometheus metrics?

Yes, you need a valid lgtm configuration at ~/.config/lgtm/config.yaml or Grafana Cloud lgtm discover to query Loki logs and Prometheus metrics. This configuration provides the necessary endpoints and authentication for the observability querying workflow.

How do I find where request latency is spending time using distributed traces?

Find where request latency is spending time by inspecting Tempo distributed traces using TraceQL search patterns across time ranges and namespaces. The tool distills JSON trace outputs into concise summaries highlighting trace IDs and latency bottlenecks for faster decision-making.

Can I analyze service health regressions across specific time ranges and namespaces?

Yes, you can analyze service health regressions across specific time ranges and namespaces by querying Prometheus metrics and Loki logs. The tool applies a context-efficient orchestration pattern to gather valid label values before running targeted health-oriented queries.

Why are my raw JSON outputs from PromQL queries hard to use for incident debugging?

Raw JSON outputs from PromQL queries are hard to use because they obscure the signal. This tool distills JSON outputs from logs, metrics, and traces into concise summaries, extracting counts, trends, top offenders, and trace IDs for faster incident debugging and decision-making.