build-fix
Skill808 starsChanged 4 months agoMITView on GitHub
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".
13 other projects use a version of this.
Adopted by
Most recently taken up by
- woosikkim/oh-my-claudecode-slimtheir own version, first seen Nov 8, 2026
- majay123/my-embedded-skillstheir own version, first seen Nov 8, 2026
- lza6/claw-code-tingfengtheir own version, first seen Nov 1, 2026
- jh941213/my-cc-harnesstheir own version, first seen Nov 1, 2026
- jh941213/ADLC-harnesstheir own version, first seen Nov 1, 2026
- excatt/superclaude-plusplustheir own version, first seen Oct 13, 2026
Used with
Projects with it also use docs-ci, docs-interfaces and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
jh941213Skilldocs-ci
문서 CI(링크·OpenAPI lint·breaking 게이트·mermaid 검증)나 문서 드리프트 감지(docs.yaml 신선도 검사)를 설치하거나 돌릴 때 사용. 문서 내용 작성은 docs-architecture·docs-interfaces·docs-manuals.
Also in 3 projects that use this
jh941213Skilldocs-interfaces
API·이벤트 인터페이스 문서(OpenAPI·swagger·AsyncAPI 명세, 엔드포인트 레퍼런스, API 구성도·시퀀스, API CHANGELOG)를 만들거나 코드와 맞출 때 사용. 시스템 구성도는 docs-architecture, API 설계 원칙은 api-design-principles.
Also in 3 projects that use this
TheKREATORSSkillinstinct-export
Export instincts from project/global scope to a file
Also in 3 projects that use this
TheKREATORSSkillinstinct-import
Import instincts from file or URL into project/global scope
Also in 3 projects that use this
RachaelQuiselSkillclient-docs
Client documentation. Use when a build needs documentation updates or missing project documents need to be identified.
Also in 3 projects that use this
planailabsSkilldocs-architecture
Layout, build pipeline, and structural gotchas for this dual-Astro repo. Read before changing structure, routing, or adding content. Operational/dev-server questions → dev-build skill.
Also in 3 projects that use this
- +4 more from jh941213
- +1 more from TheKREATORS
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- jh941213/ADLC-harness★ 125same name
- jh941213/my-cc-harness★ 125same name
- jh941213/my-claude-code-asset★ 125same name
- jmylchreest/aide★ 19same name
- excatt/superclaude-plusplus★ 14same name
- bis-code/claude-toolkit★ 8same name
- majay123/my-embedded-skills★ 8same name
- lza6/claw-code-tingfeng★ 5same name
- PatriotAgenticLLC/better_claude_skillz★ 3same name
- peopleforrester/claude-dotfiles★ 3same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository57 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/rules/agents.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- .opencode/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/dotnet-rules.mdCursor rule
- api-versioningSkill
- arch-checkSkill
- architecture-advisorSkill
- aspireSkill
- authenticationSkill
- avaloniaSkill
- cachingSkill
- checkpointSkill
- ci-cdSkill
- clean-architectureSkill
- code-reviewSkill
- configurationSkill
- console-cliSkill
- container-publishSkill
- convention-learnerSkill
- dddSkill
- dependency-injectionSkill
- desktop-mvvmSkill
- de-sloppifySkill
- dockerSkill
- dotnet-initSkill
- ef-coreSkill
- error-handlingSkill
- health-checkSkill
- httpclient-factorySkill
- instinct-systemSkill
- loggingSkill
- messagingSkill
- migrateSkill
- minimal-apiSkill
- modern-csharpSkill
- native-aotSkill
- openapiSkill
- opentelemetrySkill
- outdatedSkill
- planSkill
- project-setupSkill
- project-structureSkill
- resilienceSkill
- scaffoldSkill
- scalarSkill
- security-scanSkill
- serilogSkill
- specSkill
- tddSkill
- testingSkill
- token-reportSkill
- verifySkill
- vertical-sliceSkill
- workflow-masterySkill
- wrap-upSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
After a major refactor that touched type names, namespaces, or signatures
- Distinctive: line 33
After updating NuGet packages (especially major version bumps)
- Distinctive: line 34
After merging a branch with conflicts resolved but not compiled
- Distinctive: line 35
After scaffolding or code generation that needs manual adjustments
- Distinctive: line 54
Never modify files silently.
- Distinctive: line 56
If iteration 3 fails, the code stays in iteration 2's state.
- Distinctive: line 86
Read the test — understand the assertion and setup
- Distinctive: line 87
Read the production code — understand the actual behavior
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/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)
- 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.
- 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.
- Categorize before fixing — Group errors by root cause and fix the
highest-leverage first (one missing
usingcan erase a dozen downstream errors). - 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. - 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)
- 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 buildagain, compare error count - Evaluate — Zero errors: run
dotnet testas 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:
- Read the test — understand the assertion and setup
- Read the production code — understand the actual behavior
- 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
- 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
| Type | Name | Purpose |
| Skill | instinct-system | Capture fix patterns in MEMORY.md |
| Agent | dotnet-architect | Consulted for architectural error patterns |
MCP Tools Used
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 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
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
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.

