with one click
log-analysis
分析日志文件,检查异常模式、错误级别和关键事件;触发词:分析日志、检查日志、日志异常、/log-analysis
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
分析日志文件,检查异常模式、错误级别和关键事件;触发词:分析日志、检查日志、日志异常、/log-analysis
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, or extract information from web pages.
分析代码变更并生成详细的commit信息,执行git提交;触发词:提交代码、git commit、代码提交、/code-commit
编写和执行SQL查询,分析数据库结果;触发词:数据库查询、SQL查询、执行SQL、/db-query
运行测试并分析结果,提供详细的测试报告;触发词:运行测试、测试运行、执行测试、/test-runner
将已知 bug 或功能需求记录为 GitHub Issue;触发词:记录 bug、已知 bug、功能需求、记录需求、/devlog
| name | log-analysis |
| description | 分析日志文件,检查异常模式、错误级别和关键事件;触发词:分析日志、检查日志、日志异常、/log-analysis |
| version | 1.0.0 |
分析指定的日志文件,识别异常模式、错误级别事件和关键业务指标。
用 AskUserQuestion 询问:
wc -l <日志文件路径>
ls -lh <日志文件路径>
head -5 <日志文件路径>
tail -5 <日志文件路径>
grep -c "ERROR" <日志文件路径>
grep -c "WARN" <日志文件路径>
grep -c "INFO" <日志文件路径>
grep -c "DEBUG" <日志文件路径>
grep -n "ERROR" <日志文件路径> | tail -20
grep -B 2 -A 5 "ERROR" <日志文件路径> | tail -50
grep -n "Exception" <日志文件路径>
grep -B 1 -A 10 "Exception" <日志文件路径> | tail -100
根据用户指定的关注模式进行搜索:
grep -n "<关注模式>" <日志文件路径>
grep -c "<关注模式>" <日志文件路径>
grep -o "^[0-9-]* [0-9:]*" <日志文件路径> | uniq -c | tail -20
根据日志内容识别业务指标,例如:
# 按小时统计错误分布
grep "ERROR" <日志文件路径> | grep -o "^[0-9-]* [0-9]*" | uniq -c
📊 日志分析报告
================
📁 文件信息
- 路径: <日志文件路径>
- 大小: <文件大小>
- 总行数: <行数>
🚨 错误统计
- ERROR: <数量>
- WARN: <数量>
- INFO: <数量>
- DEBUG: <数量>
🔍 关键发现
1. <发现1>
2. <发现2>
3. <发现3>
📈 业务指标
- <指标1>: <值>
- <指标2>: <值>
⚠️ 风险提示
- <风险1>
- <风险2>
💡 建议
- <建议1>
- <建议2>
tail 和 grep 组合避免加载整个文件