Skip to content
cccskills
FreePublished on GitHub

tauri-expert

Expert skill for Tauri (v2) development, Rust backend, IPC, and security / Panduan ahli untuk pengembangan Tauri v2, Rust backend, IPC, dan keamanan.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md6.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Tauri Expert

English | Bahasa Indonesia


<a name="english"></a>

English

Orchestration & Integration

Connects and orchestrates with relevant domain skills like brainstorming, zero-to-prod-orchestrator, and session-memory-manager to ensure cohesive execution.

Description

This skill provides best practice guidance for building cross-platform desktop and mobile applications using Tauri (specifically Tauri v2). It covers frontend integration with the Rust backend, Inter-Process Communication (IPC), state management, and security.

Instructions & Best Practices

1. Architecture & IPC (Inter-Process Communication)

  • Use tauri::command to define Rust functions callable from the frontend.
  • Invoke Rust functions from the frontend using @tauri-apps/api/core (invoke).
  • Utilize Tauri's event system (emit from Rust, listen on frontend) for real-time or async updates.
  • Keep heavy processing and filesystem access in Rust (backend), while the frontend focuses purely on UI.

2. State Management (Rust Backend)

  • Use tauri::State to store and manage global state in the Rust backend.
  • Use std::sync::Mutex or tokio::sync::Mutex (if async) for mutable state.
  • Initialize managed state during application setup: tauri::Builder::default().manage(MyState::default()).

3. Security & Capabilities

  • Enforce strict context isolation.
  • In Tauri v2, use the Capabilities system to restrict API access per window or plugin.
  • Never expose dangerous filesystem, shell, or network APIs globally. Only grant allowlist access to specific, required paths or commands.

4. Performance & Concurrency

  • Use async fn for tauri::command when handling heavy I/O to avoid blocking the main thread.
  • Use serde (Serialize, Deserialize) efficiently for data structures sent between Rust and the frontend.

5. Plugin Management (Tauri v2)

  • Use official Tauri plugins (e.g., tauri-plugin-fs, tauri-plugin-store, tauri-plugin-dialog) instead of writing custom I/O modules when available.
  • Initialize plugins in main.rs or lib.rs: app.plugin(tauri_plugin_dialog::init()).

6. Cross-Platform & Build

  • Avoid hardcoded paths. Use the app_handle.path() resolver for AppData, Cache, and other system directories.
  • Ensure dependencies in Cargo.toml support cross-compilation (Windows, macOS, Linux, iOS, Android).

Trigger Conditions

Active when:

  • Building, debugging, or refactoring Tauri applications.
  • Writing IPC systems between the frontend (React/Svelte/Vue) and the Rust backend.
  • Configuring security (tauri.conf.json, capabilities, permissions).

Implementation Examples

1. Rust Backend Command Definition (src-tauri/src/lib.rs)

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize)]
pub struct MetricsPayload {
    pub cpu_usage: f32,
    pub memory_used_mb: u64,
}

#[tauri::command]
pub async fn fetch_system_metrics() -> Result<MetricsPayload, String> {
    Ok(MetricsPayload {
        cpu_usage: 12.4,
        memory_used_mb: 2048,
    })
}

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![fetch_system_metrics])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

2. Frontend TypeScript Invocation (src/lib/metrics.ts)

import { invoke } from '@tauri-apps/api/core';

export interface MetricsPayload {
  cpu_usage: number;
  memory_used_mb: number;
}

export async function getSystemMetrics(): Promise<MetricsPayload> {
  return await invoke<MetricsPayload>('fetch_system_metrics');
}

<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Integrasi Orkestrasi

Terhubung dan mengorkestrasi skill domain yang relevan seperti brainstorming, zero-to-prod-orchestrator, dan session-memory-manager untuk memastikan eksekusi yang kohesif.

Deskripsi

