Skip to content
cccskills
FreePublished on GitHub

log-error-digest

Analyze JSON, syslog, or Nginx logs to group similar errors, count occurrences, and identify busy error periods. Filter by severity or time range, then view the report in the terminal or export it as JSON.

OriginalShow the original description

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or get distribution stats.

See how to install

Good for

  • Grouping repeated errors to investigate causes
  • Finding hours or dates with error spikes
  • Analyzing logs within a specific time range
  • Exporting an error report as JSON

Files included (3)

  • SKILL.md3.8 KB
  • LICENSE1.1 KB
  • scripts/analyze_logs.py13.0 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Log Error Digest

Automated log file analysis that produces error clustering, frequency statistics, and time distribution reports.

Features

  • Error Clustering: Groups similar error messages by normalizing dynamic parts (IPs, UUIDs, numbers, etc.) to identify root causes
  • Frequency Statistics: Counts occurrences by error type, sorted by severity
  • Time Distribution: Shows error distribution by hour and by date, helping pinpoint peak error periods

Supported Log Formats

FormatDescriptionAuto-detection
JSONOne JSON object per line with timestamp/level/message fieldsStarts with {
syslogRFC 3164 format, e.g. Jan 1 12:00:00 host proc[pid]: msgStarts with month name
NginxAccess log or error log formatStarts with IP or date/path pattern

Usage

python scripts/analyze_logs.py <log_file_path> [options]

Parameters

ParameterDescriptionDefault
log_filePath to the log file (required)-
--formatLog format: auto/json/syslog/nginxauto
--topShow Top N error clusters20
--outputExport results to a JSON fileTerminal output only
--levelFilter by log level (e.g. ERROR, WARN)All levels
--sinceOnly analyze logs after this time (ISO format)No limit
--untilOnly analyze logs before this time (ISO format)No limit

Examples

# Auto-detect format and analyze the entire log file
python scripts/analyze_logs.py /var/log/app.log

# Specify Nginx format, show only Top 10 errors
python scripts/analyze_logs.py /var/log/nginx/error.log --format nginx --top 10

# Filter ERROR level only, export JSON report
python scripts/analyze_logs.py app.log --level ERROR --output report.json

# Analyze logs within a specific time range
python scripts/analyze_logs.py app.log --since 2024-01-01T00:00:00 --until 2024-01-02T00:00:00

Output

Terminal Output

=======================================================
              Log Analysis Report
=======================================================

📊 Overview
  Detected format: json
  Total lines:     15,234
  Parsed:          15,100 (parse failures: 134)
  Matched entries: 12,800
  Errors:          2,341
  Time range:      2024-01-01 00:03:12 ~ 2024-01-01 23:58:45

🔴 Top Error Clusters (47 total)
  #1   [×523  ] Connection refused to database at 10.0.1.5:5432
       First seen: 2024-01-01T00:15:30  Last seen: 2024-01-01T23:45:12
  #2   [×312  ] Timeout waiting for response from user-service after 30000ms
       First seen: 2024-01-01T02:10:00  Last seen: 2024-01-01T22:30:45
  #3   [×198  ] File not found: /data/uploads/img_99421.png
       First seen: 2024-01-01T08:00:00  Last seen: 2024-01-01T20:15:33
  ...

⏰ Time Distribution (by hour)
  00:00  █████░░░░░░░░░░░░░░░  42
  01:00  ██░░░░░░░░░░░░░░░░░░  18
  ...
  14:00  ████████████████████  523
  ...

📅 Time Distribution (by date)
  2024-01-01  ████████████████████  2,341

JSON Output

Use the --output parameter to export a structured JSON report for further processing or integration with monitoring systems.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Get a simulated peer review of a paper, abstract, or selected sections. Receive assessments of originality, methods, results, and writing, with specific revision suggestions, severity ratings, and a prioritized checklist for improving the manuscript.

  • Run a simulated peer review before submitting a paper
  • Check whether methods and conclusions are adequately supported
  • Review an abstract for novelty and clarity
zebbern/claude-code-guide4.7KUpdated Oct 20, 2026

Guide Windows domain penetration testing through Active Directory reconnaissance, credential attacks, privilege escalation, and certificate service checks. Use references for tools such as BloodHound and Impacket to examine attack paths and understand testing prerequisites.

  • Planning Active Directory penetration tests
  • Investigating attack paths with BloodHound
  • Reviewing Kerberos and NTLM authentication risks
zebbern/claude-code-guide4.7KUpdated Oct 20, 2026

Test REST, SOAP, and GraphQL APIs for authentication flaws, improper access to other users’ records, and unsafe input handling. Guides endpoint discovery and request variations to identify vulnerabilities and document evidence of unauthorized access.

  • Discovering API endpoints for security testing
  • Checking access to other users’ records
  • Assessing GraphQL schemas and query handling
zebbern/claude-code-guide4.7KUpdated Oct 20, 2026

Explores alternative APIs, the interfaces other code uses to call a module. Parallel sub-agents develop distinctly different designs, then present signatures, usage examples, and trade-offs to help choose or combine an approach before implementation.

  • Comparing API designs before implementation
  • Weighing simplicity against flexibility
  • Reviewing interfaces from the caller's perspective
zebbern/claude-code-guide4.7KUpdated Oct 20, 2026

Interactive system flow tracing across CODE, API, AUTH, DATA, NETWORK layers with SQLite persistence and Mermaid export. Use for security audits, compliance documentation, flow tracing, feature ideation, brainstorming, debugging, architecture reviews, or incident post-mortems. Triggers on audit, trace flow, document flow, security review, debug flow, brainstorm, architecture review, post-mortem, incident review.

The English summary is being prepared. Showing the original description.

zebbern/claude-code-guide4.7KUpdated Oct 20, 2026

Compare login approaches and authentication providers, then use implementation examples and security checklists to plan or review an app’s login flow. Covers sessions, tokens, external login providers, passkeys, and common implementation mistakes.

  • Choose a login approach for a new app
  • Compare NextAuth / Auth.js, Clerk, and Supabase Auth
  • Review token storage and refresh behavior
zebbern/claude-code-guide4.7KUpdated Oct 20, 2026

See all skills by zebbern

Report a problem with this skill