fix

Fix Go codebase bugs with regression-test-first workflow and go test validation.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/dotBeeps/pantry --skill fix-dotbeeps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix
Source: https://github.com/dotBeeps/pantry/tree/main/morsels/skills/fix
Command: npx skills add https://github.com/dotBeeps/pantry --skill fix-dotbeeps

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers address user-reported bugs quickly by enforcing a regression-test-first workflow and capping reattempts to maintain momentum.

Core Features & Use Cases

  • Regression-test-first workflow: ensures a failing test is written before any fix.
  • Minimal-change commits: changes are limited to the smallest necessary code changes.
  • Verification discipline: requires go build and go test to pass before merge.

Quick Start

Create a failing regression test, implement the minimal fix, and re-run tests to confirm the bug is resolved.

Frequently Asked Questions about fix

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

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

To fix a Go bug with a regression test, you first create a failing test that reproduces the specific failure, then implement the smallest possible code change to make it pass. Finally, you validate the fix by running go build and go test.

What is the minimal-change approach for bug fixing in Go?

The minimal-change approach for bug fixing limits code modifications to only what is strictly necessary to resolve the failure. It enforces a regression-test-first workflow where a failing test is written before the fix, ensuring stability without introducing unnecessary changes.

How do I create a failing test before fixing a user-reported bug?

Creating a failing test before fixing a user-reported bug involves writing a regression test that specifically captures the reported failure. You then implement the minimal fix and re-run go build and go test to confirm the bug is resolved and stability is maintained.

Does this TDD-driven bug fix workflow require running go build and go test?

Yes, this TDD-driven bug fix workflow requires running go build and go test as part of its verification discipline. These commands must pass before merging any changes to ensure the minimal-change fix successfully resolves the regression test without breaking existing functionality.

How does regression testing help maintain momentum when fixing code?

Regression testing helps maintain momentum when fixing code by enforcing a strict test-first workflow and capping reattempts. By requiring a failing test before implementing a minimal fix and validating with go test, it prevents endless debugging cycles and ensures rapid, stable resolution.

When should I use a regression-test-first workflow for bug fixing?

You should use a regression-test-first workflow for bug fixing when addressing user-reported bugs or specific code failures. This approach ensures the bug is reliably reproduced before implementing a minimal-change fix, validating stability with go build and go test before proceeding.