MVUX Commands — Agent Skill
Workflow
Docs lookup: call
uno_platform_docs_search(...)first, thenuno_platform_docs_fetch(sourcePath="…")using thesourcePathfield from a result (a relative.mdpath; add the result'sanchorfor a section). Never pass a URL, a.htmllink, or a hand-built path.
Step 1: Fetch the Commands Documentation
Search for and fetch the commands documentation:
uno_platform_docs_search("MVUX commands automatic generation method invocation")
Primary documentation pages:
- Commands Reference:
external/uno.extensions/doc/Learn/Mvux/Advanced/Commands.md - Commands How-To:
external/uno.extensions/doc/Learn/Mvux/Walkthrough/Commands.howto.md
Fetch the reference page for complete details:
uno_platform_docs_fetch(sourcePath="external/uno.extensions/doc/Learn/Mvux/Advanced/Commands.md")
Step 2: Understand Implicit Command Generation
From the fetched docs, any public method on a Model automatically becomes a command in the generated ViewModel. The reference page covers:
- Basic command generation rules
- Using
CommandParameterfrom XAML - Additional feed parameters (method parameter names matching feed property names)
- The
[ImplicitCommands]attribute to enable/disable generation
Step 3: For How-To Walkthroughs
For step-by-step examples:
uno_platform_docs_fetch(sourcePath="external/uno.extensions/doc/Learn/Mvux/Walkthrough/Commands.howto.md")
This covers creating basic commands, using feed values in commands, can-execute logic, and disabling command generation.
Step 4: For Explicit Command Creation
If the user needs manual control over commands, the reference page has an "Explicit command creation" section covering Command.Create(...).
Critical Rules
- Feed parameter injection works for any feed type (
IFeed<T>,IListFeed<T>,IState<T>,IListState<T>) — the matching parameter receives a snapshot of the current value. - But you can only mutate writable types from inside a command body.
IState<T>andIListState<T>exposeUpdateAsync/AddAsync/RemoveAsync.IFeed<T>andIListFeed<T>are read-only — calling.Update(...),.UpdateAsync(...),.AddAsync(...), or.RemoveAsync(...)on an injectedIListFeed/IFeedis a compile error. - If a command needs to mutate a collection, the property on the Model must be
IListState<T>(notIListFeed<T>); convert withListState.FromFeed(this, sourceFeed)if needed. - When mutating via
UpdateAsync, the updater must be pure — derive the new value solely from thecurrentvalue, with no captured external state or side effects. See [[uno-mvux-state-basics]] and [[uno-mvux-liststate]] for details.
Key Principles (Stable)
- Any public method on a
*Modelpartial record generates a command in the ViewModel - Commands are automatically
IAsyncCommand— they handle async properly - Feed parameter injection: a method parameter whose name/type matches a Feed property gets the current feed value injected
- Use
[ImplicitCommands(false)]on a Model to disable automatic generation - Commands are bound in XAML via
Command="{Binding MethodName}" - The method name becomes the command name (e.g.,
Save()→Savecommand)
Related Skills
- [[uno-mvux-state-basics]] — States that commands often update
- [[uno-mvux-feed-basics]] — Feeds whose values commands can consume
- [[uno-mvux-selection]] — Selection-aware commands