bobmatnyc/claude-mpm-skills
Overview
This skill provides advanced Tauri event patterns for reliable bidirectional communication, streaming data, multi-window messaging, and custom event handling. It packages practical Rust and TypeScript patterns—typed payloads, streaming, buffering, broadcasting, and listener management—so you can build responsive desktop apps with robust event flows. The focus is on predictable, performant messaging between backend and frontend windows.
How this skill works
The skill demonstrates emitting events from Rust backend to frontend windows and listening in TypeScript, using serde::Serialize for typed payloads and tagged unions for complex events. It covers streaming patterns (real-time and buffered), multi-window broadcasts and targeted messaging via AppHandle, frontend→backend events, and listener utilities like one-time listeners, queues, and React hooks. Error handling, throttling, batching, and safe emission helpers ensure stability and performance.
When to use it
- Notify frontend about backend progress (downloads, processing, sensor reads).
- Stream high-frequency data to UI with throttling or batching (logs, telemetry).
- Relay messages between windows or broadcast global state changes.
- Accept custom frontend events and forward them to backend listeners.
- Manage listeners in React or long-running queues to avoid memory leaks.
Best practices
- Always clean up listeners (call unlisten or stop hooks) to prevent memory leaks.
- Type event payloads in Rust (Serialize) and define TypeScript interfaces for safety.
- Use structured/tagged unions for multi-type events to simplify handling on the frontend.
- Throttle or batch high-frequency emissions to avoid overwhelming the UI or IPC.
- Use once() for single-shot signals (initialization/completion) and queue patterns for ordered processing.
Example use cases
- Download manager: emit download-started, download-progress (typed), and download-complete events to update UI and speed indicators.
- Live sensor monitor: stream sensor-reading events at intervals with a React hook and keep only the latest N readings.
- Log viewer: buffered stream_logs implementation that sends log-batch events to display large files without flooding the frontend.
- Multi-window settings sync: relay_to_settings command forwards changes from main window to settings window via backend.
- Global notifications: broadcast_message to emit alerts to all open windows concurrently.
FAQ
Store the UnlistenFn returned by listen/once and call it in component cleanup or when stopping a queue; prefer useEffect cleanup in React.
When should I batch vs throttle events?
Batch when individual events are small but numerous and can be processed in groups (logs, items). Throttle when you need timely updates but can skip intermediate values (UI updates, metrics).
30 skills
This skill orchestrates advanced Tauri inter-process events for bidirectional, streaming, and multi-window communication, simplifying real-time app workflows
This skill helps you enforce WordPress security best practices by sanitizing input, validating logic, and escaping output to prevent XSS, CSRF, and SQL
This skill helps you implement robust VB.NET Windows Forms patterns with UI threading, data binding, and event handling.
This skill helps you migrate VB6 patterns and COM interop to modern VB.NET, improving reliability and future maintenance.
This skill helps you scaffold and manage Spring Boot 3.x applications with auto-configuration, REST APIs, security, and actuator monitoring.
This skill helps you implement end-to-end Datadog observability for production systems, enabling tracing, logs, metrics, and alerting.
This skill dispatches a code-reviewer subagent to catch issues early and ensure implementations align with plan before proceeding.
This skill helps you develop real-time Phoenix apps with LiveView by teaching server-rendered UI, OTP supervision, and BEAM patterns.
This skill helps you run FastAPI locally with hot reload and production-like Gunicorn setup, simplifying dev to prod parity.
This skill helps you choose and configure Vercel data services such as Postgres, Redis, Blob, and Edge Config for fast, scalable apps.
This skill teaches test-driven development patterns across languages, accelerating reliable features, safer refactors, and clearer contracts through
This skill helps you build production-grade Go CLIs with Cobra and Viper, coordinating commands and flexible configuration across environments.
This skill helps you implement hydration-safe state management between Svelte 5 runes and adapter-static for prerendered apps.
This skill guides building AI-powered apps on Vercel by configuring AI SDK, Gateway, and Agent workflows, with secure key management and monitoring.
This skill helps you configure a Better Auth core instance for TypeScript apps, wire servers and clients, and manage sessions securely.
This skill helps you index, search, and auto-index codebases with MCP Vector Search and ChromaDB, streamlining setup, reindexing, and MCP integration.
This skill helps you model, query, and migrate databases in Python using SQLAlchemy ORM with modern 2.0 patterns.
This skill helps you provision and manage Neon serverless Postgres with autoscaling, branching, and fast deployments for serverless apps.
This skill guides EspoCRM module development by enforcing service-layer architecture, EntityManager usage, and metadata-driven patterns for robust
This skill provides a concise DigitalOcean platform overview to help onboarding, project setup, tooling, and service selection for compute, storage, and
This skill helps secure Vercel projects with RBAC, SSO, deployment protection, firewall, and audit logs to manage access and enforce MFA.
This skill helps you implement advanced authentication by orchestrating server and client plugins with migrations and schema updates.
This skill provides a concise Vercel platform overview to help you onboard, plan architecture, and configure projects efficiently.
This skill helps you build and test Python Flask APIs and microservices with production-ready patterns using blueprints, extensions, and factory pattern.
This skill helps you configure Vercel domains, redirects, headers, CDN, and regions to optimize routing and edge delivery.
This skill helps you design and configure AI-native MCP servers with tools resources and prompts for Claude Desktop integration.
This skill helps you implement type-safe API routes in Next.js with automatic Zod validation, reducing boilerplate and improving reliability.
This skill helps you architect scalable WordPress applications by designing secure REST endpoints, efficient caching, and tooling with WP-CLI across projects.
This skill validates and secures environment variables across Next.js, Vite, React, and Node.js projects, preventing leaks and simplifying CI/CD.
This skill helps you instrument Go services with OpenTelemetry, Prometheus, and slog for traces, metrics, and structured logging across services.