Agent skill
go-vet
Fix go vet warnings
Install this agent skill to your Project
npx add-skill https://github.com/JamesPrial/claudefiles/tree/main/skills/golang/linting/vet
SKILL.md
go vet
Built-in static analyzer that catches common mistakes.
Usage
go vet ./...
go vet ./pkg/...
Common Warnings
Printf Format Mismatch
// Bad
fmt.Printf("%d", "string")
// Good
fmt.Printf("%s", "string")
Unreachable Code
// Bad
return value
fmt.Println("never runs")
// Good
fmt.Println("runs")
return value
Composite Literal Uses Unkeyed Fields
// Bad
Person{"Alice", 30}
// Good
Person{Name: "Alice", Age: 30}
Nil Dereference
// Bad
var p *int
fmt.Println(*p)
// Good
if p != nil {
fmt.Println(*p)
}
Suspicious Mutex Usage
// Bad - mutex copied
func process(mu sync.Mutex) {
mu.Lock()
}
// Good - pass pointer
func process(mu *sync.Mutex) {
mu.Lock()
}
Lost Context
// Bad
ctx := context.TODO()
// Good
ctx := context.Background()
// or accept ctx as parameter
Fix All Issues
go vet ./... 2>&1 | tee vet.log
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
plugin-packager
Package claudefiles components into a valid Claude Code plugin
plugin-packager-validation
Plugin validation errors and fixes
plugin-packager-subset
Package language-specific subsets of claudefiles
plugin-packager-hooks
Handle hook scripts and paths for plugin packaging
go-concurrency
Go concurrency patterns. Routes to specific patterns.
go-sync-primitives
sync.WaitGroup and sync.Mutex patterns
Didn't find tool you were looking for?