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 15 Sept 2026
  • Snyk pass 15 Sept 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.5 $0.00012 $0.01917
Sonnet 5.5 $0.00006 $0.00959
Haiku 4.5 $0.00003 $0.00479

Measured 2mo ago against content hash 9adc7ec99977, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 (332 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 30 tokens to every session and 4,793 once invoked, about $0.0001 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-08-30.

Related

loki-config-generator compared with skills from other repositories

loki-config-generator next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
loki-config-generatorakin-ozer/cc-devops-skillsSkill3323mo agoApache-2.0A30Claude Code
gke-compute-classesgoogle/skillsSkill22kyesterdayApache-2.0A83Claude Code, Codex
gke-reliabilitygoogle/skillsSkill22kyesterdayApache-2.0A85Claude Code, Codex
gke-workload-securitygoogle/skillsSkill22kyesterdayApache-2.0A171Claude Code, Codex
cloud-architectJeffallan/claude-skillsSkill12k7d agoMITA71Claude Code
nemo-automodel-launcher-configNVIDIA/skillsSkill3.9kyesterdayApache-2.0A30Claude Code
azure-mgmt-botservice-dotnetmicrosoft/skillsSkill3.2kyesterdayMITA78Claude Code