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.
npx skills add talkops-ai/talkops-mcp --skill authoring-loki-alerting-and-recording-rulesgit clone --depth 1 https://github.com/talkops-ai/talkops-mcpWrote 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.
[](https://agentmods.dev/skills/talkops-ai/talkops-mcp/authoring-loki-alerting-and-recording-rules)<a href="https://agentmods.dev/skills/talkops-ai/talkops-mcp/authoring-loki-alerting-and-recording-rules"><img src="https://agentmods.dev/badge/skills/talkops-ai/talkops-mcp/authoring-loki-alerting-and-recording-rules/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/talkops-ai/talkops-mcp/authoring-loki-alerting-and-recording-rules"><img src="https://agentmods.dev/badge/skills/talkops-ai/talkops-mcp/authoring-loki-alerting-and-recording-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00178 | $0.01672 |
| Opus 5.5 | $0.00071 | $0.00669 |
| Sonnet 5.5 | $0.00036 | $0.00334 |
| Haiku 4.5 | $0.00018 | $0.00167 |
Grade A, and why
authoring-loki-alerting-and-recording-rules scanned grade A with 0 findings 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 11d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Authoring Loki Alerting and Recording Rules
Use this skill to author noise-free Grafana Loki alerting rules and cardinality-safe recording rules, backtest their LogQL expressions over live historical logs, validate YAML locally, and deploy via Loki Ruler or Kubernetes Loki Operator with strict 2-phase dry_run safety gates.
Golden Hygiene Rules (references/log-alerting-patterns.md & references/loki-ruler-and-crd-spec.md)
- Always Set
for:(>= 2m–5m) & Annotations on Alerts: Includefor: 5m,severity+service_namelabels, andsummary,description, andrunbook_urlannotations. Never define bothalertandrecordon the same rule! - Protect Error Ratios Against Divide-by-Zero + Minimum Volume Floor: Note that
clamp_min()is a PromQL-only function and is rejected with HTTP 400 in Loki LogQL! Filter the denominator with> 0(... / (sum by (...) (rate(...[5m])) > 0) > 0.05) AND require a minimum event count (and sum by (...) (count_over_time(...[5m])) >= 25) so 1 failed probe or idle traffic never pages on-call or divides by zero. - Strict
level:metric:operationsColon Naming on Recording Rules: e.g.,namespace_service_route:loki_http_errors:rate5mandnamespace_service_route:loki_http_duration_ms:p99_5m(always append| __error__=""after| unwrap). - Forbid High-Cardinality Grouping in
by (...): Only aggregateby (namespace, service_name, route, status_class)—never group Ruler rulesby (session_id, trace_id, user_id, order_id, pod_ip, client_ip)which explodes remote-write Prometheus TSDB series. - Tune Group
interval(>= 1m): Avoidinterval: 15son[30m]range queries which overloads queriers and hitsmaximum of series (500)limits.
Step-by-Step Workflow
Step 1: Inspect Capabilities, References, Ruler Groups & Operator CRDs
- Read
loki://server/capabilitiesfirst to checkallow_write(ifallow_write: false, perform read-only backtesting + localvalidate_loki_rules.pyvalidation and output a copy-pasteable GitOps YAML manifest without calling write tools!). Also readcommands/setup-monitoring.mdwhen invoked via/setup-monitoring. - Read references/log-alerting-patterns.md when designing alerting/recording LogQL expressions and references/loki-ruler-and-crd-spec.md when rendering Ruler YAML or
AlertingRule/RecordingRuleCRDs. - Read
loki://rules/groupsbefore creating, updating, or deleting Ruler groups. - When working with Kubernetes Loki Operator CRDs (
loki.grafana.com/v1), inspectloki://operator/crs/{namespace}andloki://operator/manifests/{kind}/{namespace}/{name}(substituting{kind},{namespace}, and{name}) via MCP resources rather than rawkubectlso existingspec.tenantID, labels, and sibling rules are preserved!
What ships with it
3 files 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.
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.
- 11d ago First seen · 57 lines · 178 tokens per session scan A eb14580b8ed4
authoring-loki-alerting-and-recording-rules is a skill published in the GitHub repository talkops-ai/talkops-mcp (4 stars, last pushed 12d ago), licensed Apache-2.0. It adds 178 tokens to every session and 1,672 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-18.
authoring-loki-alerting-and-recording-rules compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| authoring-loki-alerting-and-recording-rulestalkops-ai/talkops-mcp | Skill | 4 | 12d ago | Apache-2.0 | A | 178 | Claude Code, Codex |
| agentcore-investigationawslabs/mcp | Skill | 10.0k | 2d ago | Apache-2.0 | A | 52 | Claude Code, Codex |
| auditing-terraform-infrastructure-for-securityxalgorix/xalgorix | Skill | 1.5k | yesterday | Apache-2.0 | A | 59 | Claude Code, Codex |
| gcp-triagenirholas/three.ws | Skill | 287 | yesterday | Apache-2.0 | A | 93 | Claude Code |
| ssh-incidentbvisible/mcp-ssh-manager | Skill | 554 | yesterday | MIT | A | 46 | Claude Code, Codex |
| deploy-runbooknirholas/three.ws | Skill | 287 | yesterday | Apache-2.0 | A | 38 | Claude Code |
| huawei-cloud-waf-aad-rule-managementhuaweicloud/huaweicloud-devkit | Skill | 71 | today | Apache-2.0 | A | 338 | Claude Code |