log-diagnostic

log-diagnostic is a skill for Claude Code, Codex from serejaris/kimi-skills. It costs 88 tokens per session (1,159 once invoked), scanned A, original, MIT.

A log-analysis tool that detects JSON, syslog, and Nginx formats and reports grouped errors, occurrence counts, severity levels, and time distribution. It can filter entries by level or time range and export JSON.

In plain words
What is it for?
Use it to investigate application and server failures, focus on a selected period or error level, find frequent error patterns, and create a machine-readable report.
Why use it?
It makes large or noisy logs easier to inspect by showing which errors repeat and when they happen most often.

Skill for Claude CodeCodex

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

Good fit Use it to investigate application and server failures, focus on a selected period or error level, find frequent error patterns, and create a machine-readable report.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/serejaris/kimi-skills/log-diagnostic"><img src="https://agentmods.dev/badge/skills/serejaris/kimi-skills/log-diagnostic.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,159 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.
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.00088 $0.01159
Opus 5 $0.00044 $0.00580
Sonnet 5 $0.00018 $0.00232
Haiku 4.5 $0.00009 $0.00116

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

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/analyze_logs.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.

skills/log-diagnostic/SKILL.md · 101 lines

How it starts

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

Log Analyzer

对日志文件进行自动化分析,提供错误聚类、频率统计和时间分布报告。

功能

  • 错误聚类:将相似的错误消息归类,消除噪声(IP、UUID、数字等动态部分),识别根本问题
  • 频率统计:按错误类型统计出现次数,按严重程度排序
  • 时间分布:展示错误在各小时和各日期的分布,帮助定位高发时段

支持的日志格式

格式 说明 自动检测
JSON 每行一个 JSON 对象,含 timestamp/level/message 等字段 { 开头
syslog RFC 3164 格式,如 Jan 1 12:00:00 host proc[pid]: msg 月份名开头
Nginx access log 或 error log 格式 IP 开头或日期路径格式

使用方式

python scripts/analyze_logs.py <日志文件路径> [选项]

参数

参数 说明 默认值
log_file 日志文件路径(必填) -
--format 指定日志格式:auto/json/syslog/nginx auto
--top 显示 Top N 错误聚类 20
--output 输出结果到 JSON 文件 仅终端输出
--level 过滤日志级别(如 ERRORWARN 所有级别
--since 只分析此时间之后的日志(ISO 格式) 不限
--until 只分析此时间之前的日志(ISO 格式) 不限

示例

# 自动检测格式,分析整个日志文件
python scripts/analyze_logs.py /var/log/app.log

# 指定 Nginx 格式,只看 Top 10 错误
python scripts/analyze_logs.py /var/log/nginx/error.log --format nginx --top 10

# 只分析 ERROR 级别,输出 JSON 报告
python scripts/analyze_logs.py app.log --level ERROR --output report.json

# 分析指定时间范围内的日志
python scripts/analyze_logs.py app.log --since 2024-01-01T00:00:00 --until 2024-01-02T00:00:00

输出说明

终端输出

=======================================================
              日志分析报告
=======================================================

📊 概览
  检测格式: json
  总行数:   15,234
  已解析:   15,100 (解析失败: 134)
  匹配条目: 12,800
  错误数:   2,341
  时间范围: 2024-01-01 00:03:12 ~ 2024-01-01 23:58:45

🔴 Top 错误聚类 (共 47 类)
  #1   [×523  ] Connection refused to database at 10.0.1.5:5432
       首次: 2024-01-01T00:15:30  末次: 2024-01-01T23:45:12
  #2   [×312  ] Timeout waiting for response from user-service after 30000ms
       首次: 2024-01-01T02:10:00  末次: 2024-01-01T22:30:45
  #3   [×198  ] File not found: /data/uploads/img_99421.png
       首次: 2024-01-01T08:00:00  末次: 2024-01-01T20:15:33
  ...

⏰ 时间分布 (按小时)
  00:00  █████░░░░░░░░░░░░░░░  42
  01:00  ██░░░░░░░░░░░░░░░░░░  18
  ...
  14:00  ████████████████████  523
  ...

📅 时间分布 (按日期)
  2024-01-01  ████████████████████  2,341

Read the full file on GitHub · 101 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 101 lines · 88 tokens per session scan A af6a91923271

Subscribe to this mod's changes

log-diagnostic is a skill published in the GitHub repository serejaris/kimi-skills (6 stars, last pushed 1mo ago), licensed MIT. It adds 88 tokens to every session and 1,159 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

Error Log Summarizer

Parses raw error logs and produces a concise, prioritized summary of unique issues with root cause hints.

Notysoty/openagentskills · 26 tokens

log-analysis

A guide to reading and searching system and application logs. Logs are text records that describe what software and servers are doing.

chaterm/terminal-skills · 7 tokens

investigate

Systematically investigate bugs, test failures, build errors, performance issues, or unexpected behavior by cycling through characterize-isolate-hypothesize-test steps. Use when the user asks to "investigate this bug", "debug this", "figure out why this fails", "find the root cause", "why is this broken"…

tobihagemann/turbo · 107 tokens

audit

Project-wide health audit pipeline that fans out to all analysis skills in parallel, evaluates findings, and produces a unified report at .turbo/audit.md. Use when the user asks to "audit the project", "run a full audit", "project health check", "audit my code", "codebase audit", or "comprehensive review".

tobihagemann/turbo · 71 tokens

consult-oracle

Consult ChatGPT Pro via ChatGPT browser automation for problems that resist standard approaches. Use when stuck on a very hard problem, when standard approaches have failed, when multiple debugging attempts haven't worked, or when the user says "ask the oracle", "consult oracle", "consult chatgpt", "I'm completely…

tobihagemann/turbo · 78 tokens