Skill ini memberikan panduan praktik terbaik (best practices) untuk membangun aplikasi desktop dan mobile lintas platform menggunakan Tauri (terutama Tauri v2). Skill ini mencakup integrasi frontend dengan backend Rust, Inter-Process Communication (IPC), manajemen state, serta keamanan.

Instruksi & Praktik Terbaik

1. Arsitektur & IPC (Inter-Process Communication)

  • Gunakan tauri::command untuk mendefinisikan fungsi Rust yang bisa dipanggil dari frontend.
  • Panggil fungsi Rust dari frontend menggunakan @tauri-apps/api/core (invoke).
  • Manfaatkan sistem event Tauri (emit dari Rust, listen di frontend) untuk pembaruan real-time atau asinkron dari backend.
  • Lakukan operasi berat di sisi Rust (backend), sedangkan frontend hanya fokus pada UI.

2. Manajemen State (Rust Backend)

  • Gunakan tauri::State untuk menyimpan dan mengelola state global di backend Rust.
  • Gunakan std::sync::Mutex or tokio::sync::Mutex (jika asinkron) untuk state yang bisa berubah (mutable state).
  • Lakukan inisialisasi state saat setup aplikasi: tauri::Builder::default().manage(MyState::default()).

3. Keamanan (Security & Capabilities)

  • Terapkan isolasi konteks secara ketat.
  • Di Tauri v2, gunakan sistem Capabilities untuk membatasi akses API per jendela/plugin.
  • Jangan mengekspos API filesystem, shell, atau jaringan yang berbahaya secara global. Hanya beri akses (allowlist) ke path atau perintah (commands) yang spesifik dan dibutuhkan.

4. Kinerja & Asinkronisitas

  • Gunakan async fn pada tauri::command untuk I/O yang berat agar tidak memblokir main thread.
  • Gunakan serde (Serialize, Deserialize) secara efisien untuk mengirim struktur data kompleks antara Rust dan frontend.

5. Pengelolaan Plugin (Tauri v2)

  • Gunakan ekosistem plugin Tauri (seperti tauri-plugin-fs, tauri-plugin-store, tauri-plugin-dialog) alih-alih membuat modul I/O sendiri jika sudah tersedia.
  • Inisialisasi plugin di file main.rs atau lib.rs: app.plugin(tauri_plugin_dialog::init()).

6. Lintas Platform (Cross-Platform) & Build

  • Hindari hardcode path sistem operasi. Gunakan app_handle.path() resolver untuk direktori AppData, Cache, dsb.
  • Pastikan dependencies di Cargo.toml mendukung cross-compilation (Windows, macOS, Linux, iOS, Android).

Kondisi Pemicu

Aktif saat:

  • Membangun, men-debug, atau melakukan refactoring pada aplikasi Tauri.
  • Menulis sistem IPC antara frontend (React/Svelte/Vue) dan backend Rust.
  • Mengonfigurasi keamanan (tauri.conf.json, capabilities, permission).

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug80Updated Oct 19, 2026

Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug80Updated Oct 19, 2026

Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug80Updated Oct 19, 2026

Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug80Updated Oct 19, 2026

Expert guide for autonomous Machine-to-Machine (M2M) agent settlement, dual-rail fiat & stablecoin micro-clearing, dynamic budget envelopes, and cryptographic agent invoicing / Panduan ahli settlement otonom antar-agen (M2M), kliring mikro dual-rail fiat & stablecoin, pagu anggaran dinamis, dan penagihan agen kriptografis.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug80Updated Oct 19, 2026

Expert guide for long-term episodic memory integration (Mem0 v2, Letta/MemGPT, Zep v2), memory tier architecture, pgvector HNSW storage, and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang (Mem0 v2, Letta/MemGPT, Zep v2), arsitektur tier memori, penyimpanan pgvector HNSW, dan manajemen konteks terpadu untuk agen AI otonom.

The English summary is being prepared. Showing the original description.

roedyrustam/vibes-plug80Updated Oct 19, 2026

See all skills by roedyrustam

Report a problem with this skill