← Skills

Blazor / .NET

crucible-blazor

Unusually strict, refactor-oriented code-quality review for .NET / Blazor projects — vertical-slice architecture, outcome-oriented SOLID, structural simplification, Blazor component-layer guidance. Use for PR review, "crucible", or when enforcing VSA on a Blazor/.NET repo. Install one crucible variant per repo, matched to its stack (sibling: crucible-nextjs).

invocationmanual only
install leveluser — once via scripts/install-skills into ~/.claude/skills (Cursor reads the same directory; all projects); a repo can override it at .claude/skills/crucible-blazor/
disable-model-invocationtrue
install (this skill)curl -fLo ~/.claude/skills/crucible-blazor/SKILL.md --create-dirs https://vilya.jerrodtuck.com/skills/crucible-blazor/SKILL.md

Body

Crucible Code Quality Review — Blazor / .NET

Strict, refactor-oriented review of the current branch's changes. Not a pass/fail gate — every finding names a concrete refactor. Be ambitious about structure: hunt for code-judo moves that preserve behavior while making the implementation dramatically simpler.

This is the Blazor / .NET instance of the crucible method. The method (below) is identical across stacks; only the two stack-specific sections — VSA for .NET and Blazor UI layer — differ. A sibling crucible-nextjs swaps just those two.


The crucible method (identical in every stack variant)

Core prompt

Deep code-quality audit of the current branch's changes. Rethink structure to improve quality without changing behavior. Improve abstractions and modularity; reduce spaghetti; improve succinctness. Prefer deleting complexity over rearranging it. For every problem, propose the refactor.

How to report — severity, then the refactor

Do not emit a verdict. Emit findings, each tagged by severity and each carrying a concrete fix:

Each finding carries: where (file:line) · the smell · why it costs later · the refactor (the code-judo move — ideally deleting a branch/helper/mode rather than relocating it).

Close with a merge-readiness signalReady · Ready after blockers · Needs rework — and the top 1–3 refactors by leverage (biggest complexity delete first). The deliverable is the direction of the refactor, not a stamp.

SOLID — outcome-oriented (reinforces VSA, does not fight it)

Judge SOLID by outcomes, not ceremony. Do not reward an interface-per-class or wrappers for their own sake — that collides with the anti-wrapper rule. Real SOLID reduces reasons-to-change and isolates what varies; fake SOLID just adds indirection.

Structural non-negotiables (stack-neutral)

  1. Prefer the solution that makes the code feel inevitable — delete whole branches/helpers/modes.
  2. Don't push a file from under ~1k to over ~1k lines without a strong reason — decompose first.
  3. No random spaghetti growth — special cases earn their own abstraction.
  4. Bias toward cleaning the design, not accepting "it works."
  5. Prefer direct, boring code over magic.
  6. Thin wrappers / identity abstractions that add indirection without clarity are a smell.
  7. Cast / silent catch-and-default papering over an unclear boundary is a smell.

VSA for .NET — presumptive 🔴 blockers (stack-specific)

Blockers unless the author justifies clearly:

  1. Feature logic outside its slice — a feature's logic belongs in its own vertical slice (one folder/module owning request → handler → data for that use case). Do not grow app-wide Controllers/ / Services/ / Repositories/ layer-cake folders for a feature.
  2. Feature logic in the shared kernel — shared / BuildingBlocks-style projects hold contracts, envelopes, and primitives only (events, publisher/port interfaces, shared value types). No ingest / filter / egress / business rules there.
  3. ProjectReference into a sibling product/app — forbidden. Copy the pattern; extract a deliberate shared package later if duplication actually hurts.
  4. Cross-cutting concern welded into core logic — messaging / IO / egress (MQTT, SSE, email, files) belongs behind a port or in its own slice, not as if (mqtt) inside domain/handler code.
  5. Ad-hoc branching bolted onto an unrelated flow instead of a dedicated policy / handler / slice.

Blazor UI layer — guidance, not blockers (stack-specific)

Non-blocking 🟡 review questions for the UI layer. Escalate one to 🔴 only when it hides a real VSA/boundary break — then it's a blocker on those grounds, not on Blazor style:


Brownfield clause — repos mid-migration to VSA

In a repo that did not start as VSA and is being migrated incrementally:


Primary review questions

Output order

  1. 🔴 Structural regressions / VSA violations (new & modified code)
  2. 🟠 Missed dramatic simplification
  3. 🟠 Spaghetti / branching growth
  4. 🔴/🟠 Boundary / type-contract problems
  5. 🟠 File-size / decomposition
  6. 🟡 Blazor UI-layer guidance
  7. 🟡 Legacy migration candidates (brownfield repos)
  8. Merge-readiness signal + top refactors by leverage

The bar (refactor lens, not a rubber stamp)

Correct behavior is not enough. Withhold Ready while any of these stand:

Good phrases:

Version history

No git history yet — commit this skill to the repo and versions appear here automatically.