From knowledge-patch
Provides Tauri 2.5.0 knowledge for migration, configuration, IPC, security, plugins, mobile, and distribution tasks. Loads reference docs for window/webview, runtime, and capability management.
How this skill is triggered — by the user, by Claude, or both
Slash command
/knowledge-patch:tauri-knowledge-patchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. Inspect `tauri.conf.json`, `Cargo.toml`, capability files, plugin permissions, and the frontend API imports before changing code.
tauri.conf.json, Cargo.toml, capability files, plugin permissions, and the frontend API imports before changing code.| Reference | Topics |
|---|---|
| configuration-security.md | Configuration hierarchy, app manifests, capabilities, permissions, scopes, CSP, asset protocol, remote origins, command pruning |
| core-plugins.md | Dialog, filesystem, HTTP, store, and updater behavior |
| ipc-state-tray.md | Commands, raw requests, serialization, channels, events, managed state, tray icons |
| migration.md | Rust, Cargo, asset-provider, handle, argument, and feature migrations |
| plugin-mobile-development.md | Plugin scaffolding, typed configuration, ACL generation, native mobile bridges, OS permissions, official plugin surfaces |
| project-distribution.md | Project setup, build hooks, frontend assets, bundle resources, installers, signing inputs, build/bundle workflow |
| verso-runtime.md | Experimental Servo-based runtime setup and compatibility boundary |
| windows-webviews-runtime.md | Native windows versus webviews, application lifecycle, paths, protocols, platform behavior, WebView2 and Apple options |
WebviewWindow/WebviewWindowBuilder for the former window-containing-a-webview behavior. Rust Window now means the native container independently of its webviews.getAllWebviewWindows and getCurrentWebviewWindow; getAllWindows and getCurrentWindow return native-window handles.unstable feature when using it.FileDropEvent and WindowEvent::FileDrop with DragDropEvent and WindowEvent::DragDrop, and use the four tauri://drag-* frontend events.productName, version, and identifier at the root; rename tauri to app; move bundle settings to root bundle.frontendDist and devUrl. devUrl must be a URL.app.security.pattern, the global frontend API switch to app.withGlobalTauri, and updater settings to plugins.updater.bundle.macOS.dmg, bundle.linux.deb, and bundle.linux.appimage; use bundle.license and bundle.licenseFile for shared licensing.app.window.dragDropEnabled.Manager::path() and tauri::path::PathResolver; use tauri::ipc for command/IPC types.tauri::Icon with tauri::image::Image and old path/plugin result aliases with tauri::Result or an application result type.tauri::scope::fs::{Scope, Pattern, Event}; filesystem checks resolve symlinks, and the old HTTP, shell, and IPC scope types no longer exist.default-tls to native-tls, system-tray to tray-icon, window-data-url to webview-data-url, and icon-ico/icon-png to image-ico/image-png.reqwest-* features. linux-protocol-headers is always active; linux-libxdo opts native Linux editing menu items into libxdo.TAURI_WEBVIEW_AUTOMATION.WebviewWindow::close() emits a close-requested event; call destroy() for forced closure.AppHandle::exit() and restart paths emit exit-request events. After cleanup_before_exit(), exit immediately and make no further Tauri calls.AppHandle::request_restart() when exit-event delivery matters. Direct restart() waits for RunEvent::Exit before relaunching.App::run_return() when the host process must continue and receive the exit code. Do not build a polling loop around deprecated run_iteration().Commands present only in invoke_handler are callable by every window and webview. Put application command names in the build-time AppManifest before expecting capabilities to restrict them.
tauri_build::try_build(
tauri_build::Attributes::new()
.app_manifest(tauri_build::AppManifest::new().commands(&["save_file"])),
)
.unwrap();
Capabilities decide whether an invocation reaches a command and attach configured scope. The command or plugin must interpret CommandScope/GlobalScope and enforce the allow/deny data; deny entries win. Native application code can use WebviewWindow::resolve_command_scope for runtime checks.
app.security.capabilities is absent or empty, all files in ./capabilities/ are included. Once populated, the list becomes an explicit selection of identifiers or inline objects.platforms for target filters and remote.urls only when matching remote origins must invoke commands. Bundled content has access by default; remote content does not.config-json5 feature before relying on .json5 capability files.build.removeUnusedCommands cautiously: runtime-added ACLs are invisible to build-time pruning.Each invoke_handler(...) call replaces the previous handler. Put every application command in one generate_handler![...] list.
ArrayBuffer or Uint8Array to invoke for a raw InvokeBody::Raw; inject tauri::ipc::Request to read the unprocessed body and headers.SERIALIZE_TO_IPC_FN for custom JavaScript argument serialization. Tauri's DPI classes already use it.Serialize + Clone.Channel for ordered, higher-throughput streams and raw/custom serialization. Capabilities do not finely filter event or channel payload data.Register Mutex<T>, not Arc<Mutex<T>> merely to add shared ownership; Tauri supplies it. State lookup uses the exact registered type. Clone an AppHandle into a thread, then retrieve state through Manager there. Do not call deprecated Manager::unmanage.
build.frontendDist accepts an embedded directory, an array flattened into the asset root, or a custom-protocol/remote URL with no embedded assets. Without devUrl, the CLI can serve it with simple hot reload.{ script, cwd }; beforeDevCommand also accepts wait, defaulting to false. Use the TAURI_ENV_* variables for target-aware hooks.tauri build bundles by default. Use --no-bundle, followed by tauri bundle, to separate compilation from packaging.TAURI_SIGNING_PRIVATE_KEY.upgradeCode stable across product renames, and remember Windows bundles allow downgrades unless allowDowngrades is false.setup run only after the event loop is ready. The page-load hook receives a Webview for both start and finish; inspect PageLoadPayload::event.devtools per webview/window and use WebviewBuilder::focused when initial focus differs.http://<scheme>.localhost; opt into HTTPS with useHttpsScheme or the builder method.additionalBrowserArgs, extension state, or scrollbar styles require distinct directories.preventOverflow, its margin builder variant, initialization scripts for all frames, Apple link previews, and iOS accessory views must be set before build().plugin:<name>|<command>; registration does not bypass permissions.Builder generic for typed plugins.<name> configuration and read it from the PluginApi passed to setup.build.rs. Commands must inspect injected scope values themselves.PluginHandle::run_mobile_plugin. There is no native-to-Rust reverse bridge; use JNI on Android or C FFI on iOS when suspended-webview work must enter Rust.$APPDATA/* covers direct children, not the directory plus its full tree.http:default enables the fetch workflow but grants no origins; add URL allow scopes and narrower denies.load() calls are ignored until Rust closes the resource.quiet updater installation cannot request elevation and therefore needs a per-user install or an already elevated process.tauri-runtime-verso as experimental and verify each required API against its documented compatibility boundary.npx claudepluginhub nevaberry/nevaberry-plugins --plugin knowledge-patchDevelops Tauri v2+ cross-platform desktop/mobile apps with Rust backend, configuring tauri.conf.json, #[tauri::command] handlers, IPC (invoke/emit/channels), capabilities/permissions, and troubleshooting builds.
Drive Web-first to Tauri v2 migration with contract-first architecture, dual transport adapters, fail-fast runtime checks, and loop-based quality gates. Use when user mentions Tauri migration, dev:tauri crash, ECONNREFUSED, invoke/HTTP fallback, TDD strategy, e2e setup, or ralph loop workflows.
Covers Tauri app development: architecture, IPC, commands, events, security, and plugins.