agentleFS
BenknightdarkBenknightdark/neo-skills/skills/neo-dotnet-mvc/SKILL.md

neo-dotnet-mvc

Skill7 starsChanged 6 months agoMITView on GitHub

Use this skill when building, debugging, refactoring, or reviewing ASP.NET Core MVC apps with Razor views, controllers, ViewModels, validation, Tag Helpers, View Components, layouts, or server-rendered workflows.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check .csproj to identify TargetFramework.

    line 23
  2. Distinctive:

    Write high-quality controllers and strongly-typed views.

    line 31
  3. Distinctive:

    Check whether model validation correctly operates on both the frontend and backend.

    line 36
  4. Distinctive:

    Ensure Antiforgery tokens are correctly applied to all state-modifying requests.

    line 37
  5. Very specific:

    Strongly Typed Views: All views must have an explicit @model.

    line 64
  6. Distinctive:

    Formatting: Follow the Allman style and use Tag Helpers instead of HTML Helpers.

    line 67
  7. Distinctive:

    Ensure the code complies with C# 10+ syntax standards.

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

.NET MVC Expert Skill

Trigger On

  • The user requests to create, debug, refactor, or review ASP.NET Core MVC applications.
  • The project contains Views and Controllers directories and inherits from Controller (not ControllerBase).
  • The target framework is .NET 6.0 (LTS) and above.
  • There is a need to optimize Server-Side Rendering (SSR) performance or improve view organizational structure.

Workflow

  1. Perceive (Architecture Awareness):
    • Check .csproj to identify TargetFramework.
    • Analyze Views/Shared to confirm existing configurations for layouts and partial views.
    • Identify whether Tag Helpers and static resource versioning are enabled.
  2. Reason (Planning Phase):
    • Evaluate whether complex Partial Views need to be migrated to View Components.
    • Determine whether custom Tag Helpers are needed to simplify UI logic.
    • Choose an appropriate ViewModel organization method based on project scale.
  3. Act (Execution Phase):
    • Write high-quality controllers and strongly-typed views.
    • Implement data validation (Data Annotations) and integrate them into ViewModels.
    • Configure and use Tag Helpers to ensure the semantic correctness of forms and links.
  4. Validate (Standard Validation):
    • Validate whether page rendering conforms to the expected HTML structure.
    • Check whether model validation correctly operates on both the frontend and backend.
    • Ensure Antiforgery tokens are correctly applied to all state-modifying requests.

Feature Roadmap (.NET 6 - 11)

.NET 6 & 7 (Foundation)

  • Tag Helpers: Declarative HTML attribute extensions.
  • View Components: Logic-driven UI block modularization.
  • Cache Tag Helper: Server-side view fragment caching.
  • Nullable Views: Better Razor null safety support.

.NET 8 & 9 (Productivity)

  • Blazor Integration: Hybrid development support for MVC and Blazor components.
  • Antiforgery Improvements: Global anti-forgery automatic validation optimization.
  • Keyed Services in Controllers: Finer-grained dependency injection support.
  • Native AOT for MVC: Metadata compilation optimization tailored for AOT.

.NET 10 (Extensions & Serialization)

  • Extension Members for IHtmlHelper: Extending view helper functions.
  • Advanced Serialization in Views: Performance optimization for large view models.

.NET 11+ (Version-Specific Features)

  • Zstandard (zstd) Compression for SSR: High-efficiency compression for server-rendered HTML payloads and static assets.
  • Asynchronous Form Validation: Extended async validation coordination for complex input pipelines.
  • Agentic UI & Blazor Component Integration: Native AG-UI / Blazor AI components in hybrid MVC apps, with TempData support in static SSR.
  • Runtime Async Performance: Reduced async allocation and cleaner execution traces in Razor view generation.

Coding Standards

  • Strongly Typed Views: All views must have an explicit @model.
  • ViewModel Separation: Strictly prohibit exposing database entities directly to views.
  • Naming: View models must end with ViewModel, action methods prioritize asynchronous patterns.
  • Formatting: Follow the Allman style and use Tag Helpers instead of HTML Helpers.

Deliver

  • Version-Optimized MVC Code: Provide modernized controllers, models, and views suitable for the target version.
  • UI Architecture Suggestions: Provide design suggestions for view components and Tag Helpers.
  • Validation Logic: Provide a complete model validation and error prompting implementation plan.

Validate

  • Ensure the code complies with C# 10+ syntax standards.
  • Validate endpoints correctly handle model validation failures and return form states.
  • Confirm static resources and scripts are correctly cached via asp-append-version.

Documentation

Official References

Internal References

  • MVC Coding Style and Naming Conventions
  • MVC Anti-Patterns and Best Practices
  • MVC Modern Patterns Guide

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.