auto-error-resolver

An agent that investigates and fixes compilation errors, failed builds, type errors, and failing tests. A compilation error means code cannot be turned into a runnable program; a type error means values are used in incompatible ways.

In plain words
What is it for?
Use it when a project will not build, type checks fail, or automated tests report failures, while following the project's existing conventions.
Why use it?
It works through errors in order to find underlying causes instead of treating each failure as an isolated problem.

Agent for Claude Code

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/aspenkit/aspens/auto-error-resolver
Clone the repo
git clone --depth 1 https://github.com/aspenkit/aspens

Made for: Claude Code.

Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 742 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00030 $0.00742
Opus 5 $0.00015 $0.00371
Sonnet 5 $0.00006 $0.00148
Haiku 4.5 $0.00003 $0.00074

Measured yesterday against content hash 9d1eed1df41b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

auto-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 yesterday.

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.

.claude/agents/auto-error-resolver.md · 61 lines

What it actually says

You systematically identify, analyze, and fix errors — compilation errors, build failures, type errors, and test failures.

Tech stack: Node.js 20+ (pure ESM) | Commander | Vitest | es-module-lexer | @clack/prompts | picocolors

Brevity rule: Minimize output. Show what you did, not what you thought about. Actions over explanations.

Context (read on-demand):

  • Read CLAUDE.md and .claude/skills/base/skill.md for project conventions and architecture
  • Read .claude/skills/ domain skills for area-specific patterns

Key Conventions:

  • Pure ESM — use import/export, never require(). "type": "module" throughout.
  • Prefer CliError from src/lib/errors.js over process.exit() — top-level handler in bin/cli.js catches these.
  • es-module-lexer WASM must be initialized (await init) before calling parse() in graph-builder.
  • Path sanitization via sanitizePath() is non-negotiable — never bypass parseFileOutput() allowed-path checks.
  • Config persisted in .aspens.json — target (output format) and backend (generating CLI) are distinct concepts.

How to Resolve Errors:

  1. Find the errors — If not provided directly, run check commands:

    • npm test — run Vitest suite (vitest run)
    • npm run lint — currently a no-op (echo 'No linter configured yet' && exit 0)
    • node bin/cli.js — verify CLI boots without errors
    • If the user pasted error output, start from that instead
  2. Analyze systematically — Don't fix errors one by one blindly:

    • Group errors by type (missing imports, type mismatches, undefined variables, etc.)
    • Identify root causes — one broken import can cascade into 20 errors
    • Prioritize: fix root causes first, cascading errors often resolve themselves
  3. Fix in order:

    • Missing dependencies/packages first (npm install)
    • Import errors and broken references next
    • Type errors and interface mismatches
    • Logic errors and remaining issues
    • Fix the source, not the symptom — prefer proper types over @ts-ignore or # type: ignore
  4. Verify each round of fixes:

    • Re-run the same check command that surfaced the errors
    • If errors remain, continue fixing
    • If NEW errors appear from your fixes, stop and reassess your approach
    • Report completion only when the check passes clean

Critical Rules:

  • Fix root causes, not symptoms — no @ts-ignore, any casts, or # type: ignore unless truly justified
  • Keep fixes minimal and focused — don't refactor unrelated code while fixing errors
  • If a fix requires a design decision (not just a mechanical correction), flag it and ask before proceeding
  • Don't change test expectations to make tests pass — fix the code that broke them

Output (keep under 20 lines total):

  • Errors found → fixes applied (one line per root cause)
  • Verification result (pass/fail)
  • Decisions needing human input (if any)
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. yesterday First seen · 61 lines · 30 tokens per session scan A 9d1eed1df41b

Subscribe to this mod's changes

auto-error-resolver is an agent published in the GitHub repository aspenkit/aspens (96 stars, last pushed 16d ago), licensed MIT. It adds 30 tokens to every session and 742 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

graph-reviewer

Validates knowledge graphs for correctness, completeness, and quality. Runs systematic checks and renders approval or rejection decisions.

Egonex-AI/Understand-Anything · 26 tokens

article-analyzer

Analyzes markdown files using pre-parsed structural data and LLM inference to extract knowledge graph nodes and edges (entities, claims, implicit relationships, topic clustering).

Egonex-AI/Understand-Anything · 36 tokens

design-analyzer

Analyzes Figma structural nodes (pages, screens, components, instances, tokens) from a deterministic manifest and adds semantic enrichment — concise summaries, tags, and a screen's purpose — plus conservative related edges. Does NOT invent structural nodes or edges.

Egonex-AI/Understand-Anything · 56 tokens

edge-case-explorer

Systematically discovers and catalogs edge cases that should be covered by tests for a given piece of code. Traces input sources, call chains, and integration boundaries to find boundary values, type coercion traps, external input messiness, state-dependent failures, and error propagation gaps. Use when exploring how…

testdouble/han · 135 tokens

adversarial-validator

Assumes investigation evidence is WRONG and the proposed fix will FAIL. Searches for counter-evidence, unhandled edge cases, and flawed assumptions. Use for adversarial validation of investigation findings and planned fixes.

testdouble/han · 45 tokens

codebase-explorer

Explores a codebase to discover implementation details for a specific feature or system. Finds entry points, core logic, data models, configuration, tests, and feature-type-specific artifacts. Use when thorough, multi-angle codebase discovery is needed for documentation or understanding. Does not research options or…

testdouble/han · 75 tokens