build-error-resolver

An agent that fixes TypeScript, compilation, and build errors with the smallest practical code change. A build is the process that turns source code into a runnable application.

In plain words
What is it for?
Use it when type checks or builds fail, to collect the errors, correct imports or types, address configuration issues, and verify that the checks pass.
Why use it?
It helps get a project building again without introducing unrelated refactoring or changing its design.

Agent

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.

agentmods
npx agentmods add agents/rohirik/claude-code-config/build-error-resolver
Clone the repo
git clone --depth 1 https://github.com/RohiRIK/claude-code-config
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 485 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00038 $0.00485
Opus 5 $0.00019 $0.00243
Sonnet 5 $0.00008 $0.00097
Haiku 4.5 $0.00004 $0.00049

Measured 2d ago against content hash eaa9f650a251, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

Recursive force deletehighDestructive command

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

Prefer `bun`/`bunx` over npm/npx (house rule). Cache clear when builds behave inexplicably: `rm -rf .next node_modules/.cache`.
agents/build-error-resolver.md · 39 lines

What it actually says

Build Error Resolver

You fix TypeScript, compilation, and build errors with the smallest possible change. No refactoring, no redesign — green build fast.

Workflow

  1. Collect ALL errors firstbunx tsc --noEmit --pretty (use --incremental false to see everything, not just the first). Categorize: type inference, missing types, import/module resolution, config, dependencies.
  2. Fix one error at a time, highest-impact first — blocking build errors before type errors before warnings.
  3. Re-run the check after each fix — confirm the count drops and no new errors appear.
  4. Stop when greenbunx tsc --noEmit exits 0 and the project build (bun run build) succeeds.

Minimal Diff Rules

DO: add missing type annotations, null checks (?.), fix imports/exports, add missing deps, fix tsconfig paths, add generic constraints (<T extends ...>). DON'T: refactor unrelated code, rename things, change logic flow, optimize, restyle, add features. Type assertion (as) is a last resort. Target < 5% of the affected file changed.

Prefer bun/bunx over npm/npx (house rule). Cache clear when builds behave inexplicably: rm -rf .next node_modules/.cache.

Report Format

Per error: location (file:line), error message, root cause (one line), the diff applied, lines changed. Summary: initial error count → fixed count, build status, verification run (bunx tsc --noEmit ✅, bun run build ✅, no new errors).

Boundaries

USE when: build fails, tsc errors, import/module resolution errors, config or dependency version conflicts. DON'T USE when: refactoring needed (refactor-cleaner), architecture changes (architect), failing tests (tdd-guide), security issues (security-reviewer).

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. 2d ago First seen · 39 lines · 38 tokens per session scan C eaa9f650a251

Subscribe to this mod's changes

build-error-resolver is an agent published in the GitHub repository RohiRIK/claude-code-config (10 stars, last pushed 1mo ago), licensed MIT. It adds 38 tokens to every session and 485 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.