log-analyzer

log-analyzer is a skill for Claude Code, Codex from moonlight-lupin/agent-skills. It costs 69 tokens per session (2,914 once invoked), scanned A, original, MIT.

A tool for scanning agent and service log files, grouping repeated messages, and producing a report of unusual error patterns. Logs are records of what a program did while running.

In plain words
What is it for?
Use it to investigate agent runtimes, gateways, schedulers, and tool processes. It can scan recent logs, save results as JSON, and turn those results into Markdown reports.
Why use it?
It reveals clusters of timeouts, rate limits, tool failures, and component errors that are hard to spot by searching individual lines. It can also run quietly in scheduled checks and report only when problems appear.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to investigate agent runtimes, gateways, schedulers, and tool processes. It can scan recent logs, save results as JSON, and turn those results into Markdown reports.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/moonlight-lupin/agent-skills/log-analyzer
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 moonlight-lupin/agent-skills --skill log-analyzer
Clone the repo
git clone --depth 1 https://github.com/moonlight-lupin/agent-skills

Made for: Claude Code, Codex.

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 log-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/moonlight-lupin/agent-skills/log-analyzer/github.svg)](https://agentmods.dev/skills/moonlight-lupin/agent-skills/log-analyzer)
Your own site
<a href="https://agentmods.dev/skills/moonlight-lupin/agent-skills/log-analyzer"><img src="https://agentmods.dev/badge/skills/moonlight-lupin/agent-skills/log-analyzer/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 log-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/skills/moonlight-lupin/agent-skills/log-analyzer"><img src="https://agentmods.dev/badge/skills/moonlight-lupin/agent-skills/log-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,914 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
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00069 $0.02914
Opus 5 $0.00034 $0.01457
Sonnet 5 $0.00014 $0.00583
Haiku 4.5 $0.00007 $0.00291

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

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/analyze_logs.py, scripts/hermes_log_window.py, scripts/state_failures.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.

agent-ops/log-analyzer/SKILL.md · 278 lines

How it starts

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

Log Analyzer

Overview

Log viewers filter lines. This skill finds patterns.

Use it when an agent runtime, tool process, gateway, scheduler, or other service has produced enough log output that individual grep hits no longer explain the system behavior. The analyzer parses standard log lines, normalizes repeated messages, groups errors by component and tool, and produces a structured anomaly report that is suitable for debugging sessions or cron digests.

The script is intentionally lightweight and portable: it uses only Python's standard library and works on any text log with timestamp, level, optional component, and message fields. It also has a best-effort fallback for unstructured logs.

Quick Start

cd agent-ops/log-analyzer
python scripts/analyze_logs.py scan --log-file agent.log --since 24h

For per-tool failure rates from a Hermes profile's session DB (structured exit_code signals, NOT regex-over-content):

python scripts/state_failures.py                 # last 7 days, dashboard
python scripts/state_failures.py --days 30 --json
python scripts/state_failures.py --quiet         # cron: silent when healthy

See references/state-failure-monitor.md for provenance (adapted concept from hermes-dojo), the spike evidence for why structured signals matter, and interpretation notes.

To write JSON for later Markdown rendering:

python scripts/analyze_logs.py scan --log-file agent.log --since 24h --output scan.json
python scripts/analyze_logs.py report --scan scan.json --output report.md

For cron-compatible anomaly detection:

python scripts/analyze_logs.py scan --log-file agent.log --since 24h --quiet

--quiet exits 0 and prints nothing when no anomalies are found. If anomalies exist, it prints the JSON report so the scheduler can deliver the digest.

What It Detects

  1. Error clusters — the same normalized error message repeated 3+ times within the selected time window. URLs, IP addresses, and numbers are replaced with placeholders before grouping so repeated failures with changing IDs still cluster.
  2. Rate limit hits — HTTP 429, rate limit, rate_limit, too many requests, and quota exceeded patterns. The analyzer groups them by provider when it can detect a provider name.
  3. Timeout patternstimeout, timed out, deadline exceeded, and connection timeout. Results are grouped by detected tool name and include example URLs where present.
  4. Tool failures — error lines grouped by tool name extracted from patterns such as tool: terminal, tool_call: web_search, tool terminal failed, or lines emitted by a tools component.
  5. Session crashes — fatal errors, unhandled exceptions, stack traces, Traceback, Exception, and segfault markers. Multiline stack traces are grouped as one crash entry with nearby context.
  6. Component breakdown — error and warning counts by component such as gateway, agent, tools, cron, or unknown.
  7. Error timeline — error counts bucketed by hour to reveal spikes and regressions after deploys or scheduled jobs.

Read the full file on GitHub · 278 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 Changed · +49 lines · +19 tokens per session 4d8eb92d0954
  2. 10d ago First seen · 229 lines · 50 tokens per session scan A bd21247f52e4

Subscribe to this mod's changes

log-analyzer is a skill published in the GitHub repository moonlight-lupin/agent-skills (60 stars, last pushed 3d ago), licensed MIT. It adds 69 tokens to every session and 2,914 once invoked, about $0.0003 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.