Log triage
Read a local log file. Do not call a remote cluster, VPN, or employer API.
When to use
The user has a .jsonl, .log, or .txt export and wants a short incident-style summary.
How to run
python3 skills/log-triage/scripts/triage.py PATH_TO_LOG
From this repo:
python3 skills/log-triage/scripts/triage.py skills/log-triage/fixtures/sample.jsonl
The script accepts JSON Lines objects with timestamp, level, source, and message. Plain text lines are treated as messages with level INFO, or ERROR if the line contains error or fail.
What to report
- Time range and line count.
- Counts by level.
- Top repeated messages (max 5).
- Last 5 error-level lines, verbatim.
- One sentence on what to check next. Do not invent a root cause.
Rules
- Do not send log contents to a third-party API unless the user asks.
- Redact emails, tokens, and hostnames that look internal before quoting in chat, unless the file is the bundled fixture.
- If the file is empty or unreadable, say so and stop.