ASP.NET Core MVC
CommunityRefactor safely toward clean ASP.NET Core MVC.
System Documentation
What problem does it solve?
ASP.NET Core codebases often drift into “fat controllers,” EF entity leakage into Razor views, tangled business rules in UI templates, and unclear separation between HTTP, business logic, and data access. This Skill guides a coding agent to restructure the project into a predictable ASP.NET Core MVC layout with thin controllers, dedicated ViewModels, and service-injected business logic.
Core Features & Use Cases
- Thin controller enforcement: Ensures controller actions validate inputs, delegate to injected services, and return Views with ViewModels (no ORM queries or business rules inside controllers).
- Razor view separation: Keeps Razor views focused on display logic using a dedicated ViewModel as the
@model, avoiding.SaveChanges()and@injectcalls for business decisions. - ViewModel-first modeling: Establishes clear InputModels (validated form submissions via Data Annotations) and Output ViewModels (only the data the view needs), mapped in the service layer.
- Data layer isolation with EF Core: Directs DbContext and EF/repository logic into a Data/ layer, injected where needed but never used directly from controllers.
- Page-centric flow guidance: Recommends Razor Pages for self-contained features, while supporting MVC structure for controller/action-centric flows (including Area organization for larger apps).
Quick Start
Use the ASP.NET Core MVC skill to guide your agent to reorganize controllers, views, ViewModels, and EF Core access into a clean, testable structure starting from your current Program.cs, Program wiring, and existing Views/ or Pages/.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: ASP.NET Core MVC Download link: https://github.com/Levironexe/architect/archive/main.zip#asp-net-core-mvc Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.