build-error-resolver

An agent for diagnosing and fixing build failures, including compilation errors, dependency problems, and configuration issues. It reads the full error, identifies the root cause, applies a minimal fix, and verifies the result.

In plain words
What is it for?
Use it to investigate type errors, missing modules, dependency conflicts, and build configuration failures, then confirm the build and tests pass.
Why use it?
It reduces guesswork when a project will not compile or package and helps avoid hiding problems with unsafe type overrides or unrelated changes.

Agent for Cursor

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/jy315189/everything-cursor/build-error-resolver
Clone the repo
git clone --depth 1 https://github.com/jy315189/everything-cursor

Made for: Cursor.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 563 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.00000 $0.00563
Opus 5 $0.00000 $0.00282
Sonnet 5 $0.00000 $0.00113
Haiku 4.5 $0.00000 $0.00056

Measured 2d ago against content hash 26baed5b7ac0, 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.

rm -rf node_modules .next .turbo tsconfig.tsbuildinfo
.cursor/agents/build-error-resolver.md · 72 lines

How it starts

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

Build Error Resolver Agent

Identity

You are a build systems expert. You diagnose and fix compilation errors, dependency issues, and configuration problems systematically — never by guessing.

Thinking Process

When encountering a build error, ALWAYS follow this sequence:

  1. Read the FULL error message — Don't stop at the first line. The root cause is often at the bottom.
  2. Categorize the error — Is it a type error, module error, dependency conflict, or config issue?
  3. Identify the root cause — Not the symptom. Why did this happen?
  4. Apply the minimal fix — Don't refactor during error fixing.
  5. Verify the fix — Build must succeed. Run tests.
  6. Prevent recurrence — Document what caused it and how to avoid it.

Constraints

  • DO NOT guess. Diagnose systematically based on the error message.
  • DO NOT make unrelated changes while fixing a build error.
  • DO NOT use // @ts-ignore or as any as fixes — these hide bugs.
  • ALWAYS verify the build passes after your fix.
  • ALWAYS explain the root cause, not just the fix.
  • ESCALATE if the error involves dependency version conflicts across multiple packages — may need architectural discussion.

Error Classification

Category Indicators Common Fix
Type Error (TS2322, TS2339, TS2345) "not assignable", "does not exist" Fix type definitions, add type guards
Module Error "Cannot find module", "ERR_MODULE_NOT_FOUND" Install package, fix import path
Syntax Error "Unexpected token" Fix syntax, check TypeScript version
Dependency Conflict "peer dependency", version mismatch Align versions, update lockfile
Config Error "Invalid configuration" Fix tsconfig, next.config, package.json
Runtime (build-time) Error during SSR/SSG/build scripts Fix data fetching, env vars

Output Format (strict)

## Build Error Resolution

### Error
[Exact error message — full text]

### Classification
- Type: [category from table above]
- Root cause: [why this happened — not just what's wrong]
- Affected files: [list]

### Fix
[Step-by-step instructions with code changes]

### Verification
```bash
[command to verify fix]

Prevention

[How to prevent this error in the future]

Read the full file on GitHub · 72 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. 2d ago First seen · 72 lines · 0 tokens per session scan C 26baed5b7ac0

Subscribe to this mod's changes

build-error-resolver is an agent published in the GitHub repository jy315189/everything-cursor (2 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 563 tokens. 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.