build-fix
Incrementally fix dotnet build errors with minimal diffs, one error at a time
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Incrementally fix dotnet build errors with minimal diffs, one error at a time
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Author a culture's armor items and swap troop equipment rosters via the generator + validation pipeline. Use when adding/revamping armor. Enforces the canonical-folder + cover-attribute rules.
Give DOTS lords lore-driven skill values and traits via the DOTS SkillSet system. Use when a canonical lord has wrong stats or a culture roster needs a balance pass.
Author or revamp a DOTS culture's armor set, troop tree, and recruitment wiring end-to-end. Use for new cultures or troop-tree revamps. Follows docs/ai-includes/new-culture-authoring.md.
Use when reviewing an external repo or article to adopt practices into DOTS โ security-vet first, map novel vs duplicative, port (never install), review, commit your changes.
Structured 4-phase self-debug for failing agent runs (looping, drifting, burning tokens). Capture, diagnose, contained recovery, report. Complements /investigate (which is for code bugs); this skill is for harness/agent failures.
Dispatch an independent Codex verification job directly via `codex exec` Bash call, then retrieve and present results
| name | build-fix |
| description | Incrementally fix dotnet build errors with minimal diffs, one error at a time |
| argument-hint | [{"optional":"specific error or file to focus on"}] |
Incrementally fix build errors with minimal, safe changes. Fix the error, not the architecture.
dotnet build Main --no-restore 2>&1
Capture the full output. If build succeeds, report success and stop.
error CS#### lines from build outputFor each error:
dotnet build Main --no-restore 2>&1 to verifyTrack attempts per error. An "attempt" is one Edit + re-build cycle targeting the same error code at the same file location.
| Attempts on the same error | Action |
|---|---|
| 1 | Try the most likely fix. |
| 2 | If first didn't work, re-Read the file (it may be stale) and try a different approach. |
| 3 | Final attempt โ the third fix should look meaningfully different from the first two. |
| 4+ | STOP. Do not iterate further. Report what you tried and ask the user. |
The error code/file location counts as "the same" only when the build output line is identical or near-identical. A genuinely-changed error (different code, different file, or moved line >5 away) resets the counter โ but flag if you suspect cascading whack-a-mole.
STOP and ask the user (or escalate to a more appropriate skill) if any of these are true:
| Condition | Escalate to |
|---|---|
| Retry budget triggers (4th attempt on same error) | /investigate โ root-cause workflow with auto-scope-lock |
| A fix introduces more errors than it resolves | /investigate โ likely a wrong-layer fix |
| The fix requires architectural changes | Stop. Ask the user. May warrant /new-adr or /scope-check. |
| Errors stem from missing NuGet packages | Run dotnet restore, then resume. If that doesn't help, report (env failure). |
| Errors stem from TaleWorlds API changes | /research first โ verify v1.3.15 signatures via ilspycmd, NOT the v1.4 decompile |
| Errors stem from environment problems (path, permissions, missing tools) | Report, don't fix โ see .claude/rules/environment-failures.md |
After all errors are fixed (or guardrails triggered):
BUILD FIX REPORT
================
Errors fixed: X
- CS0246 in Main/Features/Foo/FooService.cs (missing using)
- CS0103 in Main/Features/Foo/Hooks/FooHook.cs (renamed method)
Errors remaining: Y (if any)
New errors introduced: 0 (should always be zero)
Build status: PASS/FAIL
| Error | Typical Fix |
|---|---|
CS0246: type or namespace not found | Add missing using statement or NuGet reference |
CS0103: name does not exist | Fix typo, add using, or update to renamed API |
CS0535: does not implement interface member | Add missing method to class |
CS0115: no suitable method found to override | Check v1.3 API changes โ method signature may have changed |
CS0029: cannot implicitly convert type | Add cast or fix type mismatch |
CS0234: type or namespace does not exist in namespace | v1.2->v1.3 namespace change โ use /research to find new location |
CS0012: type defined in unreferenced assembly | Add assembly reference to .csproj |
CS8602: dereference of possibly null reference | Add null check or ! operator |
DO:
using statementsDON'T:
#pragmaDirectory.Build.propsdotnet test DOTS.Tests instead/new-feature or plan mode/research firstIf $ARGUMENTS is provided, focus on that specific file or error first.