bug-fix

Diagnose and fix software bugs with root-cause analysis, verification, and git commits.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Fixing bugs without understanding the root cause leads to symptom-masking patches, regressions, and repeated failures. This Skill enforces a disciplined bug-fixing workflow: reproduce or gather evidence first, locate the root cause using a four-part structure (symptom, cause analysis, fix plan, affected files), verify with compilation and tests, then commit following repository conventions. ## Core Features & Use Cases - Root-Cause-First Workflow: Structures diagnosis as symptom → cause → fix plan → affected files, forbidding symptom masking like swallowed exceptions or loosened validation. - Evidence-Based Diagnosis: Supports runtime reproduction via logs (trace_id), database state checks (production read-only), static forensics for non-reproducible defects, and full-scope enumeration when evidence comes from samples or screenshots. - Mandatory Verification and Commit: Runs project build and test commands after changes, classifies failures as newly introduced vs pre-existing, and produces conventional Chinese commit messages with explicit git add. - Use Case: A user reports a 500 error with a trace_id on an order API. The Skill pulls logs, traces the call chain, identifies the null-state root cause, applies a minimal fix, runs the module's unit tests, and commits with a structured fix message. ## Quick Start Use the bug-fix skill to diagnose and fix this bug: the order submission endpoint returns a 500 error with trace_id abc123 when the cart is empty.

Frequently Asked Questions about bug-fix

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

FAQPage Schema
How do I fix a bug with root-cause analysis instead of guessing?

Follow a four-part structure: symptom, cause analysis, fix plan, affected files. Reproduce the issue or gather evidence first via logs, database checks, or call-chain tracing, then make a minimal change targeting the root cause and verify with compilation and tests.

How to debug a backend error using a trace_id from logs?

Pull log context by trace_id and time window using a log-diagnose tool or your logging platform, then locate the first exception line and its preceding business state. Replay the request with original inputs to confirm the root cause before editing code.

Can I fix bugs that cannot be reproduced at runtime?

Yes, static defects like dead code or comment drift use evidence gathering instead: run repository-wide reference counts with grep, compare definitions against call sites, and explicitly note that no runtime symptom exists in the diagnosis.

When should I not use a bug-fix workflow?

Use other workflows when changes are comment-only, when you only need frontend error diagnosis without code changes, when doing behavior-preserving refactors, small-scope optimizations, or new feature development that changes external behavior.

Why does bug verification fail when external services are unavailable?

Verification depending on databases or middleware requires those environments to be reachable. When unavailable, report the limitation to the user and propose an alternative verification method rather than silently skipping verification.