# Uno Mvux Messaging

> Use messaging to sync MVUX states with entity changes.

- Skill: `unoplatform/uno-mvux-messaging` (Agent Skill)
- Install (CLI): `npx skillmds@latest add unoplatform/uno-mvux-messaging`
- Raw SKILL.md: https://api.skillmd.com/api/skills/unoplatform/uno-mvux-messaging/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: unoplatform (https://skillmd.com/u/unoplatform)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/unoplatform/uno-mvux-messaging

---


# MVUX Messaging — Agent Skill

## Workflow

> **Docs lookup:** call `uno_platform_docs_search(...)` first, then `uno_platform_docs_fetch(sourcePath="…")` using the `sourcePath` field from a result (a relative `.md` path; add the result's `anchor` for a section). Never pass a URL, a `.html` link, or a hand-built path.

### Step 1: Fetch the Messaging Documentation

Search for and fetch the messaging documentation:

```
uno_platform_docs_search("MVUX messaging EntityMessage synchronization CRUD")
```

Primary documentation pages:
- **Messaging Reference**: `external/uno.extensions/doc/Learn/Mvux/Advanced/Messaging.md`
- **Messaging How-To**: `external/uno.extensions/doc/Learn/Mvux/Walkthrough/Messaging.howto.md`

Fetch the reference page:

```
uno_platform_docs_fetch(sourcePath="external/uno.extensions/doc/Learn/Mvux/Advanced/Messaging.md")
```

### Step 2: For How-To Walkthroughs

For step-by-step implementation:

```
uno_platform_docs_fetch(sourcePath="external/uno.extensions/doc/Learn/Mvux/Walkthrough/Messaging.howto.md")
```

This covers when to use messaging, sending entity messages from services, observing changes in models, and manual message handling.

### Step 3: Understand the Architecture

From the fetched docs, the messaging pattern involves:
1. **Service** sends `EntityMessage<T>` via `IMessenger.Send(...)`
2. **Model** uses `.Observe(messenger)` on a `ListState` to auto-apply changes
3. **Entity changes** (Created/Updated/Deleted) are applied to the matching state

### Step 4: For Manual Message Handling

If the user needs custom logic when messages arrive, the reference page covers the `Update` extension methods that allow manual application of `EntityMessage<T>` to states.

## Key Principles (Stable)

- Register `IMessenger` as a singleton in DI: `services.AddSingleton<IMessenger, WeakReferenceMessenger>()`
- `EntityMessage<T>` carries an entity change type (Created, Updated, Deleted) and the entity
- `.Observe(messenger)` on a `ListState` auto-applies incoming entity changes
- Records need key equality for matching (see `uno-mvux-records` skill)
- Namespace: `Uno.Extensions.Reactive.Messaging`

## Related Skills

- [[uno-mvux-liststate]] — Mutable collections that messaging updates
- [[uno-mvux-records]] — Key equality for entity matching
- [[uno-mvux-commands]] — Commands that trigger CRUD operations

