agentleFS
TairitsuaTairitsua/Monica/skills/monica-ui-development/SKILL.md

monica-ui-development

Skill18 starsChanged 7 months agoMITView on GitHub

Implement Monica Blazor and MudBlazor v9 components, faithfully replicate prototypes, and consolidate reusable UI assets. Covers pages, themes, CSS isolation, local assets, browser storage, and async lifecycle; consumers configuring UI modules use monica-infra-ui.

The file

Files
SKILL.md

Monica UI Development

For framework modules use $monica-architecture for UI boundaries and decomposition. For business application pages use $monica-application-ui and $monica-application-ui-development; reuse the mechanics here without importing module/Facade placement or the default Shell geometry. For a focused UI change, inspect the owning component, its CSS, and the rendered DOM. Use $monica-ui-audit when the task asks for a compliance review or the change has a concrete cross-cutting risk. Use $monica-ui-localization for user-facing strings, resources, or registry keys; use $monica-infra-ui for consumer registration.

For a page redesign, apply the shared visual language for the signature region, color role map, scale tiers, and component vocabulary, and the working-interface language for task analysis, evidence honesty, responsive containment, and review. A neutral, single-accent page does not meet the visual language.

For accepted prototype implementation or reusable asset consolidation, follow prototype replication and select existing shared visual components before creating page-local variants.

For icon rendering, catalog additions, SVG source imports, and generation, follow MoIcon authoring. Public component and MudBlazor-slot usage belongs to the icon consumer contract.

Put component layout and local presentation in .razor.css. A Blazor isolation selector does not automatically reach a child MudBlazor component root: scope a real HTML wrapper and use ::deep. Compare compiled *.bundle.scp.css selectors with the live DOM when a class exists but a rule does not apply. Prefer MudBlazor primitives for menus, dialogs, drawers, and popovers. Use v9 async APIs (ShowAsync, ShowMessageBoxAsync) and the v9 converter contract. Read CSS isolation workflow or v9 migration when those issues arise.

For a loading, empty, or unavailable block replacing results, reuse MoContentState and its content-state contract. Keep native empty rows out of responsive data-cell label grids and percentage widths. Verify centering against the entire painted results region, not only the state's own narrowed box.

Format page timestamps through the shell-owned MoTimeFormatter; follow page time display for Clock conversion, host-configurable formats, source DateTimeKind semantics and the schedule-calendar exception. Do not use OS-local conversions or duplicate UTC strings in ordinary rows.

Keep data initialization in OnInitializedAsync or OnParametersSetAsync and DOM-dependent interop in OnAfterRenderAsync. An incomplete await permits re-entry and disposal. Cancel component-owned work, observe late resource-producing tasks, stop JavaScript callbacks before disposing their .NET targets, and avoid interop that mutates DOM from DisposeAsync. Read Blazor lifecycle guidance for ownership/interleaving, auto-refresh pattern for polling, and browser storage when persisting UI state. IBrowserStorage owns local/session storage; its runtime keys have the mo: prefix.

Use MudBlazor palette variables first and the approved --mo-color-* tokens for roles the palette cannot express. Keep supplemental semantic tokens small and reusable across modules; do not introduce hardcoded colors in UI Razor, CSS, JS, or C# visualization payloads. mo-theme-main.css composes theme resources and token defaults; put new component styling in its owning stylesheet rather than adding it there during color cleanup. Keep component-specific selectors in the owning CSS, shared MudBlazor visuals in theme CSS, and shell sizing in layout CSS. The shell owns AppBar height and viewport scrolling; page CSS should use available parent height and local overflow. Runtime fonts and static resources stay local; ship WOFF2 rather than source TTF/OTF. Read theme CSS, offline assets, and the selected theme's contract: Precision Default or optional Grove. For theme regressions use theme pitfalls; for dense tables use adaptive list/table.

Reuse MoJson for JSON previews and drafts instead of a module-local tokenizer, formatter or multiline text field. Follow the JSON component contract; callers retain schema validation, redaction and save ownership. Use ordinary text or a specialized viewer for logs, stack traces, SQL, Markdown and diffs.

When MudBlazor API or DOM behavior is uncertain, inspect source matching the project's resolved package version. Use inspect-dependency-source when available; otherwise use a verified exact checkout. Read source and repository tooling for explicit source inputs, CSS variable catalogs, and font subset defaults. Use scripts/font_downloader.py for local font downloads and offline assets for packaging constraints. Validate theme colors with the repository's scripts/validate_ui_theme_tokens.py when styling changes.

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.