mcpField
T
tauri

tauri

github.com/oakossDevelopment21102 installsUpdated 12w ago
Repository

About tauri

Tauri is a framework for developers building desktop and mobile apps with web-based UIs and Rust backends. It uses the operating system's webview and connects frontend code to Rust commands through capability-based permissions.

Key features

  1. 01Build app UIs with web technologies
  2. 02Write backend logic in Rust
  3. 03Render interfaces with the OS webview
  4. 04Invoke Rust commands through frontend IPC
  5. 05Set capabilities and permissions by window

Use cases

  1. 01Develop cross-platform desktop or mobile apps
  2. 02Integrate tray, notifications, or file-system access
  3. 03Build apps requiring fine-grained permission control

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/oakoss/agent-skills --skill tauri

After installing, type/tauriin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
distribution.md
ipc-commands.md
plugin-system.md
project-setup.md
security-model.md
sidecar-protocols.md
state-management.md
system-tray.md
window-management.md

Details

From the project README

Tauri

Overview

Tauri is a framework for building desktop and mobile applications using web technologies (HTML, CSS, JavaScript/TypeScript) for the UI and Rust for the backend logic. It produces small, fast binaries by leveraging the OS webview instead of bundling a browser engine. The IPC layer connects the frontend to Rust commands through a capability-based permission system.

When to use: Cross-platform desktop/mobile apps with web UIs, system-level integrations (tray, notifications, file system), apps requiring small bundle sizes, security-sensitive applications needing fine-grained permission control.

When NOT to use: Pure web apps with no native requirements, Electron apps that depend heavily on Node.js APIs with no Rust migration path, projects where the team has no capacity to maintain Rust code.

Quick Reference

PatternAPI / ConfigKey Points
Create projectcargo create-tauri-app or pnpm create tauri-appScaffolds Rust backend + frontend framework
Define command#[tauri::command] fn name() {}Must register in generate_handler!
Invoke from frontendinvoke('cmd_name', { arg: value })Returns Promise, args as camelCase JSON
Emit event (frontend)emit('event-name', payload)Global event, all listeners receive
Listen eventlisten('event-name', handler)Returns unlisten function
Manage stateapp.manage(MyState {}) + State<'_, MyState>No Arc needed, Mutex for mutability
Window creationWebviewWindowBuilder::new(app, label, url)Label must be unique per window
System trayTrayIconBuilder::new().menu(&menu).build(app)Requires tray-icon Cargo feature
Add plugin (Rust).plugin(tauri_plugin_name::init())Register in Builder chain
Add plugin (frontend)@tauri-apps/plugin-nameNPM package per plugin
Define capabilitysrc-tauri/capabilities/*.jsonScoped to windows, merged at build
Grant permission"permissions": ["plugin:scope"]Commands inaccessible without explicit grant
Sidecar binarytauri.conf.json bundle.externalBinName must match {name}-{target_triple}
Custom protocoltauri::Builder::default().register_uri_scheme_protocolIntercept custom scheme:// URLs
Auto-updatertauri-plugin-updater + JSON endpointRequires code signing
App bundle/signcargo tauri buildPlatform-specific signing via env vars

Common Mistakes

MistakeCorrect Pattern
Multiple generate_handler! callsPass all commands to a single generate_handler! invocation
Using &str in async command argsUse owned String types in async commands
Forgetting to add capability for pluginAdd permission identifier in src-tauri/capabilities/*.json
Wrapping state in ArcTauri State handles reference counting internally
Using std::sync::Mutex across .await pointsUse tokio::sync::Mutex for async commands holding locks across awaits
Wrong sidecar binary nameBinary must be named {name}-{target_triple} (e.g., mybin-x86_64-pc-windows-msvc)
Assuming all windows share capabilitiesEach window/webview gets capabilities scoped by label
Using SystemTray (v1 API)Use TrayIconBuilder from tauri::tray module in v2
Not signing app before enabling updaterAuto-updater requires valid code signing on all platforms
Using window title for security decisionsCapabilities use window labels, not titles

Delegation

  • Command pattern discovery: Use Explore agent
  • Security review: Use Task agent
  • Code review: Delegate to code-reviewer agent

If the rust skill is available, delegate Rust language patterns, error handling, and async/concurrency to it. If the react-patterns skill is available, delegate React frontend patterns to it. If the svelte skill is available, delegate Svelte frontend patterns to it. If the vite skill is available, delegate build tooling and dev server configuration to it. If the github-actions skill is available, delegate CI/CD pipeline and release workflow configuration to it.

References

Comments

Markdown supported