agentleFS
NailShakurovNailShakurov/logzip/skills/log-analysis/SKILL.md

log-analysis

Skill12 starsChanged 6 months agoMITView on GitHub

Use this skill when the user asks to analyze, investigate, debug, or review a log file — or when given a path to a .log, syslog, journalctl output, or similar file. Prescribes using logzip MCP tools instead of reading the file directly.

7 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

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When the user provides a log file path for analysis, ALWAYS use logzip MCP tools instead of reading the file directly with Read/Bash/grep.

    line 8
  2. Very specific:

    If recommended_tool == "compress_file" (file < 200K tokens):

    line 24
  3. Very specific:

    If recommended_tool == "compress_tail" (large file):

    line 29

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “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 Analysis with logzip

When the user provides a log file path for analysis, ALWAYS use logzip MCP tools instead of reading the file directly with Read/Bash/grep.

Why

Direct file reading loads the raw log into context — often hundreds of thousands of tokens for a multi-MB file. logzip compresses logs 50–60% while keeping the output fully readable by LLMs. Anomalies and unique lines remain visible; repetitive noise is collapsed into a legend.

Workflow

Step 1 — get_stats first:

mcp__logzip__get_stats(path)

Returns file_size_bytes, estimated_tokens, detected_profile, and recommended_tool.

Step 2 — compress based on recommendation:

If recommended_tool == "compress_file" (file < 200K tokens):

mcp__logzip__compress_file(path, quality="balanced")

If recommended_tool == "compress_tail" (large file):

mcp__logzip__compress_tail(path, lines=500, quality="balanced")

For more context on large files, increase lines (e.g. 2000).

Step 3 — analyze the compressed output:

The output has three sections:

  • PREFIX — common prefix stripped from all lines (read once, ignore for anomaly search)
  • LEGEND — substitution dictionary: #0# → actual repeated string
  • BODY — compressed log body; lines with NO substitutions are unique — these are the anomalies

Focus on lines in BODY that contain no #N# tokens — those are the interesting events.

Tool names

Depending on Claude Code version, tools may appear as:

  • mcp__logzip__get_stats
  • mcp__logzip__compress_file
  • mcp__logzip__compress_tail

Prerequisite

This skill requires the logzip MCP server to be registered. If tools are not available, tell the user:

"logzip MCP is not configured. Install it with: claude mcp add logzip -- logzip mcp --allow-dir /var/log"

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.