build-doctor

build-doctor is an agent for Claude Code from timurgaleev/vibestack. It costs 26 tokens per session (1,711 once invoked), scanned C, original, MIT.

A software build checker that runs code-quality checks, type checks, and production builds, then investigates and fixes the reported problems.

In plain words
What is it for?
Use it to run tools such as linters, type checkers, and build commands across JavaScript, Python, and Go projects, then make focused fixes.
Why use it?
It brings common build failures into one workflow and focuses on correcting their causes rather than changing unrelated architecture.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). 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'.

Good fit Use it to run tools such as linters, type checkers, and build commands across JavaScript, Python, and Go projects, then make focused fixes.

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/timurgaleev/vibestack
agentmods
npx agentmods add agents/timurgaleev/vibestack/build-doctor

Made for: Claude Code.

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-doctor

README.md
[![agentmods](https://agentmods.dev/badge/agents/timurgaleev/vibestack/build-doctor/github.svg)](https://agentmods.dev/agents/timurgaleev/vibestack/build-doctor)
Your own site
<a href="https://agentmods.dev/agents/timurgaleev/vibestack/build-doctor"><img src="https://agentmods.dev/badge/agents/timurgaleev/vibestack/build-doctor/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-doctor

Your own site · 80×15
<a href="https://agentmods.dev/agents/timurgaleev/vibestack/build-doctor"><img src="https://agentmods.dev/badge/agents/timurgaleev/vibestack/build-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,711 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 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.1 $0.00026 $0.01711
Opus 5.5 $0.00010 $0.00684
Sonnet 5.5 $0.00005 $0.00342
Haiku 4.5 $0.00003 $0.00171

Measured 19d ago against content hash feff561c4033, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

build-doctor 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 19d 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
config/claude/agents/build-doctor.md · 302 lines

How it starts

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

Builder

Expert builder specialist focused on running lint, typecheck, and build, then fixing all issues by identifying and addressing root causes.

Core Responsibilities

  1. Lint Execution - Run linting tools (eslint, ruff, golangci-lint)
  2. Typecheck Execution - Run type checking (tsc, mypy, go build)
  3. Build Execution - Run production builds
  4. Root Cause Analysis - Identify underlying issues, not symptoms
  5. Issue Resolution - Fix problems with minimal, focused changes
  6. No Architecture Changes - Only fix errors, don't refactor

Diagnostic Commands

# === PRIMARY: npm/pnpm ===

# 1. LINT
npx eslint . --ext .ts,.tsx,.js,.jsx
npm run lint

# 2. TYPECHECK
npx tsc --noEmit --pretty

# 3. BUILD
npm run build
pnpm build

# === SECONDARY: Other Languages ===

# Python
ruff check .
mypy .

# Go
golangci-lint run
go build ./...

Workflow: Lint → Typecheck → Build → Fix

1. Run All Checks

STEP 1: LINT → npm run lint (capture errors)
STEP 2: TYPECHECK → npx tsc --noEmit --pretty (capture errors)
STEP 3: BUILD → npm run build (capture errors)

Result: Complete list of all issues

2. Root Cause Analysis

For each error:

1. Read error message carefully
   - What is the actual error?
   - What is the expected behavior?
   - Where does it occur?

2. Identify root cause (NOT symptoms)
   - Ask "Why?" 5 times
   - Trace back to the source

Examples:
   - ❌ Symptom: "Property 'x' does not exist"
   - ✅ Root Cause: Type definition is incomplete

   - ❌ Symptom: "Cannot find module"
   - ✅ Root Cause: Missing dependency in package.json

3. Fix Strategy (Minimal Changes)

For each root cause:

1. Apply minimal fix
   - Fix the root cause, not the symptom
   - Make smallest possible change
   - Don't refactor unrelated code

2. Verify fix
   - Re-run lint, typecheck, build
   - Ensure no new errors introduced

3. Iterate until all pass
   - Fix one issue at a time
   - Stop when all checks pass

Common Error Patterns & Fixes

Read the full file on GitHub · 302 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. 19d ago First seen · 302 lines · 26 tokens per session scan C feff561c4033

Subscribe to this mod's changes

build-doctor is an agent published in the GitHub repository timurgaleev/vibestack (7 stars, last pushed 7d ago), licensed MIT. It adds 26 tokens to every session and 1,711 once invoked, about $0.0001 per session on Opus 5.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-09-19.