log-fix

A command that reads logs from Docker containers, installers, APIs, and service health checks to find errors and their likely causes. It can apply fixes interactively after the user approves them.

In plain words
What is it for?
Use it to investigate failed installations, broken Docker services, API problems, and health-check failures, then work through fixes based on the available logs.
Why use it?
It reduces the time spent searching through logs and connecting error messages to the underlying problem. Filters help focus on a time range, severity, service, or log source.

Command for Claude Code

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 commands/osmantic/ods/log-fix
Clone the repo
git clone --depth 1 https://github.com/Osmantic/ODS

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,995 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.00000 $0.03995
Opus 5 $0.00000 $0.01997
Sonnet 5 $0.00000 $0.00799
Haiku 4.5 $0.00000 $0.00400

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

Security

Grade A, and why

log-fix 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 2d 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.

curl -sf http://127.0.0.1:8080/health && echo "LLM server: HEALTHY" || echo "LLM server: UNREACHABLE"
.claude/commands/log-fix.md · 489 lines

How it starts

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

Log-Fix: Iterative Bug Fixing from Log Analysis

Analyze logs from Docker containers, installer runs, and service health checks. Identify errors, perform root cause analysis, and interactively fix issues with user approval.

"Logs tell stories. This skill reads them and writes the fixes."

Arguments

  • $ARGUMENTS - Optional filters and configuration:
    • --time <duration> - Time range: 1h, 30m, 1d, 7d (default: 1h)
    • --source <source> - Log source: docker, installer, api, all (default: all)
    • --level <level> - Minimum severity: ERROR, WARNING, all (default: ERROR)
    • --service <name> - Filter by service name (e.g., ods-llama-server, ods-open-webui, ods-dashboard)

Phase 0: Log Source Discovery

Detect all available log sources before analysis.

0.1 Check Docker Compose Logs

# Find the resolved compose stack
COMPOSE_FILES=""
if [ -f "ods/docker-compose.base.yml" ]; then
  COMPOSE_FILES="-f ods/docker-compose.base.yml"
  for overlay in ods/docker-compose.{amd,nvidia,apple}.yml; do
    [ -f "$overlay" ] && COMPOSE_FILES="$COMPOSE_FILES -f $overlay"
  done
fi

# Check running containers
if [ -n "$COMPOSE_FILES" ]; then
  docker compose $COMPOSE_FILES ps --format "table {{.Name}}\t{{.Status}}" || echo "Docker not running"
else
  echo "No compose files found"
fi

0.2 Check Installer Logs

INSTALL_LOG="$HOME/.ods/install.log"
if [ -f "$INSTALL_LOG" ]; then
  INSTALL_SIZE=$(du -h "$INSTALL_LOG" | cut -f1)
  INSTALL_LINES=$(wc -l < "$INSTALL_LOG")
  echo "Installer log: $INSTALL_LOG ($INSTALL_SIZE, $INSTALL_LINES lines)"
else
  echo "Installer log: NOT FOUND at $INSTALL_LOG"
fi

0.3 Check Service Health Endpoints

# LLM server health
curl -sf http://127.0.0.1:8080/health && echo "LLM server: HEALTHY" || echo "LLM server: UNREACHABLE"

# Dashboard API health
curl -sf http://127.0.0.1:3001/health && echo "Dashboard API: HEALTHY" || echo "Dashboard API: UNREACHABLE"

# Open WebUI
curl -sf http://127.0.0.1:3000 && echo "Open WebUI: HEALTHY" || echo "Open WebUI: UNREACHABLE"

Read the full file on GitHub · 489 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. 2d ago First seen · 489 lines · 0 tokens per session scan A a04d14e12dc2

Subscribe to this mod's changes

log-fix is a command published in the GitHub repository Osmantic/ODS (5,819 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,995 tokens. 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-30.