Build Fix logo

Build Fix

Organization
codewithmukesh
build-fix

Autonomous iteration loops for .NET: drive a broken build or failing test suite to green with bounded iterations, progress detection, and fail-safe guards that prevent infinite retries and wasted tokens. The build-fix loop (dotnet build, parse, categorize, fix, rebuild) is the primary flow; the test-fix loop is a first-class variant. Invoke when the build is broken, after a major refactor or dependency update, or when the user says "fix the build", "build is broken", "make it compile", "make the tests pass", "fix failing tests", "keep going until it works", "autonomous", "loop", "auto-fix", or "keep fixing".

Overview

Publishercodewithmukesh
Repositorydotnet-claude-kit
Skill namebuild-fix
Stars
721
Forks
170
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by codewithmukesh on GitHub. Read the source before you install it.

Installation

Install the Build Fix AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git /tmp/dotnet-claude-kit
mkdir -p .claude/skills
cp -r /tmp/dotnet-claude-kit/skills/build-fix .claude/skills/build-fix
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Build Fix in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Build Fix on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Build Fix is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

/build-fix

What

The kit's autonomous iteration-loop skill. It drives a broken dotnet build (or failing dotnet test) to green by looping: run, parse failures, categorize by root cause, apply targeted fixes, re-run. It repeats until green or a guard fires — the same way an experienced developer works through a wall of red, but with hard limits that stop it from thrashing.

This is not a single-pass fix. It handles cascading errors where fixing one issue reveals the next.

When

  • The build is broken and there are multiple compiler errors
  • Tests are failing after code changes or a build-fix pass
  • After a major refactor that touched type names, namespaces, or signatures
  • After updating NuGet packages (especially major version bumps)
  • After merging a branch with conflicts resolved but not compiled
  • After scaffolding or code generation that needs manual adjustments
  • User says: "fix the build", "make it compile", "make the tests pass", "keep going until it works", "keep fixing"

How

Loop Discipline (applies to every loop)

  1. Bounded iteration, always — Default max 5 iterations, hard cap 10 (user "keep going" extends by 3, never past 10). If 5 iterations cannot solve it, the problem needs human judgment, not a 6th identical attempt.
  2. Progress or exit — Each iteration must reduce the error/failure count. Same errors after a fix attempt = STUCK: stop, report, and re-plan with a different approach. Never retry the same fix that already failed.
  3. Categorize before fixing — Group errors by root cause and fix the highest-leverage first (one missing using can erase a dozen downstream errors).
  4. Transparency per iteration — Report what changed and why: Iteration 3/5: fixed CS0246 by adding using System.Text.Json, 2 remain. Never modify files silently.
  5. Atomicity — Each iteration leaves the codebase no worse than before. If iteration 3 fails, the code stays in iteration 2's state.

Primary Flow: Build-Fix Loop (max 5 iterations)

  1. Build — Run dotnet build, capture full error output

  2. Parse — Extract every error CS#### with file, line, and message

  3. Categorize — Group by root cause:

    CategoryCodesFix strategy
    Missing using/referenceCS0246, CS0234Add using, package, or project ref
    Type mismatchCS0029, CS1503Check expected type, cast or convert
    API changeCS0117, CS7036Check new signature, update call sites
    NullabilityCS8600–CS8604Add null check, ?. or ??
    Ambiguity / duplicateCS0104, CS0121, CS0111Qualify namespace, remove dupe
    Missing memberCS1061Check spelling, verify member exists
    Missing implementationCS0535Implement interface/abstract members
    Obsolete APICS0618Replace with recommended alternative
  4. Fix — Apply targeted fixes, root-cause/highest-leverage errors first

  5. Rebuild — Run dotnet build again, compare error count

  6. Evaluate — Zero errors: run dotnet test as a sanity check, report success. Fewer errors: continue. Same errors: STUCK — exit and re-plan. More errors: revert the iteration, report REGRESSION.

