fixing-bugs

Reproduce bugs with regression tests and apply minimal root-cause fixes.

Updated Dec 31, 2025
One-click install
npx skills add https://github.com/tomgun/agentic-framework --skill fixing-bugs-tomgun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fixing-bugs
Source: https://github.com/tomgun/agentic-framework/tree/main/.agentic/lib/agents/claude/skills/fixing-bugs
Command: npx skills add https://github.com/tomgun/agentic-framework --skill fixing-bugs-tomgun

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest, jest, and includes scripts (resource) components.

What problem does it solve?

When unexpected behavior or regressions occur in a codebase, it is easy to patch symptoms, introduce new regressions, or lose reproducible evidence of the bug. This Skill enforces a failing-test-first workflow so bugs are reliably reproduced, fixed at the root cause, and guarded by regression tests to prevent recurrence.

Core Features & Use Cases

  • Failing-test-first methodology: Require a regression test or minimal reproduction before changing code.
  • Localization and minimal fixes: Use targeted reading and grepping to locate the divergence point and apply the smallest root-cause change.
  • Verification and handoff: Run targeted regression tests and a verification script, then hand off to the repository commit workflow for pre-commit gates.
  • Use Case: Fix an off-by-one error by adding a failing unit test, correcting the loop boundary, and verifying the full test suite succeeds.

Quick Start

Use the fixing-bugs skill to reproduce the failure with a regression test, implement a minimal root-cause fix, and verify the full test suite before handing off for commit.

Frequently Asked Questions about fixing-bugs

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

FAQPage Schema
How do I fix a bug using a regression test?

To fix a bug using a regression test, you first reproduce the failing behavior with a targeted test, implement a minimal root-cause fix, and verify the full test suite succeeds before committing. This prevents symptom patching and recurrence.

What is the failing-test-first methodology for debugging?

The failing-test-first methodology for debugging requires writing a regression test or minimal reproduction that captures the bug before changing any code. This ensures the divergence point is reliably located and guarded against future regressions.

How do I run regression tests with pytest and jest to verify a bug fix?

You verify a bug fix by running targeted regression tests using pytest or jest, then executing a verification script. This validates that the minimal root-cause fix resolves the failure without introducing new regressions.

Can I use this test-driven debugging workflow for script regressions?

Yes, you can use this test-driven debugging workflow for script regressions. It applies to debugging tasks for unit, integration, or script regressions where a failing-test-first approach and environment reproductions are feasible.

What is the best way to ensure a minimal root-cause fix for a unit test failure?

The best way to ensure a minimal root-cause fix for a unit test failure is to use targeted reading and grepping to locate the divergence point, apply the smallest possible code change, and validate against the full test suite.

Why do I need a verification script before committing bug fixes?

You need a verification script before committing bug fixes to satisfy pre-commit gates and validate that the targeted regression tests pass. This ensures the fix is fully validated before handing off to the repository commit workflow.