intentarchitect/intent.modules.net/blazor-dialog-editing-entity

Claude Code and agent skill by intentarchitect/intent.modules.net

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Creates Blazor edit or update entity dialogs using MudBlazor dialog patterns and valid form submission, preserving existing .razor.cs loading and service behavior while wiring save and cancel correctly. Use when implementing edit or update entity dialogs in Blazor.

Install

npx vskill@latest install intentarchitect/intent.modules.net/blazor-dialog-editing-entity

SKILL.md

MANDATORY: Read Samples Before Implementation

STOP - You MUST read ALL sample files in the SAME folder as this SKILL.md before writing ANY code:

  1. edit-entity-dialog-sample.razor
  2. edit-entity-dialog-sample.razor.cs

Then read the target component .razor, .razor.cs, and related project files such as models, enums, lookups, services, and shared styles.

If any sample file cannot be accessed: stop immediately, confirm the SKILL.md folder location, retry from that location, and if still inaccessible report which file is missing. Do not proceed with partial implementation or approximation.


Preserve Existing Implementation

Use for: Edit or update entity dialogs in Blazor with MudBlazor Do NOT use for: Full pages, search pages, add dialogs, or non-Blazor projects Source of truth: Existing .razor.cs file defines data loading, service calls, dialog behavior, and model structure This is a dialog: close or cancel through MudBlazor dialog APIs rather than navigation

You MUST NOT:
  • Modify existing backend methods such as UpdateEntity() or UpdateEntityAsync()
  • Change payload shape sent to the backend
  • Add, rename, or remove model properties
  • Invent lookup services
  • Rewrite existing C# functionality
  • Add navigation logic to the dialog flow

1. Dialog Structure And Data Loading

This component is a MudBlazor dialog, not a page.

Dialog rules:

  • In .razor.cs, use IMudDialogInstance
  • In .razor, use TitleContent, DialogContent, and DialogActions
  • Do not use old dialog tags such as MudDialogTitle, MudDialogContent, or MudDialogActions
  • For success, close with MudDialog.Close(DialogResult.Ok(true))
  • For cancel, use MudDialog.Cancel()

Data loading:

  • Receive dialog input through [Parameter] properties or existing project conventions
  • If an ID is passed, load the entity through existing methods
  • If a model is passed, prepopulate from that existing input structure
  • Do not invent new dialog input contracts

2. Save And Cancel Methods

Save() or SaveAsync():

  1. Validate the form
  2. Call the existing update method without modification
  3. On success, close the dialog with a success result
  4. On error, keep the dialog open and set existing error state such as serviceErrors.*

Cancel():

  • Only cancel or close the dialog
  • Do not reset model state
  • Do not call services

Template bindings:

  • Bind Save button to Save() or SaveAsync()
  • Bind Cancel button to Cancel()
  • Do not call backend methods directly from the Razor template

3. Form Validation

Use valid Blazor EditForm patterns with the project's existing validation approach.

Required fields must have:

  • Existing validation annotations or validator wiring
  • Visible validation messages
  • No service call when invalid

Save button state:

  • Disable Save when the form is invalid
  • Disable Save while saving

4. Control Mapping

Property TypeControl
StringMudTextField
BooleanMudSwitch or MudCheckBox
EnumMudSelect with verified numeric values
LookupMudSelect from real option sources only
ArrayRepeatable MudBlazor blocks

MudBlazor rules:

  • Declare T explicitly for generic controls when required
  • Add placeholders to MudSelect
  • If using ValueChanged, pair it with Value rather than @bind-Value
  • Never assume enum members from sample code

5. Child Collections

  • Add collection buttons only when matching backing methods exist
  • Remove collection buttons only when matching backing methods exist
  • In for loops, use var index = i; and never bind directly to i

6. Styling

  • Prefer shared utilities first
  • Keep component-specific styles minimal
  • Never modify existing shared styles or theme values
  • Match the sample dialog layout closely
  • Cancel button in DialogActions must use Variant="Variant.Outlined" Color="Color.Secondary"
  • Save button must use Variant="Variant.Filled" Color="Color.Primary" with Disabled bound to the saving flag

Design context (if design.md is present)

If a design.md file exists in the project, read it before choosing MudBlazor component properties. Use it for:

  • Button variant and fill preferences (Variant.Filled / Variant.Outlined, gradient vs flat)
  • Color semantics for primary and error actions
  • Dialog title treatment (gradient clip text vs plain text)

design.md informs prop choices only — it does not override the sample's layout structure.


Definition of Done

  • [ ] All bindings used in .razor exist in .razor.cs
  • [ ] Dialog uses IMudDialogInstance and modern MudBlazor dialog sections
  • [ ] Entity data is loaded or prepopulated using existing patterns only
  • [ ] Save closes with DialogResult.Ok(true) on success
  • [ ] Cancel only cancels the dialog
  • [ ] Backend update methods were not modified
  • [ ] Model properties were not added, removed, or renamed
  • [ ] Enum options were verified against the real enum definition
  • [ ] Validation prevents service calls when invalid
  • [ ] Shared styles were preserved and component styling remained minimal

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/intentarchitect/intent.modules.net/blazor-dialog-editing-entity/badge)](https://verified-skill.com/skills/intentarchitect/intent.modules.net/blazor-dialog-editing-entity)

Something wrong with this skill or its page? Tell us.