managing-tauri-plugin-permissions

Configures Tauri capabilities, plugin permissions, and scoped access for desktop and mobile apps.

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/dt418/better-shot-x --skill managing-tauri-plugin-permissions-dt418
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managing-tauri-plugin-permissions
Source: https://github.com/dt418/better-shot-x/tree/main/.agents/skills/managing-tauri-plugin-permissions
Command: npx skills add https://github.com/dt418/better-shot-x --skill managing-tauri-plugin-permissions-dt418

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Tauri applications deny all plugin commands by default, so developers must correctly wire capabilities, permission identifiers, and scopes or their app fails with permission errors or ships with overly broad access. ## Core Features & Use Cases - Capability Configuration: Create JSON capability files targeting specific windows and platforms (linux, windows, macos, android, ios) with least-privilege permission sets. - Scoped Permissions: Restrict filesystem and other plugin access using scope variables like $HOME, $APP, and $DOCUMENT instead of blanket allow rules. - Custom Plugin Permissions: Auto-generate allow/deny permissions from plugin commands and define tiered permission sets (default, read-write, full-access) in TOML. - Use Case: You are building a cross-platform Tauri app where the main window needs read access to ~/Documents but the settings window should only touch app data. This Skill walks you through writing separate capability files with scoped fs permissions for each window. ## Quick Start Ask the assistant to create a Tauri capability file that grants the main window scoped read access to the Documents folder and write access to the app data directory.

Frequently Asked Questions about managing-tauri-plugin-permissions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Tauri plugin permissions for a specific window?

Create a JSON capability file in src-tauri/capabilities with a windows array containing the window label, then list the required permissions such as fs:allow-read or dialog:allow-open. Each window can have its own capability file so it only receives the permissions it needs.

How do I restrict Tauri filesystem access to specific paths?

Use scoped permissions by passing an object with the permission identifier and an allow array of paths, for example fs:allow-read limited to $HOME/Documents/**. Scope variables like $APP, $HOME, $RESOURCE, and $TEMP map to standard directories.

Can Tauri capabilities target specific platforms like Android or Linux?

Yes, the platforms field in a capability file accepts linux, windows, macos, android, and ios. This lets you grant mobile-only permissions such as camera access without exposing them on desktop builds.

How do I create custom permissions for a Tauri plugin?

List your command names in build.rs using tauri_plugin::Builder, which auto-generates allow and deny permissions per command. Then define default and tiered permission sets in TOML files under the plugin's permissions directory.

Why is my Tauri command failing with a permission denied error?

Permission errors usually come from invalid capability JSON, a mismatched window label, a wrong permission identifier, or a missing path scope. Verify the file sits in src-tauri/capabilities, the platforms field includes your OS, and rebuild after changes.