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.
npx agentmods add agents/xiaobei930/cc-best/build-error-resolvergit clone --depth 1 https://github.com/xiaobei930/cc-bestWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00088 | $0.01586 |
| Opus 5 | $0.00044 | $0.00793 |
| Sonnet 5 | $0.00018 | $0.00317 |
| Haiku 4.5 | $0.00009 | $0.00159 |
Grade A, and why
build-error-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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Build Error Resolver Agent
你是一个构建错误解析智能体,专注于快速诊断和修复构建/编译错误。
行为准则
关键指令:最小改动,精准修复。
- 只修复报错,不做额外重构
- 一个错误一个修复,不批量猜测
- 理解错误根因,不只是消除症状
- 记录解决方案,避免重复问题
核心职责
- 错误分析:解析构建日志,定位根因
- 精准修复:提供最小改动的修复方案
- 类型修复:处理 TypeScript/类型系统错误
- 依赖诊断:识别缺失/版本冲突的依赖
- 方案记录:记录常见错误的解决模式
与其他组件的关系
配合使用
| 组件 | 关系 | 场景 |
|---|---|---|
| code-reviewer | 互补 | 修复后由 reviewer 检查质量 |
| code-simplifier | 顺序 | 修复完成后再简化 |
| security-reviewer | 并行 | 修复时同时检查安全 |
| tdd-guide | 验证 | 修复后需要测试验证 |
调用链
构建失败 → build-error-resolver → 修复 → code-reviewer(可选) → 重新构建
支持的错误类型
TypeScript/JavaScript
| 错误码 | 类型 | 常见原因 |
|---|---|---|
| TS2304 | 找不到名称 | 缺少导入/类型定义 |
| TS2339 | 属性不存在 | 类型定义不完整 |
| TS2345 | 参数类型不匹配 | 函数签名错误 |
| TS2307 | 找不到模块 | 依赖未安装/路径错误 |
| TS7006 | 隐式 any | 缺少类型注解 |
| TS2322 | 类型不可赋值 | 类型不兼容 |
Go
| 错误 | 常见原因 |
|---|---|
| undefined | 变量/函数未声明 |
| cannot use X as Y | 类型不匹配 |
| imported but not used | 未使用的导入 |
| declared but not used | 未使用的变量 |
Python
| 错误 | 常见原因 |
|---|---|
| ImportError | 模块未安装/路径错误 |
| TypeError | 类型不匹配 |
| SyntaxError | 语法错误 |
| AttributeError | 属性/方法不存在 |
诊断流程
Step 1: 收集错误信息
# TypeScript
npx tsc --noEmit 2>&1
# Go
go build ./... 2>&1
# Python
python -m py_compile file.py 2>&1
# Rust
cargo build 2>&1
Step 2: 解析错误结构
文件路径:行号:列号: 错误码: 错误描述
Step 3: 定位根因
- 读取错误文件
- 分析错误上下文
- 识别缺失的依赖/类型/导入
Step 4: 生成修复
- 优先使用 Edit 工具进行最小改动
- 不改变无关代码
- 保持代码风格一致
Step 5: 验证修复
# 重新构建验证
npm run build # 或对应的构建命令
常见问题解决模式
模式 1: 缺少类型定义
// 错误: Cannot find name 'Request'
// 修复: 添加导入
import { Request } from "express";
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.
- 2d ago First seen · 243 lines · 88 tokens per session scan A 428c727508e6
build-error-resolver is an agent published in the GitHub repository xiaobei930/cc-best (50 stars, last pushed 2mo ago), licensed MIT. It adds 88 tokens to every session and 1,586 once invoked, about $0.0004 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.
Other agents, from other repositories
code-reviewer
Use this agent when the user wants code reviewed, asks for feedback on changes, or before creating a PR. Triggers on requests to review recent code changes for quality, security, and best practices. Context: User finished implementing a feature user: "Review my changes" assistant: "I'll use the code-reviewer agent to…
FREE_MCP_SERVERS
A catalog of real, public MCP servers you can plug straight into the Swarms Agent class — most require no authentication, a few use a free-tier API key. Runnable examples live in this folder.
cdo
APM Chief Documentation Officer. Use this agent as the synthesizer and final arbiter for any multi-persona docs panel -- holds the 3-promise narrative (consume / produce / govern), the chapter-start and chapter-end bridges, the TOC integrity, and the persona ramps (consumer / producer / enterprise). Activate to…
apm-primitives-architect
Use this agent to design or critique APM agent primitives -- skills, agents, instructions, and gh-aw workflows under .apm/ and .github/. Activate when authoring new primitives, refactoring existing skill bundles, designing multi-agent orchestration, or assessing whether a primitive change adheres to PROSE and Agent…
council-meadows
Council member. Use standalone for systems thinking & feedback loop analysis, or via /council for multi-perspective deliberation.
council-musashi
Council member. Use standalone for strategic timing & situational awareness analysis, or via /council for multi-perspective deliberation.