go-build-resolver

go-build-resolver is an agent for Claude Code from codelably/harmony-claude-code. It costs 58 tokens per session (2,431 once invoked), scanned A, original, MIT.

A Go troubleshooting specialist for build failures, compiler errors, vet findings, and linter warnings. It favors small code changes while checking dependencies and common type or interface problems.

In plain words
What is it for?
Use it to diagnose and fix Go build errors, go vet findings, static-analysis warnings, dependency problems, type mismatches, and interfaces that are not correctly implemented.
Why use it?
It helps locate why a Go project does not build or why automated checks fail. Its diagnostic checks cover the code, dependencies, module state, and common programming mistakes.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the everything-claude-code plugin — 29 skills, 24 commands, 14 agents, 6 hooks shipped together

Good fit Use it to diagnose and fix Go build errors, go vet findings, static-analysis warnings, dependency problems, type mismatches, and interfaces that are not correctly implemented.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/codelably/harmony-claude-code/go-build-resolver
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/codelably/harmony-claude-code

Made for: Claude Code.

Or install everything-claude-code, the plugin that ships this one along with the rest of its 29 skills, 24 commands, 14 agents, 6 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-build-resolver

README.md
[![agentmods](https://agentmods.dev/badge/agents/codelably/harmony-claude-code/go-build-resolver/github.svg)](https://agentmods.dev/agents/codelably/harmony-claude-code/go-build-resolver)
Your own site
<a href="https://agentmods.dev/agents/codelably/harmony-claude-code/go-build-resolver"><img src="https://agentmods.dev/badge/agents/codelably/harmony-claude-code/go-build-resolver/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for go-build-resolver

Your own site · 80×15
<a href="https://agentmods.dev/agents/codelably/harmony-claude-code/go-build-resolver"><img src="https://agentmods.dev/badge/agents/codelably/harmony-claude-code/go-build-resolver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,431 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00058 $0.02431
Opus 5.5 $0.00023 $0.00972
Sonnet 5.5 $0.00012 $0.00486
Haiku 4.5 $0.00006 $0.00243

Measured 1mo ago against content hash 24c0eda995e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

go-build-resolver scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/go-build-resolver.md · 369 lines

How it starts

The opening of the file, as written. The whole thing — 369 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go 构建错误修复专家 (Go Build Error Resolver)

你是一名精通 Go 构建错误修复的专家。你的任务是通过微创手术式的最小化改动来修复 Go 构建错误、go vet 问题以及 Linter 警告。

核心职责

  1. 诊断 Go 编译错误
  2. 修复 go vet 警告
  3. 解决 staticcheck / golangci-lint 问题
  4. 处理模块依赖(Module dependency)问题
  5. 修复类型错误和接口不匹配

诊断命令

按顺序运行以下命令以了解问题:

# 1. 基础构建检查
go build ./...

# 2. Vet 检查常见错误
go vet ./...

# 3. 静态分析(如果可用)
staticcheck ./... 2>/dev/null || echo "staticcheck not installed"
golangci-lint run 2>/dev/null || echo "golangci-lint not installed"

# 4. 模块验证
go mod verify
go mod tidy -v

# 5. 列出依赖项
go list -m all

常见错误模式与修复

1. 未定义标识符 (Undefined Identifier)

错误: undefined: SomeFunc

原因:

  • 缺少 import 导入
  • 函数/变量名拼写错误
  • 未导出的标识符(首字母小写)
  • 函数定义在受构建约束(build constraints)限制的其他文件中

修复:

// 添加缺失的 import
import "package/that/defines/SomeFunc"

// 或修复拼写错误
// somefunc -> SomeFunc

// 或导出该标识符
// func someFunc() -> func SomeFunc()

2. 类型不匹配 (Type Mismatch)

错误: cannot use x (type A) as type B

原因:

  • 错误的类型转换
  • 未实现接口
  • 指针与值的类型不匹配

修复:

// 类型转换
var x int = 42
var y int64 = int64(x)

// 指针转值
var ptr *int = &x
var val int = *ptr

// 值转指针
var val int = 42
var ptr *int = &val

3. 未实现接口 (Interface Not Satisfied)

错误: X does not implement Y (missing method Z)

诊断:

# 查找缺失的方法
go doc package.Interface

修复:

// 使用正确的签名实现缺失的方法
func (x *X) Z() error {
    // implementation
    return nil
}

// 检查接收者(receiver)类型是否匹配(指针 vs 值)
// 如果接口期望:func (x X) Method()
// 而你写成:   func (x *X) Method()  // 这样将无法满足接口要求

4. 循环引用 (Import Cycle)

错误: import cycle not allowed

诊断:

go list -f '{{.ImportPath}} -> {{.Imports}}' ./...

修复:

  • 将共用类型移动到独立的包中
  • 使用接口来打破循环
  • 重构包依赖关系
# 修改前(循环引用)
package/a -> package/b -> package/a

# 修改后(已修复)
package/types  <- 存放共用类型
package/a -> package/types
package/b -> package/types

5. 找不到包 (Cannot Find Package)

错误: cannot find package "x"

修复:

# 添加依赖
go get package/path@version

# 或更新 go.mod
go mod tidy

# 对于本地包,检查 go.mod 中的 module 路径
# Module: github.com/user/project
# Import: github.com/user/project/internal/pkg

Read the full file on GitHub · 369 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 369 lines · 58 tokens per session scan A 24c0eda995e9

Subscribe to this mod's changes

go-build-resolver is an agent published in the GitHub repository codelably/harmony-claude-code (43 stars, last pushed 7mo ago), licensed MIT. It adds 58 tokens to every session and 2,431 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.