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 optimizing-loki-cardinality-and-finopsgit 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/optimizing-loki-cardinality-and-finops)<a href="https://agentmods.dev/skills/talkops-ai/talkops-mcp/optimizing-loki-cardinality-and-finops"><img src="https://agentmods.dev/badge/skills/talkops-ai/talkops-mcp/optimizing-loki-cardinality-and-finops/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/optimizing-loki-cardinality-and-finops"><img src="https://agentmods.dev/badge/skills/talkops-ai/talkops-mcp/optimizing-loki-cardinality-and-finops.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.00186 | $0.01606 |
| Opus 5.5 | $0.00074 | $0.00642 |
| Sonnet 5.5 | $0.00037 | $0.00321 |
| Haiku 4.5 | $0.00019 | $0.00161 |
Grade A, and why
optimizing-loki-cardinality-and-finops 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.
Optimizing Loki Cardinality and FinOps
Use this skill to perform a rigorous Grafana Loki 3.x FinOps and stream-cardinality audit—identifying noisy workloads, diagnosing tiny-chunk S3 API spikes, enforcing strict label governance, and designing TSDB v13 + structured_metadata + Bloom filter architectures.
Golden Rules of Loki 3.x Label & Storage FinOps
Consult references/label-governance-and-cardinality.md and references/bloom-filters-and-tsdb-finops.md:
- Stream Labels Index Streams, Never Log Fields:
- Keep
<= 10bounded labels in{}(cluster,namespace,service_name,env) and< 100,000active streams per tenant. - Unconditionally Forbidden in
{}(even if staging count< 500!):pod,k8s_pod_name,container_id,trace_id,span_id,request_id,order_id,session_id,user_id,client_ip,pod_ip,uuid—demote them to Loki 3.xstructured_metadata!
- Keep
- Tiny-Chunk Syndrome (
< 256 KBvs1.5 MBchunk_target_size):- High stream churn causes ingesters to flush thousands of tiny
< 6 KBchunks, spiking S3PUT/GETAPI costs10x–50xeven when daily GB stays flat. Fix by demoting ephemeral labels tostructured_metadata.
- High stream churn causes ingesters to flush thousands of tiny
- TSDB
v13Migrations & Bloom Filters:- Migrate from legacy
boltdb-shipper(v11) by appending a future-datedfrom:entry (store: tsdb,schema: v13,period: 24h)—never modify historicalschema_configentries (which makes older logs unreadable). TSDBv13cutsindex-gatewayRAM by~70%. - For needle-in-a-haystack queries (
order_id,trace_id,request_id, or SKU/entity IDs) scanning> 10 GB, keep IDs instructured_metadataand enable Loki 3.x Bloom filters (bloom_build.enabled: true,bloom_gateway.enabled: true,limits_config.bloom_gateway_enable_filtering: true,bloom_creation_enabled: true) to skip95%+of chunks without indexing unbounded labels.
- Migrate from legacy
- Collection-Edge Noise Dropping:
- Drop HTTP
200kube-probe//healthzchecks andDEBUGlogs at the collector edge (stage.dropin Grafana Alloy /filterin OTel Collector), always preserving>= 400probe failures so failed readiness/liveness probes remain visible!
- Drop HTTP
- Dashboard & Ruler Migration Impact:
- Before dropping
podfrom{}viastage.label_drop, auditloki://rules/groupsand Grafana variables so{service_name="x", pod="y"}selectors (which would return0streams) are migrated atomically to{service_name="x"} | pod="y".
- Before dropping
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 · 186 tokens per session scan A 7807ac26e768
optimizing-loki-cardinality-and-finops is a skill published in the GitHub repository talkops-ai/talkops-mcp (4 stars, last pushed 12d ago), licensed Apache-2.0. It adds 186 tokens to every session and 1,606 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.
optimizing-loki-cardinality-and-finops compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| optimizing-loki-cardinality-and-finopstalkops-ai/talkops-mcp | Skill | 4 | 12d ago | Apache-2.0 | A | 186 | Claude Code, Codex |
| argocdalivirgo/Major-AI-Skills | Skill | 6 | yesterday | MIT | A | 42 | Claude Code |
| airdrop-hunting-guidenirholas/three.ws | Skill | 287 | yesterday | Apache-2.0 | A | 54 | Claude Code, Codex |
| opik-diagnosecomet-ml/opik-mcp | Skill | 227 | 4d ago | Apache-2.0 | A | 187 | Claude Code |
| ue-mcp-epic-routingdb-lyon/ue-mcp | Skill | 526 | today | MIT | A | 81 | Claude Code, Codex |
| qa-knowledgegriddynamics/rosetta | Skill | 382 | 5d ago | Apache-2.0 | A | 32 | Claude Code, Codex |
| x-use-reviewihuzaifashoukat/x-use | Skill | 187 | 7d ago | MIT | A | 56 | Claude Code |