Skip to main content

Overview

The go-build-resolver agent is an expert Go build error resolution specialist. Its mission is to fix Go build errors, go vet issues, and linter warnings with minimal, surgical changes.
string
default:"go-build-resolver"
Agent identifier
string
default:"sonnet"
Uses Claude Sonnet for efficient Go error resolution
array
Available tools: Read, Write, Edit, Bash, Grep, Glob

When to Use

Go build fails with compilation errors
go vet reports issues
Linter warnings (staticcheck, golangci-lint)
Module dependency problems
The go-build-resolver agent activates PROACTIVELY when Go builds fail.

Core Responsibilities

  1. Diagnose Go compilation errors
  2. Fix go vet warnings
  3. Resolve staticcheck / golangci-lint issues
  4. Handle module dependency problems
  5. Fix type errors and interface mismatches

Diagnostic Commands

Run these in order:

Resolution Workflow

Common Fix Patterns

Examples

Fix: Undefined Variable

Fix: Type Mismatch

Fix: Interface Not Implemented

Fix: Import Cycle

Fix: Missing Dependency

Fix: Unused Variable

Module Troubleshooting

Key Principles

Surgical Fixes Only

Don’t refactor, just fix the error

Never Suppress

Don’t add //nolint without explicit approval

Preserve Signatures

Never change function signatures unless necessary

Tidy After Changes

Always run go mod tidy after adding/removing imports

Fix Root Cause

Don’t suppress symptoms, fix the underlying issue

Stop Conditions

Stop and report if:
  • Same error persists after 3 fix attempts
  • Fix introduces more errors than it resolves
  • Error requires architectural changes beyond scope

Output Format

Final: Build Status: SUCCESS/FAILED | Errors Fixed: N | Files Modified: list

Usage Example

Success Criteria

go build ./... exits with code 0
go vet ./... reports no issues
No new errors introduced
Minimal lines changed
Tests still passing
For detailed Go error patterns and code examples, see skill: golang-patterns.