tauri-knowledge-patch
Tauri 2.0-2.5 changes since training cutoff — capabilities replacing allowlist, IPC channels, plugin system v2, mobile support, config v2 structure. Load before working with Tauri.
What this skill does
# Tauri Knowledge Patch
Covers Tauri 2.0–2.5 (Oct 2024 – Apr 2025). Claude knows Tauri v1.x (Rust backend + web frontend, `tauri::command`, v1 allowlist, `tauri.conf.json` v1). It is **unaware** of the v2 architecture and any of the changes below.
## Index
| Topic | Reference | Key features |
|---|---|---|
| Config v2 | [references/config-v2.md](references/config-v2.md) | `tauri` key renamed to `app`, top-level `productName`/`identifier`, `frontendDist`/`devUrl` |
| Permissions & Capabilities | [references/permissions-capabilities.md](references/permissions-capabilities.md) | Replaces allowlist, capability files, platform-specific, remote URL access |
| IPC: Channels & Response | [references/ipc.md](references/ipc.md) | `Channel<T>` streaming, `ipc::Response` for binary data |
| Mobile support | [references/mobile.md](references/mobile.md) | `mobile_entry_point`, lib.rs/main.rs split, crate-type config |
| Plugin system v2 | [references/plugin-system.md](references/plugin-system.md) | Built-in APIs moved to plugins, `cargo tauri add`, JS import changes |
| Event system | [references/events.md](references/events.md) | `Emitter`/`Listener` traits, `emit_to`, `listen_any`, `emit_str*` |
| API additions | [references/api-additions.md](references/api-additions.md) | Window colors, badging, reload, cookies, restart, dock visibility |
---
## Config v2 Quick Reference
`tauri.conf.json` restructured. Key renames:
| v1 Key | v2 Key |
|---|---|
| `tauri` | `app` |
| `package.productName` | `productName` (top-level) |
| `build.distDir` | `build.frontendDist` |
| `build.devPath` | `build.devUrl` |
| `tauri.allowlist` | removed (use capabilities) |
| `tauri.systemTray` | `app.trayIcon` |
| `tauri.bundle` | `bundle` (top-level) |
| cli/updater config | `plugins.cli` / `plugins.updater` |
Must add `identifier` (reverse-domain) and `mainBinaryName` at top level.
```json
{
"productName": "my-app",
"version": "0.1.0",
"identifier": "com.example.myapp",
"mainBinaryName": "my-app",
"build": {
"frontendDist": "../dist",
"devUrl": "http://localhost:5173"
},
"app": {
"security": {
"capabilities": [
"main-capability"
]
},
"windows": [
{
"title": "My App",
"width": 800,
"height": 600
}
]
},
"bundle": {},
"plugins": {}
}
```
---
## Capabilities (replaces v1 allowlist)
Place JSON/TOML files in `src-tauri/capabilities/` (auto-enabled). Each capability grants permissions to specific windows:
```json
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "main-capability",
"windows": ["main"],
"permissions": [
"core:path:default",
"core:event:default",
"core:window:default",
"core:app:default",
"fs:read-files",
"fs:scope-home"
]
}
```
Platform-specific: add `"platforms": ["linux", "macOS", "windows"]` or `["iOS", "android"]`. Remote access: use `"remote": { "urls": ["https://*.example.com"] }` instead of `"windows"`.
Custom permission sets in `src-tauri/permissions/<name>.toml`:
```toml
[[set]]
identifier = "allow-home-read"
description = "Read access to home directory"
permissions = ["fs:read-files", "fs:scope-home"]
```
---
## IPC Channels
`tauri::ipc::Channel<T>` for ordered Rust-to-frontend streaming (replaces events for progress/streaming):
```rust
use serde::Serialize;
use tauri::ipc::Channel;
#[derive(Clone, Serialize)]
#[serde(rename_all = "camelCase", tag = "event", content = "data")]
enum DownloadEvent {
Started { url: String, content_length: usize },
Progress { chunk_length: usize },
Finished,
}
#[tauri::command]
fn download(url: String, on_event: Channel<DownloadEvent>) {
on_event
.send(DownloadEvent::Started {
url,
content_length: 1000,
})
.unwrap();
on_event.send(DownloadEvent::Finished).unwrap();
}
```
```typescript
import { invoke, Channel } from '@tauri-apps/api/core';
const onEvent = new Channel<DownloadEvent>();
onEvent.onmessage = (msg) => console.log(msg.event, msg.data);
await invoke('download', { url: 'https://example.com', onEvent });
```
Binary returns without JSON overhead: `fn read_file(path: String) -> tauri::ipc::Response { Response::new(std::fs::read(path).unwrap()) }`
---
## Mobile Entry Point
```rust
// src-tauri/src/lib.rs (shared)
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![/* commands */])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```
Desktop-only `main.rs` calls `app_lib::run()`. Add `crate-type = ["staticlib", "cdylib", "rlib"]` to `Cargo.toml [lib]`.
---
## Plugin System v2
Built-in v1 APIs moved to plugins. Install: `cargo tauri add <plugin>`. Register: `.plugin(tauri_plugin_fs::init())`.
| v1 API | v2 Plugin | JS Package |
|---|---|---|
| `tauri.allowlist.fs` | `tauri-plugin-fs` | `@tauri-apps/plugin-fs` |
| `tauri.allowlist.http` | `tauri-plugin-http` | `@tauri-apps/plugin-http` |
| `tauri.allowlist.dialog` | `tauri-plugin-dialog` | `@tauri-apps/plugin-dialog` |
| `tauri.allowlist.shell` | `tauri-plugin-shell` | `@tauri-apps/plugin-shell` |
| `tauri.updater` | `tauri-plugin-updater` | `@tauri-apps/plugin-updater` |
| `@tauri-apps/api/clipboard` | `tauri-plugin-clipboard-manager` | `@tauri-apps/plugin-clipboard-manager` |
| `@tauri-apps/api/notification` | `tauri-plugin-notification` | `@tauri-apps/plugin-notification` |
| `@tauri-apps/api/os` | `tauri-plugin-os` | `@tauri-apps/plugin-os` |
| `@tauri-apps/api/process` | `tauri-plugin-process` | `@tauri-apps/plugin-process` |
JS imports: `@tauri-apps/api/tauri` -> `@tauri-apps/api/core`. `@tauri-apps/api/window` -> `@tauri-apps/api/webviewWindow`.
---
## Event System
`Emitter` and `Listener` are now traits — `use tauri::{Emitter, Listener}`. `emit` sends to all. `emit_to` targets a webview. `emit_filter` filters by `EventTarget`. `listen_global` renamed to `listen_any`.
---
## Notable API Additions (v2.1–v2.5)
| API | Version |
|---|---|
| `Window::set_background_color` / `WindowBuilder::background_color` | v2.1 |
| `app > security > headers` config for response headers | v2.1 |
| `useHttpsScheme` config option (Windows/Android) | v2.1 |
| `WebviewBuilder::devtools` (per-webview) | v2.1 |
| `set_badge_count`, `set_overlay_icon`, `set_badge_label` | v2.2 |
| `WebviewBuilder::data_store_identifier` (macOS) | v2.2 |
| `WebviewBuilder::extensions_path` (Linux/Windows) | v2.2 |
| `emit_str*` methods (pre-serialized JSON) | v2.3 |
| `App::run_return` (returns exit code) | v2.4 |
| `AppHandle::request_restart()` | v2.4 |
| `Webview::reload` / `WebviewWindow::reload` | v2.4 |
| `Webview::cookies()` / `cookies_for_url()` | v2.4 |
| `build > removeUnusedCommands` config | v2.4 |
| `WebviewBuilder::disable_javascript` | v2.4 |
| `trafficLightPosition` window config (macOS) | v2.4 |
| `set_dock_visibility` (macOS) | v2.5 |
| `initialization_script_on_all_frames` (iframe) | v2.5 |
| `preventOverflow` config (clamp to monitor) | v2.5 |
| `WebviewBuilder::allow_link_preview` (macOS/iOS) | v2.5 |
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.