Variant: Test-Fix Loop (max 5; 3 if it follows a build-fix pass)

Same loop, same guards, with dotnet test --no-build as the runner and one critical extra step — diagnose before fixing:

  1. Read the test — understand the assertion and setup
  2. Read the production code — understand the actual behavior
  3. Decide where the bug lives: wrong expectation → fix the test; production bug → fix the code; incomplete setup → fix the setup; contract changed → update the test to match
  4. Never weaken an assertion to make a test pass. BAD: Assert.Equal(expected, actual)Assert.NotNull(actual). GOOD: fix the production code so the original assertion passes.

Fail-Safe Guards (immediate exit)

  • STUCK — same errors/failures after a fix, or count oscillates (3 → 2 → 3): report what could not be fixed and what a human should check
  • REGRESSION — an iteration introduced more errors than it fixed: revert its changes, report
  • Cascading failures — fixing one error spawns 3+ new ones twice in a row: the approach is wrong, stop
  • Critical error — wrong SDK, missing project file, corrupted solution, or the test runner itself fails: human intervention needed, stop
  • User interruption — finish the current iteration, report progress, ask how to proceed

Other Loops

The same discipline — bounded iterations, progress detection, fail-safe guards — governs refactor passes (/de-sloppify: verify build + tests after each target, revert on failure) and scaffolding (/scaffold: generate, then run nested build-fix and test-fix loops). Nested loops get a smaller budget (parent 5 → nested 3), max nesting depth 2, total budget 15.

Invokes

TypeNamePurpose
Skillinstinct-systemCapture fix patterns in MEMORY.md
Agentdotnet-architectConsulted for architectural error patterns

MCP Tools Used

  • get_diagnostics — Compiler errors/warnings scoped to file or project
  • find_symbol — Locate moved or renamed types
  • find_references — Assess blast radius of a broken API change
  • get_project_graph — Dependency order for fixing reference errors

Example

User: /build-fix

Claude: Running dotnet build...
  Found 12 errors across 4 files.

  Iteration 1/5:
  - 6 errors: Missing namespace (CS0246) — adding using directives
  - 3 errors: Type mismatch (CS1503) — updating method signatures
  - 3 errors: Interface not implemented (CS0738) — package API changed

  Rebuilding... 3 errors remaining.

  Iteration 2/5:
  - 3 errors: CS0738 after xunit.v3 upgrade
    - IAsyncLifetime.InitializeAsync now returns ValueTask (was Task in v2),
      and DisposeAsync comes from IAsyncDisposable
    - Updating 3 test fixtures to the ValueTask signatures

  Rebuilding... 0 errors. Build is green.

  Running dotnet test... All 47 tests passed.
  Added to Memory > Packages: "xunit.v3 IAsyncLifetime uses ValueTask signatures"

Related

  • /verify — Full verification pass (build + test + format + diagnostics)
  • /tdd — Red-green-refactor when building new features test-first
  • /de-sloppify — Clean up code quality issues after the build is green

Frequently asked questions

What does the Build Fix AI skill do?

Autonomous iteration loops for .NET: drive a broken build or failing test suite to green with bounded iterations, progress detection, and fail-safe guards that prevent infinite retries and wasted tokens. The build-fix loop (dotnet build, parse, categorize, fix, rebuild) is the primary flow; the test-fix loop is a first-class variant. Invoke when the build is broken, after a major refactor or dependency update, or when the user says "fix the build", "build is broken", "make it compile", "make the tests pass", "fix failing tests", "keep going until it works", "autonomous", "loop", "auto-fix",...

Why use Build Fix on TypingMind?

Because you install it once and use it with any model. Build Fix is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Build Fix in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/build-fix. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Build Fix?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Build Fix?

As many as you like. As long as a model supports skills, you can use Build Fix with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Build Fix AI skill free?

Yes. It is published on GitHub by codewithmukesh under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