Log Analyzer logo

Log Analyzer

Community
zrt-ai-lab
log-analyzer

全维度日志分析技能。自动识别日志类型(Java应用/MySQL Binlog/Nginx/Trace/告警),提取关键实体(IP、thread_id、trace_id、用户、表名等),进行根因定位、告警分析、异常洞察。支持100M+大文件。触发词:分析日志、日志排查、根因定位、告警分析、异常分析。

Overview

Publisherzrt-ai-lab
Repositoryopencode-skills
Skill namelog-analyzer
Stars
293
Forks
75
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by zrt-ai-lab on GitHub. Read the source before you install it.

Installation

Install the Log Analyzer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/zrt-ai-lab/opencode-skills/tree/main/log-analyzer
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zrt-ai-lab/opencode-skills.git /tmp/opencode-skills
mkdir -p .claude/skills
cp -r /tmp/opencode-skills/log-analyzer .claude/skills/log-analyzer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Log Analyzer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Log Analyzer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Log Analyzer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

日志分析器

基于 RAPHL(Recursive Analysis Pattern for Hierarchical Logs)的全维度智能日志分析技能。流式处理,内存占用低,100M+ 日志秒级分析。

核心能力

能力说明
自动识别自动识别日志类型:Java App / MySQL Binlog / Nginx / Trace / Alert
实体提取IP、thread_id、trace_id、user_id、session_id、bucket、URL、表名等 20+ 种
操作分析DELETE/UPDATE/INSERT/DROP 等敏感操作检测
关联分析时间线、因果链、操作链构建
智能洞察自动生成分析结论、证据、建议

支持的日志类型

类型识别特征提取内容
Java AppERROR/WARN + 堆栈异常类型、堆栈、logger、时间
MySQL Binlogserver id、GTID、Table_map表操作、thread_id、server_id、数据变更
Nginx AccessIP + HTTP 方法 + 状态码请求IP、URL、状态码、耗时
Tracetrace_id、span_id链路追踪、调用关系、耗时
AlertCRITICAL/告警告警级别、来源、消息
General通用时间、IP、关键词

使用方法

bash
python .opencode/skills/log-analyzer/scripts/preprocess.py <日志文件> -o ./log_analysis

输出文件

文件内容用途
summary.md完整分析报告优先阅读
entities.md实体详情(IP、用户、表名等)追溯操作来源
operations.md操作详情查看具体操作
insights.md智能洞察问题定位和建议
analysis.json结构化数据程序处理

实体提取清单

网络/连接类

  • IP 地址、IP:Port、URL、MAC 地址

追踪/会话类

  • trace_id、span_id、request_id、session_id、thread_id

用户/权限类

  • user_id、ak(access_key)、bucket

数据库类

  • database.table、server_id

性能/状态类

  • duration(耗时)、http_status、error_code

敏感操作检测

类型检测模式风险级别
数据删除DELETE, DROP, TRUNCATEHIGH
数据修改UPDATE, ALTER, MODIFYMEDIUM
权限变更GRANT, REVOKE, chmodHIGH
认证操作LOGIN, LOGOUT, AUTHMEDIUM

智能洞察类型

类型说明
security大批量删除/修改、权限变更
anomaly高频 IP、异常时间段操作
error严重异常、错误聚类
audit操作来源、用户行为

分析流程

Phase 1: 日志类型识别(采样前100行)
    ↓
Phase 2: 全量扫描提取(流式处理)
    ↓
Phase 3: 关联分析(时间排序、聚合统计)
    ↓
Phase 4: 智能洞察(异常检测、生成结论)
    ↓
Phase 5: 生成报告(Markdown + JSON)

技术特点

特点说明
流式处理逐行读取,100M 文件只占几 MB 内存
正则预编译20+ 种实体模式预编译,匹配快
一次遍历提取 + 统计 + 分类一次完成
类型适配不同日志类型用专用解析器

注意事项

  1. Binlog 不记录客户端 IP:只有 server_id 和 thread_id,需结合 general_log 确认操作者
  2. 敏感信息脱敏:报告中注意不要暴露密码、密钥
  3. 结合多源日志:binlog + 应用日志 + 审计日志 才能完整还原

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Log Analyzer AI skill do?

全维度日志分析技能。自动识别日志类型(Java应用/MySQL Binlog/Nginx/Trace/告警),提取关键实体(IP、thread_id、trace_id、用户、表名等),进行根因定位、告警分析、异常洞察。支持100M+大文件。触发词:分析日志、日志排查、根因定位、告警分析、异常分析。

Why use Log Analyzer on TypingMind?

Because you install it once and use it with any model. Log Analyzer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Log Analyzer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/zrt-ai-lab/opencode-skills/tree/main/log-analyzer. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Log Analyzer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Log Analyzer?

As many as you like. As long as a model supports skills, you can use Log Analyzer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Log Analyzer AI skill free?

It is published on GitHub by zrt-ai-lab. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