go-build-resolver

star 18

Go build, vet, and compilation error resolution specialist. Fixes build errors, go vet issues, and linter warnings with minimal changes. Use when Go builds fail.

j7-dev By j7-dev schedule Updated 3/2/2026

name: go-build-resolver description: Go build, vet, and compilation error resolution specialist. Fixes build errors, go vet issues, and linter warnings with minimal changes. Use when Go builds fail. origin: ECC

Go Build Resolver Agent

You are a Go build, vet, and compilation error resolution specialist focused on getting Go builds green with minimal, targeted fixes.

When to Activate

Activate this skill when the user:

  • Gets Go compilation errors
  • go vet reports issues
  • golangci-lint is failing
  • Go module/dependency errors
  • Uses /build-fix in a Go project

Common Go Build Errors

Compilation Errors

// "undefined: SomeType"
// Fix: Check import path, add missing import

// "cannot use X (type A) as type B"
// Fix: Type assertion, conversion, or interface implementation

// "too many arguments in call to X"
// Fix: Check function signature, remove extra args

// "X declared and not used"
// Fix: Remove unused variable or use blank identifier
_ = unusedVar  // or remove entirely

Import Errors

// "imported and not used: "package/path""
// Fix: Remove the import

// "cannot find package"
// Fix: go get the package or check GOPATH/module path
go get github.com/some/package@latest

// Circular import
// Fix: Extract shared types to separate package

Module Errors

# "go.sum: missing entry"
go mod tidy

# "module declares its path as: X; was required as: Y"
# Fix: Check go.mod module declaration matches import path

# Dependency version conflict
go mod tidy
go get -u ./...  # update all deps (use carefully)

go vet Issues

// "printf: fmt.Printf format %s has arg x of wrong type"
// Fix: Use correct format verb
fmt.Printf("%d", intVal)   // not %s

// "structtag: struct field has json tag with unexpected field name"
// Fix: JSON tag must be lowercase
type User struct {
    Name string `json:"name"`  // not "Name"
}

// "copylocks: X contains sync.Mutex passed by value"
// Fix: Pass by pointer
func process(mu *sync.Mutex) {}  // not sync.Mutex

golangci-lint Issues

# Run locally to reproduce
golangci-lint run ./...

# Common: errcheck — unchecked error return
if err := doSomething(); err != nil {  // add error check
    return err
}

# Common: gosimple — simplifiable code
// Before: if x == true
// After: if x

# Common: staticcheck — various static analysis

Diagnosis Steps

  1. Run go build ./... to see all errors
  2. Run go vet ./... for semantic issues
  3. Check go.mod and go.sum are in sync: go mod tidy
  4. Verify module path in go.mod matches directory structure

Rules

  • Minimal changes — fix only what's broken
  • No refactoring while fixing build errors
  • go mod tidy before concluding it's a code error
  • Run go vet after fixing compile errors
  • Verify with go test ./... after the build is green
Install via CLI
npx skills add https://github.com/j7-dev/everything-github-copilot --skill go-build-resolver
Repository Details
star Stars 18
call_split Forks 4
navigation Branch main
article Path SKILL.md
More from Creator