obs-query

Execute PromQL and LogQL queries against Prometheus and Loki.

70|6|Updated Feb 23, 2026
One-click install
npx skills add https://github.com/shepard-system/shepard-obs-stack --skill obs-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: obs-query
Source: https://github.com/shepard-system/shepard-obs-stack/tree/main/.claude/skills/obs-query
Command: npx skills add https://github.com/shepard-system/shepard-obs-stack --skill obs-query

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows users to directly query their observability data in Prometheus (PromQL) and Loki (LogQL), enabling custom metric analysis and log searching beyond pre-built dashboards.

Core Features & Use Cases

  • Execute PromQL Queries: Run instant and range queries against Prometheus metrics.
  • Execute LogQL Queries: Search and filter logs stored in Loki.
  • Query Type Detection: Automatically determines whether a query is PromQL or LogQL.
  • Use Case: A user wants to know the exact number of tool calls made by the 'gemini-cli' in the last 24 hours, or they need to find all log entries containing "error" from the 'claude-code' service.

Quick Start

Use the obs-query skill to find the value of the 'up' metric.

Frequently Asked Questions about obs-query

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

FAQPage Schema
How do I query Prometheus metrics and Loki logs without using pre-built dashboards?

You can execute custom PromQL and LogQL queries directly against Prometheus and Loki to retrieve specific metric values and filter log entries beyond standard dashboard visualizations.

Can I run both instant and range queries for metrics using PromQL?

Yes, you can run both instant and range queries using PromQL against Prometheus, allowing you to retrieve current metric values or analyze metric data over a specified time range.

Does the query type detection automatically differentiate between PromQL and LogQL?

Yes, automatic query type detection determines whether your input is a PromQL query for Prometheus metrics or a LogQL query for Loki logs, simplifying the search process.

Do I need API endpoint access to search Loki logs with LogQL?

Yes, you must have access to the observability API endpoints for Loki and Prometheus to retrieve log and metric data successfully during your query execution.

What is the best way to find specific error log entries from a service in Loki?

The best way to find specific error logs is to execute a targeted LogQL query against Loki to search and filter log entries matching your criteria, such as a specific service name or error keyword.