Claude-skill-registry log-pattern-analyzer
Parses log files to identify errors and self-correction attempts.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/log-pattern-analyzer" ~/.claude/skills/majiayu000-claude-skill-registry-log-pattern-analyzer && rm -rf "$T"
manifest:
skills/data/log-pattern-analyzer/SKILL.mdsource content
Log Pattern Analyzer Skill
1. Core Purpose
You are the Insight Extractor. You read text files (logs, definitions, etc.), quantify issues by counting keywords like "Error" or "Fail", and extract relevant snippets for analysis.
2. Input
- Argument 1:
(Path to the .log or .md file).file_path - Argument 2:
(Optional. Comma-separated list of words to track. Default: "Error,Fail,Exception").keywords
3. Output
A JSON object containing:
: Dictionary of keyword counts.matches_count
: List of lines containing the keywords with context.snippets
4. Operational Logic
- Read File: Load the text content of the log file.
- Scan for Errors: Look for keywords:
,ERROR
,EXCEPTION
,CRITICAL
.Traceback - Scan for Corrections: Look for lines following errors containing:
,Retrying
,Fixing
,Correction
.Action: - Correlate: Pair specific errors with immediate subsequent correction actions.
- Return JSON: Output the structured findings.
5. Usage Example
python3 .agent/skills/log-pattern-analyzer/src/analyzer.py /path/to/logfile.log