Skip to content
Development
Skill

/log-driven-diagnosis

Use when debugging complex runtime failures, distributed systems, or issues where a local debugger cannot be attached.

From plugin
agent-powerups
8114 skills46 agents54 commands

Claude Code

$ npx -y skills add yeaight7/agent-powerups --skill log-driven-diagnosis --agent claude-code

SKILL.md

log-driven-diagnosis.SKILL.md
name: log-driven-diagnosis
description: Use when debugging complex runtime failures, distributed systems, or issues where a local debugger cannot be attached.

Purpose

When you cannot step through code, logs are your only visibility. Be methodical about extracting signal from noise — never dump whole log files into context.

When to Use

  • Runtime failures where a debugger cannot be attached
  • Distributed systems where the failure spans services
  • Issues reproducible only from log evidence

Inputs

  • Log files or a log explorer covering the incident window
  • The incident timestamp and, if available, a request/trace ID

Workflow

1. **Time-bound the search.** Never dump the whole log file — always `grep` for timestamps around the reported incident, or use `tail`:

   tail -n 200 app.log                          # most recent context
   grep -n "2026-06-06T14:0" app.log            # window around the incident
   awk '/14:02:00/,/14:05:00/' app.log          # bounded slice between timestamps

2. **Identify the request ID.** If the system uses distributed tracing or request IDs, find the ID associated with the error, then search the log corpus for *only* that ID to trace the complete lifecycle of the failed request:

   grep -n "ERROR" app.log | head -5            # find the failing entry and its ID
   grep -n "<request-id>" app.log               # full lifecycle of that request
   # structured (JSON) logs:
   jq -c 'select(.request_id == "<request-id>")' app.log.json

3. **Look for preceding warnings.** The `ERROR` log is usually just the final crash. The actual root cause is often a `WARNING` or unexpected `INFO` log that occurred milliseconds earlier (e.g., a connection retry failing, or an empty array being returned):

   grep -n -B 20 "<error-text>" app.log | grep -inE "warn|retry|timeout|empty"

4. **Add missing logs.** If the logs do not provide enough visibility, your first action must be to *add temporary logging* to the application, reproduce the bug, and gather the new signals. Do not guess blindly if the logs are insufficient.

Output

  • The traced lifecycle of the failing request
  • The suspected root-cause log line(s), including any preceding warnings
  • Any temporary logging added (flagged for later removal)

Verification

  • [ ] Every search was time-bounded or ID-bounded — no full-file dumps in context
  • [ ] Full request lifecycle traced when an ID exists
  • [ ] Lines preceding the error inspected, not just the error line itself
  • [ ] Temporary logging added (and flagged for removal) where visibility was missing

Failure Modes

  • **Error-line tunnel vision** — reading only the final ERROR while the cause sits in an earlier WARNING.
  • **Context flooding** — dumping megabytes of log into the conversation instead of bounded slices.
  • **Blind guessing** — iterating on fixes when the honest move is adding logging and reproducing once more.
Read more
@yeaight7
Ships withagent-powerups

Curated power-ups for coding agents: skills, slash commands, MCP configs, hooks, AGENTS.md templates, and workflows for serious software engineering. Claude Code, Codex, Antigravity CLI, Cursor and more

8114 skills46 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
8
Star history of yeaight7/agent-powerups on GitHub, a chart by star-history.com

Other skills on agent-powerups.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc11d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about log-driven-diagnosis.

Which coding agents can use log-driven-diagnosis?
log-driven-diagnosis installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.