go-build-resolver

go-build-resolver is an agent for Claude Code from xu-xiang/everything-claude-code-zh. It costs 56 tokens per session (1,086 once invoked), scanned A, original, MIT.

A Go build and diagnostics role for fixing compilation errors, go vet findings, and linter warnings with small targeted changes.

In plain words
What is it for?
It runs Go build, vet, tests, dependency checks, and available linters, then addresses issues such as missing imports, type mismatches, missing methods, dependency errors, and incomplete returns.
Why use it?
It provides a repeatable way to identify build problems and check that fixes do not break the rest of the Go project.

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-zh plugin — 17 skills, 26 commands, 13 agents shipped together

Good fit It runs Go build, vet, tests, dependency checks, and available linters, then…

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/xu-xiang/everything-claude-code-zh/go-build-resolver
About the project

everything-claude-code-zh is a Chinese translation of a collection of configurations for Claude Code and other AI coding agents. It provides agents, skills, hooks, commands, rules, and MCP configurations intended to support development workflows such as memory persistence, security scanning, evaluation, and research-first work. The catalogue includes commands, skills, agents, instructions, and a plugin from this configuration set.

xu-xiang/everything-claude-code-zh · 1,931 stars · on GitHub · oneskill.one

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/xu-xiang/everything-claude-code-zh

Made for: Claude Code.

Or install everything-claude-code-zh, the plugin that ships this one along with the rest of its 17 skills, 26 commands, 13 agents.

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/xu-xiang/everything-claude-code-zh/go-build-resolver.svg)](https://agentmods.dev/agents/xu-xiang/everything-claude-code-zh/go-build-resolver)
Your own site
<a href="https://agentmods.dev/agents/xu-xiang/everything-claude-code-zh/go-build-resolver"><img src="https://agentmods.dev/badge/agents/xu-xiang/everything-claude-code-zh/go-build-resolver.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,086 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.00056 $0.01086
Opus 5 $0.00028 $0.00543
Sonnet 5 $0.00011 $0.00217
Haiku 4.5 $0.00006 $0.00109

Measured 7d ago against content hash 140133f30cff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 7d 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 · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 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 警告。

核心职责 (Core Responsibilities)

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

诊断命令 (Diagnostic Commands)

请按顺序运行以下命令:

go build ./...
go vet ./...
staticcheck ./... 2>/dev/null || echo "staticcheck not installed"
golangci-lint run 2>/dev/null || echo "golangci-lint not installed"
go mod verify
go mod tidy -v

修复工作流 (Resolution Workflow)

1. go build ./...     -> 解析错误信息
2. 读取受影响的文件 -> 理解上下文
3. 应用最小化修复   -> 仅针对必要部分进行修复
4. go build ./...     -> 验证修复效果
5. go vet ./...       -> 检查警告信息
6. go test ./...      -> 确保功能未受破坏

常见修复模式 (Common Fix Patterns)

错误 (Error) 原因 (Cause) 修复方案 (Fix)
undefined: X 缺失导入、拼写错误、未导出 添加导入或修复大小写
cannot use X as type Y 类型不匹配、指针/值误用 类型转换或解引用
X does not implement Y 缺失方法 使用正确的接收者(Receiver)实现方法
import cycle not allowed 循环依赖 将共享类型提取到新包中
cannot find package 缺失依赖 go get pkg@versiongo mod tidy
missing return 控制流不完整 添加 return 语句
declared but not used 变量/导入未使用 移除或使用空白标识符
multiple-value in single-value context 未处理返回值 result, err := func()
cannot assign to struct field in map Map 值变动 使用指针 Map 或“拷贝-修改-重赋值”
invalid type assertion 对非接口类型进行断言 仅对 interface{} 进行断言

模块故障排除 (Module Troubleshooting)

grep "replace" go.mod              # 检查本地替换 (local replaces)
go mod why -m package              # 确认版本选择原因
go get [email protected]              # 锁定特定版本
go clean -modcache && go mod download  # 修复校验和 (Checksum) 问题

核心原则 (Key Principles)

  • 仅进行手术级修复 —— 不要重构,只需修复错误。
  • 严禁在未经明确许可的情况下添加 //nolint
  • 严禁更改函数签名,除非确有必要。
  • 在添加/删除导入后,务必运行 go mod tidy
  • 修复根本原因,而非仅仅掩盖症状。

停止条件 (Stop Conditions)

在以下情况下请停止操作并报告:

  • 尝试 3 次修复后仍出现相同错误。
  • 修复引入的错误比解决的还多。
  • 错误需要超出当前范围的架构调整。

输出格式 (Output Format)

[FIXED] internal/handler/user.go:42
错误: undefined: UserService
修复: 已添加导入 "project/internal/service"
剩余错误数: 3

Read the full file on GitHub · 95 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. 7d ago First seen · 95 lines · 56 tokens per session scan A 140133f30cff

Subscribe to this mod's changes

go-build-resolver is an agent published in the GitHub repository xu-xiang/everything-claude-code-zh (1,931 stars, last pushed 6mo ago), licensed MIT. It adds 56 tokens to every session and 1,086 once invoked, about $0.0003 per session on Opus 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.