loganalyzer
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "loganalyzer":https://skillpi.com/zh/skills/deepskill-39c2a923c59cdfa79a64870f85b17e77fbe788f2a60116a3723460f043e9625b。安装前核对上游来源和版本:https://skillhub.cn/skills/user_d34153ff/loganalyzer。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
日志分析器。解析、过滤、聚合并生成多格式日志(JSON、syslog、Apache/Nginx、纯文本)的报告;检测错误模式、突增和异常。用于分析日志文件、排查错误、生成故障或错误报告,或在用户提到日志与调试时使用。
介绍来源: third_party · user_d34153ff · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: log-analyzer
description: Parse, filter, aggregate, and report on log files in multiple formats (JSON, syslog, Apache/Nginx, plain text). Detect error patterns, spikes, and anomalies. Use when analyzing log files, troubleshooting errors, generating error reports, or when the user mentions logs, error analysis, or debugging with logs.Log Analyzer
Quick Start
Analyze any log file with the built-in engine:
python scripts/analyzer.py <log_file> [options]
Most common usage — get a summary of all errors:
python scripts/analyzer.py app.log --level ERROR --report summary
Filter by time range and keyword:
python scripts/analyzer.py app.log --from "2026-07-20 00:00:00" --search "timeout" --report detailed
Core Options
| Option | Values | Description |
|---|---|---|
--format |
auto / json / syslog / apache / plain | Log format (default: auto-detect) |
--level |
DEBUG / INFO / WARN / ERROR / FATAL | Filter by severity |
--from |
"YYYY-MM-DD HH:MM:SS" |
Start of time range |
--to |
"YYYY-MM-DD HH:MM:SS" |
End of time range |
--search |
string or regex | Filter lines containing pattern |
--top |
number (default 20) | Max results to show |
--report |
summary / detailed / errors-only | Output detail level |
--output |
file path | Save report to JSON file |
--no-color |
flag | Disable colored output |
Supported Log Formats (auto-detected)
| Format | Recognized by |
|---|---|
| JSON lines | Each line is valid JSON with timestamp / level / message fields |
| Syslog | <timestamp> <hostname> <process>[<pid>]: <message> |
| Apache/Nginx | Standard combined access log format |
| Python traceback | Traceback (most recent call last): blocks |
| Plain text | [YYYY-MM-DD HH:MM:SS] [LEVEL] message or similar |
Workflow
When the user asks to analyze logs, follow this process:
Task Progress:
- [ ] Step 1: Locate the log file(s)
- [ ] Step 2: Determine log format (auto-detect or ask user)
- [ ] Step 3: Run analyzer with appropriate filters
- [ ] Step 4: Review the output with user
- [ ] Step 5: If needed, drill down with --search or narrower time range
Step 1: Locate the file
Ask the user for the log file path, or search common locations (/var/log/, ./logs/, *.log).
Step 2: Determine format
Default to --format auto. The analyzer detects format automatically. Only specify manually if auto-detection fails.
Step 3: Run analysis Start broad, then narrow:
# 1. First pass — overall summary
python scripts/analyzer.py app.log --report summary
# 2. Focus on errors
python scripts/analyzer.py app.log --level ERROR --top 50
# 3. Time-box a specific window
python scripts/analyzer.py app.log --from "14:00:00" --to "15:00:00" --report detailed
# 4. Search for specific patterns
python scripts/analyzer.py app.log --search "ConnectionError" --report detailed
Step 4: Interpret output The summary report shows:
- Total lines / errors / warnings
- Top N most frequent error messages
- Error distribution over time
- First and last occurrence timestamps
Step 5: Drill down Based on findings, re-run with tighter filters:
- Narrow time window around an incident
- Search for correlated error patterns
- Export to JSON with
--output report.jsonfor further processing
Interpreting Results
Anomaly Detection Signals
The analyzer flags these patterns automatically:
- Error spike: >3x average error rate in a time window → possible incident
- New error type: Error message never seen before → possible regression
- Cascade failure: Multiple unrelated errors within 1 second → root cause may be upstream
When to Escalate
After analysis, suggest next steps:
- Frequent timeout errors → check network / downstream service health
- Database connection errors → check connection pool / DB server load
- Memory errors (OOM) → check memory limits / leak patterns
- Auth failures spike → possible credential rotation issue or attack
Additional Resources
- reference.md — complete log format specifications and parsing rules
- examples.md — real-world analysis examples with expected output
当前收录版本
1.0.0
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 支持多种主流日志格式(JSON、syslog、Apache/Nginx、plain text)的自动识别与解析
- 提供错误模式检测、异常识别和聚合报告功能,适用于系统运维和故障排查高频场景
亮点
- 触发描述清晰明确,覆盖 logs、error analysis、debugging 等关键场景,边界清晰
亮点
- 文档结构完整,包含快速开始、核心选项、工作流程和结果解读等清晰章节
- 提供端到端使用示例和分步执行流程,frontmatter 完整规范
待提升项
-
引用文件缺失 原报告严重程度:重大
SKILL.md 中引用了 scripts/analyzer.py 文件,但该文件未包含在 Skill 包中
改进建议:请确保 scripts/analyzer.py 文件存在并完整包含在 Skill 包中,或提供替代执行方案
亮点
- 命令行参数设计合理,支持时间范围、关键词、日志级别等多维度过滤
- 具备异常检测逻辑和后续处理建议,提升分析结果的 actionable 价值
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
账号、密钥或授权
使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。
主文档提及 · 第 114 行
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。