- Home
- Skills
- Frontend & Web Apps
- Tauri Desktop Agent Harness
Tauri Desktop Agent Harness
A safety harness for AI agents working inside Tauri v2 desktop apps that touch the user's disk.
Free
Works with the AI Agents you already use
Tauri Desktop Agent Harness
Example session with this skill installed
Add a new Tauri command called 'calculate_checksum' that takes a file path and returns a SHA256 string. Update the frontend hook and ensure all permissions are wired.
- Read your context and instructions
- Compiled the tauri desktop agent
I have implemented the calculate_checksum command across the full Tauri v2 IPC stack. This includes the Rust implementation, build script registration, and the typed frontend facade.
Implementation Details
1. Rust Implementation
Added to src-tauri/src/commands/util/checksum.rs:
#[tauri::command(rename_all = "snake_case")]
pub async fn calculate_checksum(path: String) -> Result<String, String> {
validate_fs_path(&path)?; // Using harness validation
let bytes = std::fs::read(&path).map_err(|e| e.to_string())?;
Ok(sha256::digest(&bytes))
}
2. IPC Wiring
- build.rs: Added
calculate_checksumtoAppManifest. - lib.rs: Registered in
tauri::generate_handler!. - permissions: Generated
allow-calculate-checksum.toml. - capabilities/default.json: Added
"allow-calculate-checksum".
3. Frontend Client
Added to src/hooks/tauriCommands/utilCommands.ts:
export async function calculateChecksum(path: string): Promise<string> {
return await invoke("calculate_checksum", { path });
}
Next steps
- Run
npm run verify:tauri-commandsto confirm the permission TOML matches the capability list. - Run
cargo testto verify the checksum logic against the provided test fixtures. - Test the UI call to ensure the path being passed is absolute, as relative paths will be rejected by the safety guard.
Connects securely to your tools. The creator never sees your data.
About this skill
Building desktop apps that touch user files is a high-risk task for AI agents. A single malformed path or a missing IPC permission can lead to permanent data loss or silent runtime failures in production.
This skill provides a safety-first harness for agents working with Tauri v2, Rust, and React. It enforces a strict "six-link" contract to ensure every command is properly wired across Rust handlers, build scripts, auto-generated permissions, and TypeScript facades. It prevents common desktop pitfalls like following symlinks during recursive deletes or failing to handle macOS NFD Unicode normalization.
What it does
- Enforces IPC wiring by validating the six-point connection between Rust, build scripts, capabilities, and the frontend.
- Protects user data with a destructive-operation protocol that prevents unauthorized
rm,mv, or overwrite actions outside temp directories. - Normalizes paths across platforms, handling symlinks, cloud storage mount points, and Windows/macOS/Linux filename inconsistencies.
- Standardizes state updates using Zustand patterns that prevent stale snapshots after asynchronous IPC awaits.
- Validates security boundaries by blocking agents from widening CSPs or filesystem allowlists to bypass errors.
How it works
- Task Start Protocol: The agent catalogs Git status, reads project-specific design policies, and defines a three-line "proving command" before editing.
- IPC Checklist: Every new command follows the mandatory six-link contract (Rust fn, build.rs, permission TOML, capability JSON, lib.rs handler, TS client).
- Guard Verification: Run internal scripts to catch mismatch errors between registered commands and granted capabilities.
- Safety Ladder: A tiered verification process ranging from
cargo clippyto cross-link alignment checks before any commit.
Frameworks & tools
Tauri v2 (Rust backend), React 19+, TypeScript, Zustand, and Vitest. Works with tauri-build for manifest management and standard Rust/Node.js toolchains.
Why this beats prompting it yourself
Standard prompts often forget that Tauri v2 permissions are autogenerated by the build script, leading to "command not allowed" errors that only appear in production builds. This skill embeds hard-won logic for cross-platform path safety that generic LLMs frequently overlook, such as case-insensitive rename collisions and symlink recursion loops.
Use cases
- Adding new Rust commands to a Tauri app without breaking the permission model.
- Implementing file manager features like "Move to Trash" vs "Permanent Delete" safely.
- Refactoring Zustand stores that interact with asynchronous Rust events.
- Debugging "Missing required key" errors caused by Rust snake_case vs JS camelCase mismatches.
Known limitations
Requires a Tauri v2 environment where tauri dev is already functional. Does not support Tauri v1 or non-Zustand state libraries without manual adaptation.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Frontend & Web Apps.
Requires Tauri v2 and Zustand. Assumes a functional tauri dev environment. Does not cover UI/UX design, only logic and IPC safety.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 2 days ago
- Free with an Agensi account
- Software
Git