Agent skill

Log Diagnostic

by rongxinzy in rongxinzy/RongxinAI

分析日志文件的错误模式,支持JSON、syslog、Nginx等常见格式,自动检测并输出错误聚类、频率统计和时间分布报告,用于排查问题、定位高发时段。当用户上传.log文件并要求排查错误、分析错误分布、定位高发时段,或提及错误统计、日志分析等关键词时触发。

MITAuto-check passedDevOps & Cloud

Install Log Diagnostic

skills CLI
$ npx skills add rongxinzy/RongxinAI --skill log-diagnostic -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rongxinzy/RongxinAI log-diagnostic --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rongxinzy/RongxinAI.git skills-src && mkdir -p .claude/skills && cp -r skills-src/SKILLs/log-diagnostic .claude/skills/log-diagnostic && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
log-diagnostic
GitHub stars
154
Token cost
~615 tokens
SKILL.md length
82 words
Files
5 (incl. scripts)
Skills in repo
94
Repo updated
First seen
Licence
MIT

At a glance

分析日志文件的错误模式,支持JSON、syslog、Nginx等常见格式,自动检测并输出错误聚类、频率统计和时间分布报告,用于排查问题、定位高发时段。当用户上传.log文件并要求排查错误、分析错误分布、定位高发时段,或提及错误统计、日志分析等关键词时触发。

  • Tasks that involve Cloud networking
  • SKILL.md covers 功能, 支持的日志格式, 使用方式 and 输出说明
  • Runs Python scripts from its folder; calls python

What it does

Log Diagnostic is an agent skill from rongxinzy/RongxinAI. 分析日志文件的错误模式,支持JSON、syslog、Nginx等常见格式,自动检测并输出错误聚类、频率统计和时间分布报告,用于排查问题、定位高发时段。当用户上传.log文件并要求排查错误、分析错误分布、定位高发时段,或提及错误统计、日志分析等关键词时触发。

Its SKILL.md is about 620 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts (for example `scripts/analyze_logs.py` and `zhiyuan/metadata.yaml`).

It sits in DevOps & Cloud, covering Cloud networking. It works with NGINX. The repository describes itself as: An all-in-one local AI Agent workspace with a fully self-developed stack. The licence is MIT.

When your agent uses it

  • Tasks that involve Cloud networking

Example prompts

  • “/log-diagnostic”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 9c64865. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Log Diagnostic loads about 615 tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 82 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~615

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from rongxinzy/RongxinAI at commit 9c64865, republished under its MIT licence (© rongxinzy). 82 words, ~615 tokens.

Download SKILL.mdSave it as .claude/skills/log-diagnostic/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
log-diagnostic
description
分析日志文件的错误模式,支持JSON、syslog、Nginx等常见格式,自动检测并输出错误聚类、频率统计和时间分布报告,用于排查问题、定位高发时段。当用户上传.log文件并要求排查错误、分析错误分布、定位高发时段,或提及错误统计、日志分析等关键词时触发。
license
MIT
metadata.type
tool
metadata.tags
logs, analysis, devops, monitoring

Log Analyzer

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

功能

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

支持的日志格式

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

使用方式

bash
python scripts/analyze_logs.py <日志文件路径> [选项]
参数
参数说明默认值
log_file日志文件路径(必填)-
--format指定日志格式:auto/json/syslog/nginxauto
--top显示 Top N 错误聚类20
--output输出结果到 JSON 文件仅终端输出
--level过滤日志级别(如 ERROR、WARN)所有级别
--since只分析此时间之后的日志(ISO 格式)不限
--until只分析此时间之前的日志(ISO 格式)不限
示例
bash
# 自动检测格式,分析整个日志文件
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
JSON 输出

使用 --output 参数可导出结构化 JSON 报告,方便后续处理或接入监控系统。

© rongxinzy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts) in SKILLs/log-diagnostic of rongxinzy/RongxinAI.

  • SKILL.md
  • LICENSE
  • scripts/analyze_logs.py
  • zhiyuan/icon.png
  • zhiyuan/metadata.yaml

Open the folder on GitHubat commit 9c64865

Compare with similar skills

Log Diagnostic next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Log Diagnostic compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Log Diagnostic this skillrongxinzy/RongxinAI154—~615Automated safety check: PassMIT
Nginx To Higress Migrationhigress-group/higress9.5k—~3.9kAutomated safety check: PassApache-2.0
NGINX Ingress Controller Feature Checklistsnginx/kubernetes-ingress5.1k—~1.4kAutomated safety check: PassApache-2.0
NGINX Ingress Policy CRD Guidenginx/kubernetes-ingress5.1k—~2kAutomated safety check: PassApache-2.0
KubeSphere Gateway Managementkubesphere/kubesphere17k—~2.9kAutomated safety check: PassCustom licence
Wp Static Clonejdevalk/skills105—~2.6kAutomated safety check: PassMIT

