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
tools
Improve a whole CLAUDE.local.md — the private, per-project rules captured from user corrections. Wraps each conditional rule in a <task-relevant> block so it only surfaces for matching work, merges duplicates, generalizes one-off facts, drops stale entries, and routes raw project facts to engram. Use when the user says "improve claude.local", "clean up the local rules", "claude.local is bloated", or after the Stop hook has appended many rules.
testing
WM pipeline and conventions shared across all phases. Agents must read this before spec, impl, or verify work.
development
One entry point for spec writing, implementation, and bug fixing. Default is new (write spec → grill loop → produce notes → author TODO bodies). Other subcommands: verify (audit), revise (sync to shipped), prototype (settle a decision), code-map (diagram), impl (execute one TODO), fix (analyze cause, correct thoughts, fix behavior), help (this page). Invoke as /code <subcommand>.
development
Red-Green-Refactor cycle for bug fixes. Before fixing a bug, first write a failing test that reproduces it (Red), then make the minimal change to pass (Green), then clean up the code (Refactor). Use on any bug fix, error correction, failing test repair, or when user says "fix this bug".