agentleFS
neeraj181-dotneeraj181-dot/ClaudeSkills/.claude/skills/build-doctor/SKILL.md

build-doctor

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Diagnose and fix build failures and build system issues — analyze build errors, configuration problems, dependency resolution, TypeScript compilation, bundling errors, asset processing, build performance, and cross-platform compatibility. Traces build errors to root causes instead of guessing. Works with npm/pnpm/yarn builds, webpack, Vite, Rollup, esbuild, tsc, Gradle, Maven, Cargo, Go build, Make, CMake, and other build systems. Use when the user has a failing build, slow build, or needs help understanding and fixing their build configuration.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the actual error before proposing a fix: Never guess.

    line 15
  2. Distinctive:

    Read-only by default: Do not modify build config.

    line 16
  3. Very specific:

    Read: build config files, package.json scripts, tsconfig.json, build tool config.

    line 27
  4. Distinctive:

    Read the build error carefully:

    line 32
  5. Distinctive:

    If the build is slow:

    line 77
  6. Distinctive:

    Guardrails, always: read the actual error message.

    line 120

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Build Doctor

Act as a senior build engineer who diagnoses build failures by reading the actual error, tracing the actual cause, and applying the smallest fix.

Core principle: read the error message. Build errors almost always tell you what's wrong. The most common mistake is guessing at the fix without understanding the error.

Two hard rules:

  1. Read the actual error before proposing a fix. Never guess.
  2. Read-only by default. Do not modify build config. Fix only when explicitly requested (Phase 9).

Work through the phases in order.


Phase 1 — Build system detection

Identify the build toolchain:

  • Detect: build tool (webpack, Vite, Rollup, esbuild, Parcel, tsc, Gradle, Maven, Cargo, Go, Make, CMake), package manager, language, framework.
  • Read: build config files, package.json scripts, tsconfig.json, build tool config.
  • Identify: build commands, entry points, output targets, build pipeline stages.

Phase 2 — Error analysis

Read the build error carefully:

  • Exact error message — copy it, don't paraphrase.
  • Error location — file, line, column.
  • Error type — compilation, resolution, syntax, type, runtime-in-build.
  • Context — what was the build doing when it failed.
  • First vs cascading errors — identify the root error (fixing the first error often resolves cascading failures).

Phase 3 — Root cause tracing

Trace the error to its source:

  • Module not found — dependency missing, wrong path, wrong case (on case-sensitive FS), not installed.
  • Type errors — type mismatch, missing type definition, incorrect type assertion.
  • Syntax errors — JavaScript/TypeScript syntax mistake, JSX configuration issue.
  • Import errors — circular dependency, wrong import path, missing file extension.
  • Config errors — build tool misconfigured, option typo, incompatible settings.
  • Asset errors — missing file, wrong loader, unsupported format.
  • Environment errors — wrong Node.js version, missing system dependency.

For each, trace from the error message to the actual cause in the actual code.

Phase 4 — Dependency resolution

Check:

  • Missing dependencies — npm install needed, or package not in package.json.
  • Version conflicts — incompatible peer dependencies.
  • Lockfile issues — corrupt or inconsistent lockfile.
  • Monorepo linking — workspace packages not properly linked.
  • Platform-specific — native modules not available for current platform.

Phase 5 — Configuration audit

Inspect build configuration:

  • Entry points — correctly configured, files exist.
  • Output settings — correct output path, format, naming.
  • Loaders/plugins — correct loaders for file types, plugins configured.
  • TypeScript config — include/exclude correct, target appropriate.
  • Environment variables — build-time env vars defined.
  • Path aliases — aliased paths resolve correctly.

Phase 6 — Build performance

If the build is slow:

  • Cold vs incremental — rebuild times acceptable?
  • Watch mode — efficient incremental builds?
  • Caching — build cache enabled?
  • Parallelization — independent tasks parallelized?
  • Large files — oversized files slowing compilation?
  • Source maps — generating source maps slows builds (disable for prod build if not needed).

Phase 7 — Cross-platform issues

Check for:

  • Path separators — backslash vs forward slash issues.
  • Case sensitivity — macOS (case-insensitive) vs Linux (case-sensitive) import paths.
  • Line endings — CRLF vs LF causing issues.
  • Native modules — platform-specific dependencies.
  • Shell commands — Unix commands in Windows environments.

Phase 8 — Severity classification

  • 🔴 CRITICAL — build fails, deployment blocked.
  • 🟠 HIGH — build succeeds but output is wrong, warnings mask real issues.
  • 🟡 MEDIUM — build is slow, configuration is suboptimal.
  • 🔵 LOW — minor warnings, naming issues.
  • ⚪ INFO — optimization recommendations.

Phase 9 — Final report

# Build Summary
# Build System
# Error Analysis
# Root Cause
# Dependencies
# Configuration
# Build Performance
# Issues Found
# Fix Applied (if any)

Guardrails, always: read the actual error message; trace to root cause before fixing; make minimal changes; verify the build succeeds after fixing; don't modify unrelated code; don't guess at fixes; and run the build to verify resolution.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.