Similar skills

  • Nginx To Higress Migration

    higress-group/higress

    Migrate from ingress-nginx to Higress in Kubernetes environments.

    9.5k GitHub stars~3.9k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Gives step-by-step checklists for adding Ingress annotations, VirtualServer fields and Helm values to the NGINX Kubernetes Ingress Controller, with common gotchas.

    5.1k GitHub stars~1.4k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • NGINX Ingress Policy CRD Guide

    nginx/kubernetes-ingress

    Step-by-step checklist for adding a new Policy CRD type to the NGINX Ingress Controller, from the Go types and validation to config generation and templates.

    5.1k GitHub stars~2k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • KubeSphere Gateway Management

    kubesphere/kubesphere

    Installs, uninstalls, checks and troubleshoots the KubeSphere Gateway extension built on ingress-nginx, including gateways stuck in bad states and Helm or pod failures.

    17k GitHub stars~2.9k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check passed
  • Wp Static Clone

    jdevalk/skills

    Clones a live WordPress (or other CMS-driven) site into a static HTML site deployable on any static host (Cloudflare Pages, Netlify, Vercel, S3+CloudFront, plain Apache/nginx).

    105 GitHub stars~2.6k tokensUpdated 3 mo ago
    DevOps & CloudAuto-check passed
  • Log Error Digest

    zebbern/claude-code-guide

    Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports.

    4.7k GitHub stars~923 tokensUpdated yesterday
    DevOps & CloudAuto-check passed

More from rongxinzy/RongxinAI

All 94 skills in this repo
  • SaaS Metrics Coach

    rongxinzy/RongxinAI

    SaaS financial health advisor. An agent skill from rongxinzy/RongxinAI.

    154 GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check passed
  • Churn Prevention

    rongxinzy/RongxinAI

    Reduce voluntary and involuntary churn through cancel flow design, save offers, exit surveys, and dunning sequences.

    154 GitHub starsUsed in 3 repos~2.6k tokens
    Auto-check passed
  • Presentation Studio

    rongxinzy/RongxinAI

    The only skill for creating a new PowerPoint deck. An agent skill from rongxinzy/RongxinAI.

    154 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Zhiyuan Expert Manager

    rongxinzy/RongxinAI

    ZhiYuan Agent expert package lifecycle manager for the pi engine.

    154 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Ziwei Doushu

    rongxinzy/RongxinAI

    Professional Ziwei Doushu consultation skill with an offline calculation engine.

    154 GitHub stars~746 tokensUpdated today
    Auto-check passed
  • Lark Mail

    rongxinzy/RongxinAI

    飞书邮箱:Use when user mentions 起草邮件、写邮件、草稿、发送/回复/转发邮件、查阅邮件、看邮件、搜索邮件、邮件文件夹、邮件标签、邮件联系人、监听新邮件、邮件收信规则等;use for mail/email intent only.

    154 GitHub starsUsed in 3 repos~4.1k tokens
    Auto-check: warnings

Works with

Categories

Questions about Log Diagnostic

What does Log Diagnostic do?

分析日志文件的错误模式,支持JSON、syslog、Nginx等常见格式,自动检测并输出错误聚类、频率统计和时间分布报告,用于排查问题、定位高发时段。当用户上传.log文件并要求排查错误、分析错误分布、定位高发时段,或提及错误统计、日志分析等关键词时触发。. Log Diagnostic is an agent skill from rongxinzy/RongxinAI.

When should I use Log Diagnostic?

Log Diagnostic fits situations like: tasks that involve Cloud networking.

How do I install Log Diagnostic in Claude Code?

Run `npx skills add rongxinzy/RongxinAI --skill log-diagnostic -a claude-code`. Or copy the skill folder (SKILLs/log-diagnostic in rongxinzy/RongxinAI) into .claude/skills/log-diagnostic in your project. Claude Code loads it when a task matches its description.

How do I install Log Diagnostic in Codex?

Run `npx skills add rongxinzy/RongxinAI --skill log-diagnostic -a codex`. Or copy the skill folder (SKILLs/log-diagnostic in rongxinzy/RongxinAI) into .agents/skills/log-diagnostic in your project. Codex loads it when a task matches its description.

Can I use Log Diagnostic in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rongxinzy/RongxinAI --skill log-diagnostic -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/log-diagnostic, .gemini/skills/log-diagnostic, .github/skills/log-diagnostic and .opencode/skills/log-diagnostic in your project.

What does Log Diagnostic need to run?

Going by SKILL.md and its folder, Log Diagnostic needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Log Diagnostic access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Log Diagnostic safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Log Diagnostic use?

Log Diagnostic is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Log Diagnostic use?

About 615 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Log Diagnostic?

Skills that share tags, products or a category with Log Diagnostic: Nginx To Higress Migration (higress-group/higress, 9.5k stars), NGINX Ingress Controller Feature Checklists (nginx/kubernetes-ingress, 5.1k stars), NGINX Ingress Policy CRD Guide (nginx/kubernetes-ingress, 5.1k stars) and KubeSphere Gateway Management (kubesphere/kubesphere, 17k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Log Diagnostic?

rongxinzy (a GitHub organization) maintains it in rongxinzy/RongxinAI, which has 154 GitHub stars. The repository holds 94 skills in this directory. The repository was last updated on October 10, 2026.

Source: rongxinzy/RongxinAI on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.