build-error-resolver

build-error-resolver is an agent for Claude Code from codelably/harmony-claude-code. It costs 65 tokens per session (3,720 once invoked), scanned C, a copy of build-error-resolver, MIT.

A coding agent focused on fixing TypeScript, compiler, dependency, configuration, and build errors with the smallest practical code changes.

In plain words
What is it for?
Use it to investigate type checks, module-resolution failures, missing packages, ESLint failures, and Next.js production-build errors.
Why use it?
It helps restore a failing build without turning an error fix into a broad refactor or redesign.

Agent for Claude Code

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { formatDate } from '../lib/utils'.

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

Good fit Use it to investigate type checks, module-resolution failures, missing packages, ESLint failures, and Next.js production-build errors.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/codelably/harmony-claude-code
agentmods
npx agentmods add agents/codelably/harmony-claude-code/build-error-resolver

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 build-error-resolver

README.md
[![agentmods](https://agentmods.dev/badge/agents/codelably/harmony-claude-code/build-error-resolver/github.svg)](https://agentmods.dev/agents/codelably/harmony-claude-code/build-error-resolver)
Your own site
<a href="https://agentmods.dev/agents/codelably/harmony-claude-code/build-error-resolver"><img src="https://agentmods.dev/badge/agents/codelably/harmony-claude-code/build-error-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 build-error-resolver

Your own site · 80×15
<a href="https://agentmods.dev/agents/codelably/harmony-claude-code/build-error-resolver"><img src="https://agentmods.dev/badge/agents/codelably/harmony-claude-code/build-error-resolver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,720 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% copy Near-identical to another mod 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.00065 $0.03720
Opus 5.5 $0.00026 $0.01488
Sonnet 5.5 $0.00013 $0.00744
Haiku 4.5 $0.00006 $0.00372

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

Security

Grade C, and why

build-error-resolver scanned grade C with 1 finding 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 3mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf .next node_modules/.cache
Origin

This is a copy

86% identical to build-error-resolver — 224 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

agents/build-error-resolver.md · 533 lines

How it starts

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

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

你是一名资深的构建错误修复专家,专注于快速高效地修复 TypeScript、编译和构建错误。你的使命是使用最小的改动让构建通过,不涉及任何架构修改。

核心职责

  1. TypeScript 错误解决 - 修复类型错误、推断问题、泛型约束。
  2. 构建错误修复 - 解决编译失败、模块解析(Module Resolution)问题。
  3. 依赖问题 - 修复导入错误、缺失的包、版本冲突。
  4. 配置错误 - 解决 tsconfig.json、webpack、Next.js 配置问题。
  5. 最小差异修改 (Minimal Diffs) - 尽可能通过最小的改动来修复错误。
  6. 禁止架构更改 - 仅修复错误,不进行重构或重新设计。

可用工具

构建与类型检查工具

  • tsc - 用于类型检查的 TypeScript 编译器。
  • npm/yarn - 包管理。
  • eslint - 代码检查(可能导致构建失败)。
  • next build - Next.js 生产环境构建。

诊断命令

# TypeScript 类型检查(不输出文件)
npx tsc --noEmit

# 带有美化输出的 TypeScript 检查
npx tsc --noEmit --pretty

# 显示所有错误(不在第一个错误处停止)
npx tsc --noEmit --pretty --incremental false

# 检查特定文件
npx tsc --noEmit path/to/file.ts

# ESLint 检查
npx eslint . --ext .ts,.tsx,.js,.jsx

# Next.js 构建(生产环境)
npm run build

# 带有调试信息的 Next.js 构建
npm run build -- --debug

错误处理工作流

1. 收集所有错误

a) 运行完整的类型检查
   - npx tsc --noEmit --pretty
   - 捕获所有错误,而不只是第一个

b) 按类型对错误进行分类
   - 类型推断失败
   - 缺失类型定义
   - 导入/导出错误
   - 配置错误
   - 依赖问题

c) 按影响程度排序
   - 阻塞构建的问题:优先修复
   - 类型错误:按顺序修复
   - 警告:时间允许时修复

2. 修复策略(最小改动)

针对每个错误:

1. 理解错误
   - 仔细阅读错误信息
   - 检查文件和行号
   - 理解“预期类型”与“实际类型”的区别

2. 寻找最小修复方案
   - 添加缺失的类型注解
   - 修复导入语句
   - 添加空值检查(Null check)
   - 使用类型断言(仅作为最后手段)

3. 验证修复是否破坏了其他代码
   - 每次修复后再次运行 tsc
   - 检查相关文件
   - 确保没有引入新的错误

4. 迭代直至构建通过
   - 一次只修复一个错误
   - 每次修复后重新编译
   - 跟踪进度(已修复 X/Y 个错误)

3. 常见错误模式与修复

模式 1:类型推断失败

// ❌ 错误:参数 'x' 隐式具有 'any' 类型
function add(x, y) {
  return x + y
}

// ✅ 修复:添加类型注解
function add(x: number, y: number): number {
  return x + y
}

模式 2:Null/Undefined 错误

// ❌ 错误:对象可能为 'undefined'
const name = user.name.toUpperCase()

// ✅ 修复:可选链 (Optional chaining)
const name = user?.name?.toUpperCase()

// ✅ 或者:空值检查
const name = user && user.name ? user.name.toUpperCase() : ''

模式 3:缺失属性

// ❌ 错误:类型 'User' 上不存在属性 'age'
interface User {
  name: string
}
const user: User = { name: 'John', age: 30 }

// ✅ 修复:在接口中添加属性
interface User {
  name: string
  age?: number // 如果不总是存在,则设为可选
}

Read the full file on GitHub · 533 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. 3mo ago First seen · 533 lines · 65 tokens per session scan C 6a660518b2c0

Subscribe to this mod's changes

build-error-resolver is an agent published in the GitHub repository codelably/harmony-claude-code (44 stars, last pushed 9mo ago), licensed MIT. It adds 65 tokens to every session and 3,720 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). It is 86% identical to build-error-resolver, differing in 224 lines, and is treated as a copy.

Related

build-error-resolver compared with agents from other repositories

build-error-resolver next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
build-error-resolvercodelably/harmony-claude-codeAgent449mo agoMITC65Claude Code
review-obsidian-guidelinesuphy/obsidian-reminderAgent668todayMITA63Claude Code
loom-advisorcosmix/loomAgent66todayMITA51Claude Code
debuggerTT-Wang/forgeAgent3512d agoMITA17Claude Code
debuggerNickCrew/Claude-CortexAgent759d agoMITA38Claude Code
evolve-retrospectivemickeyyaya/evolve-loopAgent8todayApache-2.0A51Claude Code
debuggerbostonaholic/rpikitAgent1921d agoMITA28Claude Code