/dotnet-agent-kit:build-fixfrom dotnet Agent Kit
Autonomous loop that drives a broken .NET build or failing tests to green with bounded iterations and retry guards. Use for 'fix the build', 'make it compile', 'fix failing tests', 'keep going until it works'.
Ships in dotnet Agent Kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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 |
| Skill | architecture-advisor | 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: 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"
/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 greenWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
build-fix, dotnet-build, test-fix, autonomous-loop, compiler-error-fix
37 skills in this plugin
/api-hardeningProduction hardening for ASP.NET Core 10 APIs: HSTS, forwarded headers behind a proxy (KnownIPNetworks), strict CORS, body and upload limits, security headers, no detailed errors. Use for "HSTS", "forwarded headers", "behind nginx", "CORS", "request size limit", "security headers", "harden for production". Do NOT use for auth (use authentication) or throttling (use rate-limiting).
/architecture-advisorArchitecture selection for new or restructured .NET solutions: asks about domain, team and compliance, then recommends modular slices (default), vertical slice, Clean Architecture or DDD. Use for "which architecture", "new solution", "restructure", "DDD", "project structure", "tech stack". Do NOT use for adding features to a modular-slices codebase (modular-slices), scaffolding (scaffold), or CLAUDE.md (dotnet-init).
/npx claudepluginhub codewithmukesh/dotnet-agent-kit --plugin dotnet-agent-kitOther plugins' skills for the same job