log-analyzer

log-analyzer is a skill for Claude Code, Codex from moonlight-lupin/agent-skills. It costs 52 tokens per session (2,896 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 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,896 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.00052 $0.02896
Opus 5.5 $0.00021 $0.01158
Sonnet 5.5 $0.00010 $0.00579
Haiku 4.5 $0.00005 $0.00290

Measured 20d ago against content hash 80814cedda36, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 20d 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 patterns — timeout, 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. 20d ago Changed · -17 tokens per session 80814cedda36
  2. 1mo ago Changed · +49 lines · +19 tokens per session 4d8eb92d0954
  3. 1mo 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 (112 stars, last pushed 4d ago), licensed MIT. It adds 52 tokens to every session and 2,896 once invoked, about $0.0002 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

Other skills, from other repositories

loopx-self-repair

Diagnose and repair LoopX control-plane drift or agent behavior drift. Use when a LoopX task makes unexpectedly small progress, follows a stale or contradictory recommendedaction, ignores a higher-priority blocked item while doing fallback work, reports vague owner/user gates, loses todo projection, misaligns…

huangruiteng/loopx · 102 tokens

push-notification-tester

Test VoIP push notifications for Telnyx WebRTC iOS (APNs) and Android (FCM) apps. Use when debugging push notification delivery, validating certificate/credential setup, or testing that a device receives VoIP pushes correctly.

team-telnyx/ai · 55 tokens

huawei-cloud-agentarts-obs-diagnosis

Observability no-data diagnosis skill for Huawei Cloud AgentArts agent-ops platform. Systematically diagnoses missing metrics, logs, and traces/sessions in agent-ops by checking subscription metadata, data pipeline (APM/AOM/LTS), query parameters, and authentication. Generates root-cause analysis and fix…

huaweicloud/huaweicloud-skills · 145 tokens

error-handler

Design error handling, structured logging, and observability with OpenTelemetry (traces, metrics, logs), error classification, recovery patterns (retry with jitter, circuit breaker, bulkhead, timeout), error budgets/SLOs with burn rate alerts, and production incident triage. Use when user asks to implement error…

EliasOulkadi/shokunin · 125 tokens

performance-profiler

Performance profiling and optimization for web apps — Core Web Vitals (LCP, INP, CLS), Lighthouse audits, bundle analysis, backend profiling (CPU, memory, DB queries), N+1 detection, caching strategies (Redis, CDN, HTTP), and performance budgets. Use when user asks to improve performance, run Lighthouse audit, profile…

EliasOulkadi/shokunin · 118 tokens

debugging

Systematically diagnose and fix software bugs by analyzing error messages, stack traces, logs, and runtime behavior across multiple languages. Use when the user requests debugging or provides relevant inputs for this workflow.

seb1n/awesome-ai-agent-skills · 41 tokens