harness/plugins/common/claude/skills/go-logger-analyzer/SKILL.md
Structured analysis of JSON log files from Go loggers (zap, logrus, zerolog) — statistics, error patterns, field analysis. Skip for simple log viewing or grepping a known string.
npx skillsauth add popoffvg/dotfiles go-logger-analyzerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use when:
Skip when:
tail commandAnalyze JSON logs from Go loggers (zap, logrus, zerolog, etc.) used in Go projects. Follow this systematic workflow with prefix tree-powered analysis:
$ARGUMENTS, use it. Otherwise, ask the user for the path if not provided.~/.claude/skills/go-logger-analyzer/analyze_logs.py
python3 ~/.claude/skills/go-logger-analyzer/analyze_logs.py <log-file> --stats-only--prefix-tree for prefix tree-based field pattern discoverylevel, ts/time, logger, msg, caller, and custom fields)Analyze the logs and provide a comprehensive statistics report:
Count occurrences for each logger name/path. Example output:
Logger Distribution:
- ct.main: 150 entries
- ct.datactl.controller: 45 entries
- ct.datactl.reconciler: 32 entries
- ct.webhook: 12 entries
Level Distribution:
- info: 180 entries
- warn: 35 entries
- error: 24 entries
- debug: 0 entries
Report the first and last timestamp in the logs.
If errors are present, summarize them with context.
For each unique logger name found (e.g., ct.main, ct.datactl.controller):
logger.Named("name") or logger.With(zap.String("logger", "name"))log := logger.Named("controller")Use prefix tree analysis for comprehensive logger field discovery:
python3 ~/.claude/skills/go-logger-analyzer/analyze_logs.py <log-file> --prefix-tree --logger <logger-name>request, response, error)request.id, request.method, response.status)Deep Dive Options:
--tree-field <field>: Explore specific field subtree (e.g., --tree-field request)--tree-deep: Show complete prefix tree structure (all levels at once)--tree-pattern <pattern>: Find fields matching prefix pattern--tree-threshold <n>: Only show fields with >= n occurrencesExample default output (top-level only):
Prefix Tree Analysis for 'ct.main':
├── request (245 entries) - 5 unique values
├── response (245 entries) - 3 unique values
├── error (25 entries) - 4 unique values
├── auth (15 entries) - 2 unique values
└── cache (8 entries) - 1 unique value
💡 To explore deeper:
Use --tree-field <field_name> to explore specific field subtrees
Use --tree-deep to show complete hierarchy at once
Example deep dive on specific field:
Field Subtree: request
├── id (245 entries) - UUID pattern
├── method (245 entries) - [GET:120, POST:80, PUT:45]
├── path (245 entries) - [/api/users:89, /api/orders:156]
└── headers (200 entries)
└── user-agent (200 entries) - [curl:120, browser:80]
Show field relationships and patterns that help identify:
Critical: Determine if the issue location is clear from the statistics:
If issue is NOT clear (e.g., errors spread across many locations, no obvious pattern):
caller fieldpython3 analyze_logs.py <log-file> --level error --limit 50If issue is clear (e.g., specific error, clear stacktrace, single failing component):
After showing statistics, ask the user what they want to focus on:
Then present only the filtered logs in a readable format with:
Use clear sections with markdown formatting:
python3 ~/.claude/skills/go-logger-analyzer/analyze_logs.py <log-file>
--stats-only: Show only statistics--level error: Filter by log level--logger <name>: Filter by logger name--message <pattern>: Filter by message pattern--limit N: Limit output entries (default: 20)--prefix-tree: Perform prefix tree-based field analysis (top-level summary by default)--tree-deep: Show detailed prefix tree structure (all levels)--tree-field <field>: Analyze specific field subtree--tree-pattern <pattern>: Find fields matching prefix pattern--tree-threshold <n>: Minimum occurrences for field displayUser: "analyze logs from /tmp/app.log"
You:
python3 ~/.claude/skills/go-logger-analyzer/analyze_logs.py /tmp/app.log --prefix-treeUser: "explore the request field"
You:
python3 ~/.claude/skills/go-logger-analyzer/analyze_logs.py /tmp/app.log --prefix-tree --tree-field requestEval checklist:
Test inputs:
Can change: analysis steps, statistics format, pattern grouping strategy, field analysis depth Cannot change: skip-when criteria (simple viewing, small files, known grep), JSON log focus Min sessions before eval: 5 Runs per experiment: 3
testing
Use when the user asks to create test sets, enumerate scenarios, generate edge cases, or draft a coverage matrix before implementation.
testing
Use when the user asks to review, audit, score, or validate test sets for missed cases before execution or merge.
tools
Test harness plugins in isolation using tmux panes. Runs MCP servers, unit tests, typecheck, and Claude plugin loading. Use when user says "test plugin", "check plugin", "run plugin tests", "validate plugin", or names a specific plugin to test.
development
Guide for designing integration and e2e tests using BDD (Behavior-Driven Development) methodology with Cucumber-style Given/When/Then scenarios. Use when writing or reviewing tests for any service, API, or component. Language-agnostic — covers scenario structure, step notation, assertion principles, async patterns, and common anti-patterns.