configuring-tauri-capabilities

Configure Tauri capability files to control per-window permissions and security boundaries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Tauri applications expose backend APIs to the frontend, and without proper capability configuration every window can access every command, creating security risks. This Skill guides you through defining granular capability files so each window only gets the permissions it actually needs. ## Core Features & Use Cases - Capability File Authoring: Create JSON or TOML capability files in src-tauri/capabilities with identifiers, window targets, permissions, and platform constraints. - Per-Window Security Boundaries: Assign different permission sets to main, settings, and preview windows using labels and wildcard patterns. - Platform-Specific Configuration: Target desktop (linux, macOS, windows) or mobile (iOS, android) platforms with separate capability variants, plus remote URL access rules. - Use Case: You are building a multi-window Tauri 2 desktop app and need the settings window to have read-only file access while the main window retains full fs, shell, and dialog permissions. ## Quick Start Ask the AI to create a Tauri capability file that grants the main window default core and filesystem permissions while restricting the settings window to read-only access.

Frequently Asked Questions about configuring-tauri-capabilities

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

FAQPage Schema
How do I configure Tauri capabilities for multiple windows?

Create separate capability files in src-tauri/capabilities, each with a unique identifier and a windows array listing target window labels. Assign only the permissions each window needs, then reference the identifiers in tauri.conf.json under app.security.capabilities.

What is the Tauri permission syntax for allowing specific commands?

Permissions follow the pattern plugin:default, plugin:allow-command, or plugin:deny-command. For example, fs:allow-read-file permits reading files while core:window:allow-close permits closing windows. Defaults grant the plugin's standard permission set.

Can Tauri capabilities target specific platforms like Linux or iOS?

Yes, add a platforms array to the capability file with values like linux, macOS, windows, iOS, or android. You can create separate desktop.json and mobile.json capability files so each platform receives only its relevant permissions.

Why is my Tauri capability not being applied to a window?

Verify the capability file is in src-tauri/capabilities or explicitly listed in tauri.conf.json. Also confirm the window label in the capability matches the label used when creating the window in Rust code, since labels are case-sensitive.

What do Tauri capabilities not protect against?

Capabilities do not protect against malicious Rust code, overly permissive scopes, or WebView vulnerabilities. They only limit which APIs the frontend can access, so backend code and permission scopes still require separate review.