loki-config-generator

loki-config-generator is a skill for Claude Code from akin-ozer/cc-devops-skills. It costs 30 tokens per session (4,793 once invoked), scanned A, original, Apache-2.0.

A guide and generator for Grafana Loki configuration files. Loki is a system for collecting and searching application logs, and the configurations can describe its components, deployment style, and storage.

In plain words
What is it for?
It is for creating configurations for Loki components such as ingesters, queriers, compactors, and rulers, using storage such as S3, GCS, Azure, or local files.
Why use it?
It reduces the manual work and configuration mistakes involved in setting up Loki or changing how it stores and processes logs.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the devops-skills-plugin plugin — 31 skills shipped together

Good fit It is for creating configurations for Loki components such as ingesters, queriers, compactors, and rulers, using storage such as S3, GCS, Azure, or local files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/akin-ozer/cc-devops-skills/loki-config-generator
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.

Any agent
npx skills add akin-ozer/cc-devops-skills --skill loki-config-generator
Clone the repo
git clone --depth 1 https://github.com/akin-ozer/cc-devops-skills

Made for: Claude Code.

Or install devops-skills-plugin, the plugin that ships this one along with the rest of its 31 skills.

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 loki-config-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/akin-ozer/cc-devops-skills/loki-config-generator/github.svg)](https://agentmods.dev/skills/akin-ozer/cc-devops-skills/loki-config-generator)
Your own site
<a href="https://agentmods.dev/skills/akin-ozer/cc-devops-skills/loki-config-generator"><img src="https://agentmods.dev/badge/skills/akin-ozer/cc-devops-skills/loki-config-generator/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.

agentmods 80×15 button for loki-config-generator

Your own site · 80×15
<a href="https://agentmods.dev/skills/akin-ozer/cc-devops-skills/loki-config-generator"><img src="https://agentmods.dev/badge/skills/akin-ozer/cc-devops-skills/loki-config-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,793 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 28 Mar 2026
  • Snyk warn 28 Mar 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 321
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
  • low Tool Misuse · line 321
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.1 $0.00030 $0.04793
Opus 5 $0.00015 $0.02397
Sonnet 5 $0.00006 $0.00959
Haiku 4.5 $0.00003 $0.00479

Measured 10d ago against content hash 9adc7ec99977, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

loki-config-generator 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 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/generate_config.py, scripts/test_generate_config.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

devops-skills-plugin/skills/loki-config-generator/SKILL.md · 692 lines

How it starts

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

Loki Configuration Generator

Overview

Generate production-ready Grafana Loki server configurations with best practices. Supports monolithic, simple scalable, and microservices deployment modes with S3, GCS, Azure, or filesystem storage.

Current Stable: Loki 3.6.2 (November 2025) Important: Promtail deprecated in 3.4 - use Grafana Alloy instead. See examples/grafana-alloy.alloy for the Alloy pipeline and examples/grafana-alloy-daemonset.yaml for the Kubernetes deployment.

When to Use

Invoke when: deploying Loki, creating configs from scratch, migrating to Loki, implementing multi-tenant logging, configuring storage backends, or optimizing existing deployments.


Generation Methods

Method 1: Script Generation (Recommended)

Use scripts/generate_config.py for consistent, validated configurations:

# Simple Scalable with S3 (production)
python3 scripts/generate_config.py \
  --mode simple-scalable \
  --storage s3 \
  --bucket my-loki-bucket \
  --region us-east-1 \
  --retention-days 30 \
  --otlp-enabled \
  --output loki-config.yaml

# Monolithic with filesystem (development)
python3 scripts/generate_config.py \
  --mode monolithic \
  --storage filesystem \
  --no-auth-enabled \
  --output loki-dev.yaml

# Production with Thanos storage (Loki 3.4+)
python3 scripts/generate_config.py \
  --mode simple-scalable \
  --storage s3 \
  --thanos-storage \
  --otlp-enabled \
  --time-sharding \
  --output loki-thanos.yaml

Script Options:

Option Description
--mode monolithic, simple-scalable, microservices
--storage filesystem, s3, gcs, azure
--auth-enabled / --no-auth-enabled Explicitly enable/disable auth
--otlp-enabled Enable OTLP ingestion configuration
--thanos-storage Use Thanos object storage client (3.4+, cloud backends)
--time-sharding Enable out-of-order ingestion (simple-scalable)
--ruler Enable alerting/recording rules (not monolithic)
--horizontal-compactor main/worker mode (simple-scalable, 3.6+)
--zone-awareness Enable multi-AZ placement safeguards
--limits-dry-run Log limit rejections without enforcing

Read the full file on GitHub · 692 lines

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. 10d ago First seen · 692 lines · 30 tokens per session scan A 9adc7ec99977

Subscribe to this mod's changes

loki-config-generator is a skill published in the GitHub repository akin-ozer/cc-devops-skills (307 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 30 tokens to every session and 4,793 once invoked, about $0.0002 per session on Opus 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-08-30.

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

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

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

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

cloud-architect

Designs cloud architectures, creates migration plans, generates cost optimization recommendations, and produces disaster recovery strategies across AWS, Azure, and GCP. Use when designing cloud architectures, planning migrations, or optimizing multi-cloud deployments. Invoke for Well-Architected Framework, cost…

Jeffallan/claude-skills · 71 tokens