log-diagnose

Diagnose production errors by pulling Kibana logs via trace_id and classifying root causes.

1|Updated Sep 11, 2026
One-click install
npx skills add https://github.com/lldwb/lldwb-claude-skills --skill log-diagnose-lldwb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: log-diagnose
Source: https://github.com/lldwb/lldwb-claude-skills/tree/main/skills/log-diagnose
Command: npx skills add https://github.com/lldwb/lldwb-claude-skills --skill log-diagnose-lldwb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? When a user reports an online failure, engineers must manually search Kibana, reconstruct the request timeline, and decide whether the error is a code bug or an expected business block. This Skill automates log retrieval by trace_id and time window, then guides an auditable six-category root-cause classification. ## Core Features & Use Cases - Automated Kibana log retrieval: Pull all logs for a trace_id (or AND-combined keywords) within a flexible time window across multiple environments, writing a timeline summary and raw JSON to disk. - Six-category fault taxonomy: Classify failures as BUG, business block, permission block, workflow block, infrastructure/performance, or third-party failure, with query timeouts escalated to BUG. - Auditable BUG deliverables: Only for confirmed bugs, generate a fix-task Markdown and an independent incident report Markdown, with root cause verified against the commit that was live at failure time. - Use Case: A user pastes a trace_id from a failed production request and asks whether it is a bug; the Skill pulls the logs, traces the deepest business exception to a file:line, checks the responsible commit, and produces two ready-to-dispatch Markdown documents. ## Quick Start Ask the assistant to use the log-diagnose skill to investigate trace_id abc123 over the last 30 days in the production environment and determine whether it is a bug.

Frequently Asked Questions about log-diagnose

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose a production error from a trace_id in Kibana?

Run the log-diagnose script with the trace_id and a time window such as 30d or an ISO from~to range. It queries the Kibana internal search API and writes a timeline summary plus raw JSON, which the agent then classifies into one of six fault categories.

How do I search Kibana logs by keyword instead of trace_id?

Use the --kw flag, which can be repeated to AND-combine multiple keywords over a time window. The script matches phrases against the message field and outputs the same summary and raw JSON artifacts as a trace_id query.

Can I switch between production and test Kibana environments?

Yes, the config file defines multiple environments under an environments map, and the --env flag selects one, defaulting to default_env. Run the script with --list-envs to see all configured environments and their Kibana hosts.

Why does log diagnosis report no log hits for my trace_id?

No hits usually means the time window does not cover the log retention period or the trace never reached the selected environment. Widen the window to cover the retention period and retry once; if still empty, the trace did not land in that environment's logs.

When does log diagnosis produce a bug fix task document?

Markdown deliverables are produced only when the root cause is classified as a BUG, including query timeouts that raised errors. Business, permission, workflow, infrastructure, and third-party failures receive only a chat report, and fix tasks are never dispatched automatically.