/mateu:mateu-pythonfrom Mateu
Builds Mateu UIs in Python on FastAPI using the mateu-ui package. Classes decorated with @ui become forms, CRUDs, listings, wizards, and dashboards served over the Mateu wire protocol.
Ships in Mateu. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The Python server emits the same wire as the Java server (POST /mateu/v3/sync/{route} → a
UIIncrement JSON), so the stock renderers (Vaadin web, Redwood, React Native, IntelliJ) draw it
unchanged. You write plain classes; never write routes, templates or frontend code for the UI.
Java (@UI) → skill mateu; YAML pages/routes → skill mateu-yaml; C# → mateu-dotnet.
pip install "mateu-ui[server]" fastapi # PyPI name is mateu-ui ([server] adds uvicorn); one package: mateu_ui
Versions follow the Java release: 3.0-beta.N → 3.0.0bN (pin it: mateu-ui==3.0.0bN).
Python 3.11+. Import from mateu_ui.uidl (authoring API), mateu_ui.uidl.components (fluent
components), mateu_ui.fastapi (add_mateu), mateu_ui.dtos (wire model, e.g. Option).
The pre-3.0 top-level names (mateu_uidl, mateu_core…) no longer exist.
# main.py
from fastapi import FastAPI
from mateu_ui.fastapi import add_mateu
import views # module(s) holding your @ui / @app classes
app = FastAPI()
add_mateu(app, views) # POST /mateu/v3/sync/{route}; add_mateu(app, views, ui="...") also serves the page
Run uvicorn main:app --port 8080. To see it in a browser set MATEU_UI (or ui=) to the
io.mateu:mateu-vaadin jar of the same version
(https://repo1.maven.org/maven2/io/mateu/mateu-vaadin/<v>/mateu-vaadin-<v>.jar) or its extracted
static/ folder; without it the server answers the sync API only. Fastest start: the generator
(VS Code "Mateu: New Project", IntelliJ New Project › Mateu, runtime "Python") or starters/python
from https://github.com/miguelperezcolom/mateu.
from typing import Annotated
from mateu_ui.uidl import Message, Required, Section, button, title, toolbar, ui
@ui("signup-form")
@title("Sign up")
class SignupForm:
name: Annotated[str, Required(), Section("Identity")] = ""
email: Annotated[str, Required()] = ""
greeting: str = ""
@button("Say hi")
def greet(self):
self.greeting = f"Hi, {self.name}"
return self # re-render with the new state
@toolbar("Save", button_style="primary")
def save(self) -> Message:
return Message(f"Saved {self.name}")
@button()
def cancel(self) -> str:
return "/home" # a route → navigate
Type-hinted public class attributes are state/fields (str, int, float/Decimal, bool,
date, datetime, time, Enum → dropdown, list[Row] → grid). Field modifiers ride in
Annotated[T, Marker(), …]; class/method features are decorators. The JSON action id is the
camelCased method name (browse_products ↔ browseProducts).
| Return | Effect |
|---|---|
None | nothing changes on screen (state changes are NOT shown — return self) |
self | re-render in place with the new state |
Message("…") / any other str | toast (Message(text, variant=MessageVariant.ERROR) …) |
"/route" (str starting with /) | navigate |
Drawer(...) / Dialog(...) (components) | open an overlay |
PageBanner(...) / PageBanners | banner(s) |
Navigate, Emit, CloseOverlay, MarkClean, RunAction, Announce | client commands |
[a, b, …] | several of the above in order — but self inside a list does NOT re-render |
@button, @toolbar, @action (no button) or @fab, or one the view advertises (a component's
action_id, OnRowSelected, @subscribe_to). Anything else → 403. _private names never run.Crud[T]: implement fetch AND save/delete — the defaults of save/delete silently do
nothing. The id is the entity's id attribute.@button/@toolbar re-check Required()/Min/Max/Length/Pattern on the server.request.state.mateu_identity in your own middleware.Required(), not Required).Crud[T], capability listings, filters,
drawer editing, database pushdown, exports.@app shell + menu + home, wizards,
archetypes (Dashboard, Welcome, Foldout, ItemOverview, CollectionDetail…), fluent components.add_mateu options, identity,
secrets, errors, CORS, YAML specs, how Python differs from Java, pytest.Canonical docs: https://mateu.io/python-user-manual/ · Rosetta (Java ↔ C# ↔ Python): https://mateu.io/reference/language-rosetta/ · Parity: https://mateu.io/reference/parity/
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub miguelperezcolom/mateu --plugin mateu8 skills in this plugin
/mateuBuild Mateu UI screens in JAVA — declarative @UI classes and fluent component trees that Mateu renders as a web (or native) UI. Use when creating or editing Java CRUD screens, forms, listings, wizards, editor/master-detail views, dashboards, app shells or federated UIs with Mateu (io.mateu). Triggers on @UI, AutoCrud, CrudStore, Listing, Wizard, Dashboard, ComponentTreeSupplier, @Menu. For YAML/data authoring use mateu-yaml; for C# use mateu-dotnet; for Python use mateu-python./mateu-dotnetBuild Mateu UIs in C# on ASP.NET Core (Mateu.NET) — classes marked [UI] become forms, CRUDs, listings, wizards, dashboards and an app shell, served on the Mateu wire so any Mateu renderer draws them. Use when writing or fixing a C#/.NET Mateu app: Program.cs wiring, views, actions, Crud<T>, capability listings, [App]/[MenuItem] menus, security, tests. Triggers on [UI] attribute, Mateu.AspNetCore, Mateu.Uidl, AddMateu, MapMateu, Crud<T>, IListing, [MenuItem], MATEU_UI with .cs/.csproj files./mateu-federationWire a federated Mateu setup end to end — a shell app that aggregates several @UI modules by Maven (build-time, one deployment) or independent services by RemoteMenu over HTTP (runtime, true microservices). Use when building an app shell, microfrontends, service-owned UI modules, embedding a remote UI in a page, or composing several Mateu backends. Triggers on shell, @Menu, RemoteMenu, MicroFrontend, microfrontend, service-owned UI, compose backends./mateu-runBuild, run and screenshot a Mateu app to see a screen actually render — Java (Spring Boot, Quarkus, Micronaut, Helidon), YAML-only, static bundle, .NET or Python. Use when asked to run a Mateu app, verify a screen renders in the real UI (not just tests), call the wire API, or capture a PNG of a route. Handles the UI-module → app build order and ships a Playwright screenshot script. Triggers on run the app, start the server, screenshot the screen, verify it renders, spring-boot:run, mateu/v3/sync./mateu-scaffoldScaffold a new Mateu project or module and wire the Java build correctly — the project generator front doors, the two-step annotation processing (indexer + framework AP), the renderer dependency and the main class. Use when starting a new Mateu app, adding a framework-agnostic @UI module, or fixing "my @UI class compiles but no controller is generated / the route 404s / nothing renders". Triggers on new Mateu project, pom.xml, annotationProcessorPaths, mateu-annotation-processor-indexer, mateu-annotation-processor-mvc, mateu-mvc, mateu-vaadin, mateu-archetype./mateu-screenConversational scaffolder for a single Mateu screen in Java — three business questions pick the template family, the family picks the starting archetype, and the class is generated in the right module. Use when the user wants a new screen, page, view, listing, form, wizard, dashboard or landing and hasn't named the archetype themselves. Triggers on new screen, nueva pantalla, add a page, create a view, scaffold a screen, "which archetype", "qué arquetipo".Other plugins' skills for the same job