monitor-query

monitor-query is a skill for Claude Code, Codex from Tobewont/monitor-mcp-server. It costs 112 tokens per session (3,268 once invoked), scanned A, original, MIT.

A query guide for reading monitoring data from Prometheus-compatible systems such as Prometheus, Thanos, Mimir, and VictoriaMetrics. Prometheus-compatible systems store time-based measurements about services, computers, containers, and Kubernetes.

In plain words
What is it for?
Use it to check CPU, memory, disk, and network usage; inspect application performance; view Kubernetes pod, node, or container metrics; check alerts; and perform health checks.
Why use it?
It helps turn questions about system health or performance into monitoring queries, including when names such as clusters, namespaces, or pods are ambiguous. It also covers longer time ranges and less usual PromQL queries, where PromQL is the query language used by Prometheus.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/tobewont/monitor-mcp-server/monitor-query
Any agent
npx skills add Tobewont/monitor-mcp-server --skill monitor-query
Clone the repo
git clone --depth 1 https://github.com/Tobewont/monitor-mcp-server

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for monitor-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/tobewont/monitor-mcp-server/monitor-query.svg)](https://agentmods.dev/skills/tobewont/monitor-mcp-server/monitor-query)
Your own site
<a href="https://agentmods.dev/skills/tobewont/monitor-mcp-server/monitor-query"><img src="https://agentmods.dev/badge/skills/tobewont/monitor-mcp-server/monitor-query.svg" alt="Measured on agentmods" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,268 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00112 $0.03268
Opus 5 $0.00056 $0.01634
Sonnet 5 $0.00022 $0.00654
Haiku 4.5 $0.00011 $0.00327

Measured 4d ago against content hash 643f54dfced0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

monitor-query scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

### 方式 C:curl 直接调用(streamable-http 模式)
skills/monitor-query/SKILL.md · 281 lines

How it starts

The opening of the file, as written. The whole thing — 281 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Monitor Query Skill

通过 Monitor MCP Server 智能查询 Prometheus 兼容后端的指标数据。

本 Skill 支持多种 MCP 调用方式,适配不同客户端环境。

进阶参考:消歧策略、step 选取、PromQL 模式、常见问题排查等深度内容请阅读 references/reference.md。当用户的查询涉及 cluster/namespace/pod 命名歧义、长时间范围趋势分析或非常规 PromQL 时,先查阅 reference 文档。


环境变量

使用本 Skill 前,需确认以下环境变量已配置(由用户或部署环境提供):

变量 说明 示例
MONITOR_MCP_SERVER_URL MCP Server 的访问地址,路径需与服务端 PROMETHEUS_MCP_PATH 一致(默认 /mcp,SSE 模式如使用自定义路径需相应调整) http://monitor.example.com:8000/mcp
MONITOR_MCP_SERVER_NAME IDE 中注册的 MCP Server 名称(方式 A 需要) user-monitor-mcp-server
MONITOR_MCP_AUTH_TOKEN MCP Server 的认证 Token(可选,需认证时使用) Bearer xxxx

以下示例中的 ${MONITOR_MCP_SERVER_URL}${MONITOR_MCP_SERVER_NAME} 均引用上述变量,请替换为实际值。


MCP 调用方式

根据你的运行环境,选择以下任意一种方式调用 MCP 工具:

方式 A:Cursor / IDE 内置 MCP(CallMcpTool)

在 Cursor 等已配置 MCP Server 的 IDE 中,直接通过内置工具调用:

CallMcpTool → server: ${MONITOR_MCP_SERVER_NAME}, toolName: <工具名>
arguments: { ... }

示例:

CallMcpTool → server: ${MONITOR_MCP_SERVER_NAME}, toolName: execute_query
arguments: { "query": "k8s:pod:cpu:used:percent{namespace=\"operation-devops-prod\"}" }

方式 B:mcporter CLI

通过 mcporter 命令行工具连接远程 MCP Server(SSE / streamable-http 模式):

# 列出工具
mcporter list ${MONITOR_MCP_SERVER_URL} --allow-http

# 调用工具
mcporter call '${MONITOR_MCP_SERVER_URL}.<工具名>(<参数>)' --allow-http

示例:

# 列出所有指标
mcporter call '${MONITOR_MCP_SERVER_URL}.list_metrics(page_size: 0)' --allow-http --output json

# 获取指标标签
mcporter call '${MONITOR_MCP_SERVER_URL}.get_metric_labels(metric: "k8s:pod:cpu:used:percent")' --allow-http

# 即时查询
mcporter call '${MONITOR_MCP_SERVER_URL}.execute_query(query: "k8s:pod:cpu:used:percent{namespace=\"operation-devops-prod\"}")' --allow-http

# 范围查询
mcporter call '${MONITOR_MCP_SERVER_URL}.execute_range_query(query: "k8s:pod:cpu:used:percent{pod=~\".*drama.*\"}", start: "2026-04-16T00:00:00Z", end: "2026-04-16T06:00:00Z", step: "5m")' --allow-http

Read the full file on GitHub · 281 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 281 lines · 112 tokens per session scan A 643f54dfced0

Subscribe to this mod's changes

monitor-query is a skill published in the GitHub repository Tobewont/monitor-mcp-server (2 stars, last pushed 1mo ago), licensed MIT. It adds 112 tokens to every session and 3,268 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

gke-compute-classes

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto…

google/skills · 83 tokens

application-design-center-design-deploy

Processes GCP infrastructure design and deployment workflows within Application Design Center (ADC). Use when: - Designing GCP infrastructure with Terraform. - Validating local HCL. - Performing best-practice plan scans. - Importing templates to Application Design Center (ADC). - Deploying templates. - Troubleshooting…

google/skills · 94 tokens

gke-reliability

Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for disaster recovery setup or full cluster backups (use gke-backup-dr instead).

google/skills · 73 tokens

gke-workload-security

Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running cluster security audits (auditcluster.sh), configuring Workload Identity Federation (impersonation, KSA/GSA binding, and pod setup), enforcing Network Policies (default-deny…

google/skills · 181 tokens

nemo-automodel-launcher-config

Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.

NVIDIA/skills · 30 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens