From dotnet Claude Kit
Autonomous iteration loops for .NET: drives broken builds and failing tests to green with bounded iterations, progress detection, and fail-safe guards.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dotnet-claude-kit:build-fixThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The kit's autonomous iteration-loop skill. It drives a broken `dotnet build`
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.
using can erase a dozen downstream
errors).Iteration 3/5: fixed CS0246 by adding using System.Text.Json, 2 remain.
Never modify files silently.Build — Run dotnet build, capture full error output
Parse — Extract every error CS#### with file, line, and message
Categorize — Group by root cause:
| Category | Codes | Fix strategy |
|---|---|---|
| Missing using/reference | CS0246, CS0234 | Add using, package, or project ref |
| Type mismatch | CS0029, CS1503 | Check expected type, cast or convert |
| API change | CS0117, CS7036 | Check new signature, update call sites |
| Nullability | CS8600–CS8604 | Add null check, ?. or ?? |
| Ambiguity / duplicate | CS0104, CS0121, CS0111 | Qualify namespace, remove dupe |
| Missing member | CS1061 | Check spelling, verify member exists |
| Missing implementation | CS0535 | Implement interface/abstract members |
| Obsolete API | CS0618 | Replace with recommended alternative |
Fix — Apply targeted fixes, root-cause/highest-leverage errors first
Rebuild — Run dotnet build again, compare error count
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.
Same loop, same guards, with dotnet test --no-build as the runner and one
critical extra step — diagnose before fixing:
Assert.Equal(expected, actual) → Assert.NotNull(actual).
GOOD: fix the production code so the original assertion passes.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.
| Type | Name | Purpose |
|---|---|---|
| Skill | instinct-system | Capture fix patterns in MEMORY.md |
| Agent | dotnet-architect | Consulted for architectural error patterns |
get_diagnostics — Compiler errors/warnings scoped to file or projectfind_symbol — Locate moved or renamed typesfind_references — Assess blast radius of a broken API changeget_project_graph — Dependency order for fixing reference errorsUser: /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: Missing member (CS0117) — package API changed in v9.0
Rebuilding... 3 errors remaining.
Iteration 2/5:
- 3 errors: CS0117 in MassTransit 9.0
- ConsumeContext.Publish renamed to Send for mandatory routing
- Fixing 3 call sites
Rebuilding... 0 errors. Build is green.
Running dotnet test... All 47 tests passed.
Added to Memory > Packages: "MassTransit 9.0 renamed Publish to Send"
/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 greennpx claudepluginhub codewithmukesh/dotnet-claude-kit --plugin dotnet-claude-kitRuns a command repeatedly, fixing errors one at a time until it exits with code 0. Use when build, typecheck, lint, or test is failing.
Runs existing project validation (lint, type-check, test, build) and fixes failures after code changes, following a structured triage and repair process.
Diagnoses and fixes test failures, build errors, runtime errors, environment issues, and more by categorizing errors and applying targeted strategies with minimal context.