Tauri Desktop Agent Harness

    1

    A safety harness for AI agents working inside Tauri v2 desktop apps that touch the user's disk.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    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_checksum to AppManifest.
    • 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

    1. Run npm run verify:tauri-commands to confirm the permission TOML matches the capability list.
    2. Run cargo test to verify the checksum logic against the provided test fixtures.
    3. 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

    1. Task Start Protocol: The agent catalogs Git status, reads project-specific design policies, and defines a three-line "proving command" before editing.
    2. IPC Checklist: Every new command follows the mandatory six-link contract (Rust fn, build.rs, permission TOML, capability JSON, lib.rs handler, TS client).
    3. Guard Verification: Run internal scripts to catch mismatch errors between registered commands and granted capabilities.
    4. Safety Ladder: A tiered verification process ranging from cargo clippy to 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed2 days ago

    What's inside

    Frequently Asked Questions

    This harness enforces a 'six-link' contract that synchronizes Rust handlers, build scripts, and permission manifests, preventing the 'command not allowed' runtime errors common in Tauri v2 development.

    The skill is optimized for AI agents capable of multi-file editing and terminal access (like Claude Engineer or Aider) working within Tauri v2, React 19, and Zustand environments.

    It includes a specialized set of safety protocols, path normalization logic, and validation scripts designed to be imported into your agent's workspace to govern its coding behavior.

    The harness includes a 'Safety Ladder' protocol that prevents agents from performing destructive file operations like recursive deletes outside of designated safe zones or without explicit verification.

    It requires an existing Tauri v2 project where 'tauri dev' is functional; it is not compatible with Tauri v1 or projects using state management libraries other than Zustand without manual adjustment.

    The harness handles cross-platform inconsistencies such as macOS NFD Unicode normalization, symlink recursion loops, and Windows-specific filename collisions that standard LLM prompts often ignore.

    New in Frontend & Web Apps

    Free