agentleFS
skyvanguardskyvanguard/infra-ops/skills/log-analyzer/SKILL.md

log-analyzer

Skill1 starsChanged 10 months agoMITView on GitHub

Use when the user needs to investigate logs, find errors, trace issues across log entries, or understand what happened at a specific time. Parses system and application logs intelligently.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Time range: When did the issue start? Default to last 1 hour if unknown.

    line 42
  2. Distinctive:

    Use appropriate commands to pull relevant entries:

    line 49
  3. Distinctive:

    Look for these common patterns:

    line 72
  4. Distinctive:

    NEVER read logs that might contain secrets (avoid printing full auth tokens, passwords)

    line 128
  5. Very specific:

    If log files are very large, use tail or time filters first

    line 130
  6. Distinctive:

    ALWAYS show the user which files/sources you're reading

    line 131
  7. Distinctive:

    If no relevant logs found, suggest where else to look

    line 132

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Log Analyzer

Overview

Parse, filter, and analyze system and application logs to find relevant entries, correlate events, and identify root causes. Handles multiple log formats across platforms.

Process

Step 1: Identify Log Sources

Determine what logs are relevant based on the user's issue:

System logs:

PlatformLocationCommand to read
WindowsEvent LogGet-EventLog -LogName [System|Application|Security] -Newest [N]
WindowsModernGet-WinEvent -LogName [name] -MaxEvents [N]
Linuxjournaldjournalctl [flags]
Linuxsyslog/var/log/syslog or /var/log/messages
macOSUnified loglog show [flags]

Application logs (common locations):

ApplicationTypical Location
Nginx/var/log/nginx/error.log, /var/log/nginx/access.log
Apache/var/log/apache2/error.log, /var/log/httpd/error_log
Dockerdocker logs [container]
Node.jspm2 logs or custom path
PostgreSQL/var/log/postgresql/
MySQL/var/log/mysql/error.log
IISC:\inetpub\logs\LogFiles\

Step 2: Define Search Parameters

Establish the investigation window:

  • Time range: When did the issue start? Default to last 1 hour if unknown.
  • Severity: errors only, warnings+errors, or all
  • Keywords: error messages, service names, user IDs
  • Correlation ID: trace IDs, request IDs, session IDs

Step 3: Extract and Filter

Use appropriate commands to pull relevant entries:

Time-based filtering:

PlatformCommand
WindowsGet-EventLog -LogName System -After (Get-Date).AddHours(-1) -EntryType Error
Linuxjournalctl --since "1 hour ago" -p err --no-pager
macOSlog show --last 1h --predicate 'messageType == error'

Keyword search in log files:

PlatformCommand
Allgrep -i "[keyword]" [logfile] | tail -50
WindowsSelect-String -Path [file] -Pattern "[keyword]" -Context 2

Structured log parsing (JSON):

ToolCommand
jqcat [file] | jq 'select(.level == "error")'
grep+jqgrep "error" [file] | jq .

Step 4: Analyze Patterns

Look for these common patterns:

PatternIndicatorLikely Cause
Repeated error same timestampBurst of identical errorsTriggered by single event
Gradual increase in errorsError count growing over timeResource exhaustion
Periodic errorsErrors at regular intervalsCron job or scheduled task
Error after deploy/updateErrors start at specific timeCode or config change
Cascading servicesMultiple services error sequentiallyDependency failure
OOM / memory errors"killed", "out of memory"Memory leak or under-provisioned
Connection refused"ECONNREFUSED", "connection reset"Service down or port blocked
Permission denied"EACCES", "403", "permission denied"Permissions or auth issue

Step 5: Correlate Events

Build a timeline of events:

### Event Timeline
| Time | Source | Event | Severity |
|------|--------|-------|----------|
| HH:MM:SS | [source] | [event] | [sev] |
| HH:MM:SS | [source] | [event] | [sev] |

### Correlation
- First error: [timestamp] in [source]
- Likely trigger: [what happened just before]
- Affected components: [list]
- Pattern: [burst/gradual/periodic]

Step 6: Present Findings

## Log Analysis Report

### Summary
- **Time window:** [start] to [end]
- **Total errors found:** [N]
- **Unique error types:** [N]
- **Most frequent:** [error message] ([count] occurrences)

### Root Cause Analysis
[What the logs indicate happened]

### Key Log Entries
[Show the 3-5 most relevant entries with context]

### Recommendations
1. [Immediate action]
2. [Preventive measure]
3. [Monitoring suggestion]

Rules

  • NEVER read logs that might contain secrets (avoid printing full auth tokens, passwords)
  • Truncate long log entries to relevant portions
  • If log files are very large, use tail or time filters first
  • ALWAYS show the user which files/sources you're reading
  • If no relevant logs found, suggest where else to look
  • Redact sensitive data (IPs, emails, tokens) in report output when sharing

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.