tauri-syntax-permissions
Configures Tauri 2.x capabilities and plugin permissions to ensure security.
Install
mkdir -p .claude/skills/tauri-syntax-permissions && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14461" && unzip -o skill.zip -d .claude/skills/tauri-syntax-permissions && rm skill.zipInstalls to .claude/skills/tauri-syntax-permissions
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when configuring permissions, creating capability files, setting up plugin access control, or debugging permission denied errors. Prevents using v1 allowlist patterns and overly permissive wildcard capabilities that compromise security. Covers capability file structure, permission definitions in TOML, scope configuration, plugin and custom command permissions. Keywords: tauri permissions, capabilities, allow, deny, scope, TOML, plugin permissions, access control, ACL.Key capabilities
- →Configure permissions for Tauri 2.x applications.
- →Create capability files in JSON or TOML format.
- →Define custom command permissions.
- →Set up plugin access control.
- →Configure scope for file system access.
- →Debug permission denied errors.
How it works
This skill guides the configuration of Tauri 2.x permissions by defining capability files and app-level permissions in TOML, replacing the v1 allowlist, and ensuring explicit access control for plugins and custom commands.
Inputs & outputs
When to use tauri-syntax-permissions
- →Configure plugin permissions
- →Set up capability files
- →Debug permission denied errors
About this skill
tauri-syntax-permissions
This system is NEW IN TAURI 2 — it replaces the v1 allowlist entirely. Claude frequently generates v1-style
allowlistconfig which does not exist in v2.
Quick Reference
Permission Naming Convention
| Format | Example | Description |
|---|---|---|
<plugin>:default | fs:default | Default safe permissions for a plugin |
<plugin>:allow-<command> | fs:allow-read-file | Allow a specific command |
<plugin>:deny-<command> | fs:deny-write-file | Deny a specific command |
<plugin>:<custom-set> | fs:read-files | Custom permission set |
core:<module>:default | core:window:default | Core module defaults |
core:<module>:allow-<cmd> | core:window:allow-set-title | Allow specific core command |
allow-<command> | allow-greet | Custom app command (no plugin prefix) |
File Locations
| File | Location | Format | Purpose |
|---|---|---|---|
| Capability files | src-tauri/capabilities/*.json | JSON or TOML | Assign permissions to windows |
| App permissions | src-tauri/permissions/*.toml | TOML only | Define custom command permissions |
| Generated schemas | src-tauri/gen/schemas/ | JSON | IDE autocompletion |
Capability File Properties
| Property | Type | Required | Description |
|---|---|---|---|
$schema | string | No | Path to generated schema for IDE support |
identifier | string | Yes | Unique capability name |
description | string | No | Purpose description |
windows | string[] | Yes | Window labels ("*" for all) |
permissions | string[] | Yes | Permission identifiers |
platforms | string[] | No | "linux", "macOS", "windows", "iOS", "android" |
remote | object | No | Remote URL access config |
Critical Warnings
NEVER use Tauri v1 allowlist syntax in tauri.conf.json — the allowlist was completely removed in v2. Use capability files instead.
NEVER assume plugins have permissions by default — installing a plugin crate and npm package does NOT grant any permissions. You MUST add permissions to a capability file or commands will fail with "command not allowed".
NEVER use "windows": ["*"] with broad permissions in production — this grants every window the same access. Use specific window labels.
NEVER write application permission definitions in JSON format — app-level permissions in src-tauri/permissions/ MUST be TOML. Only capability files support JSON.
ALWAYS add core:default or the specific core:*:default permissions your app needs — core features (window management, events, paths, menus) require explicit permissions in v2.
ALWAYS run cargo build after modifying permission/capability files — permissions are validated and compiled at build time.
Essential Patterns
Pattern 1: Minimal Capability File
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Default capabilities for the main window",
"windows": ["main"],
"permissions": [
"core:default",
"core:window:default",
"core:app:default"
]
}
Save as src-tauri/capabilities/default.json. Files in the capabilities/ directory are automatically enabled.
Pattern 2: Plugin Permissions
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Main window with plugin access",
"windows": ["main"],
"permissions": [
"core:default",
"core:window:default",
"core:app:default",
"core:event:default",
"core:path:default",
"fs:default",
"fs:allow-read-file",
"dialog:default",
"dialog:allow-open",
"shell:default",
"http:default",
"notification:default",
"clipboard-manager:allow-read",
"clipboard-manager:allow-write"
]
}
Pattern 3: Custom Command Permissions
Step 1 — Define the Rust command:
#[tauri::command]
fn save_document(title: String, content: String) -> Result<(), String> {
// ... save logic
Ok(())
}
// Register in builder:
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![save_document])
Step 2 — Create permission file (src-tauri/permissions/my-commands.toml):
[[permission]]
identifier = "allow-save-document"
description = "Allows invoking the save_document command"
commands.allow = ["save_document"]
[[permission]]
identifier = "deny-save-document"
description = "Denies the save_document command"
commands.deny = ["save_document"]
Step 3 — Add to capability file (src-tauri/capabilities/default.json):
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"windows": ["main"],
"permissions": [
"core:default",
"allow-save-document"
]
}
Note: Custom app command permissions do NOT use a plugin prefix.
Pattern 4: Scope Configuration
# src-tauri/permissions/file-access.toml
[[permission]]
identifier = "scope-documents"
description = "Access to user documents directory"
[[scope.allow]]
path = "$DOCUMENT/*"
[[scope.deny]]
path = "$DOCUMENT/.secret/*"
{
"permissions": [
"fs:default",
"fs:allow-read-file",
"scope-documents"
]
}
Pattern 5: Permission Sets
Bundle multiple permissions under a single identifier:
# src-tauri/permissions/document-editor.toml
[[set]]
identifier = "document-editor-full"
description = "All permissions for the document editor feature"
permissions = [
"fs:default",
"fs:allow-read-file",
"fs:allow-write-file",
"dialog:allow-open",
"dialog:allow-save",
"allow-save-document",
"allow-load-document"
]
Pattern 6: Platform-Specific Capabilities
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "desktop-only",
"windows": ["main"],
"platforms": ["linux", "macOS", "windows"],
"permissions": [
"global-shortcut:allow-register",
"global-shortcut:allow-unregister"
]
}
{
"$schema": "../gen/schemas/mobile-schema.json",
"identifier": "mobile-only",
"windows": ["main"],
"platforms": ["iOS", "android"],
"permissions": [
"nfc:allow-scan",
"biometric:allow-authenticate",
"barcode-scanner:allow-scan"
]
}
Pattern 7: Remote API Access
{
"$schema": "../gen/schemas/remote-schema.json",
"identifier": "remote-capability",
"windows": ["main"],
"remote": {
"urls": ["https://*.example.com"]
},
"platforms": ["iOS", "android"],
"permissions": [
"nfc:allow-scan",
"barcode-scanner:allow-scan"
]
}
Common Plugin Permission Identifiers
| Plugin | Default | Common Allow | Common Deny |
|---|---|---|---|
fs | fs:default | fs:allow-read-file, fs:allow-write-file, fs:allow-mkdir | fs:deny-write-file |
dialog | dialog:default | dialog:allow-open, dialog:allow-save, dialog:allow-message | — |
shell | shell:default | shell:allow-open, shell:allow-execute | — |
http | http:default | http:allow-fetch | — |
notification | notification:default | notification:allow-notify | — |
clipboard-manager | — | clipboard-manager:allow-read, clipboard-manager:allow-write | — |
process | — | process:allow-restart, process:allow-exit | — |
updater | updater:default | updater:allow-check, updater:allow-download-and-install | — |
os | os:default | os:allow-platform | — |
global-shortcut | — | global-shortcut:allow-register | — |
Core Module Permissions
| Module | Default | Example Allow |
|---|---|---|
core:app | core:app:default | core:app:allow-version |
core:window | core:window:default | core:window:allow-set-title, core:window:allow-close |
core:event | core:event:default | core:event:allow-listen, core:event:allow-emit |
core:path | core:path:default | core:path:allow-resolve |
core:menu | core:menu:default | — |
core:tray | core:tray:default | — |
core:resources | core:resources:default | — |
Window Merging Behavior
When a window appears in multiple capability files, all permissions from all capabilities are merged additively. There is no override or conflict resolution — permissions accumulate.
Schema Generation
Tauri generates JSON schemas in src-tauri/gen/schemas/:
desktop-schema.jsonmobile-schema.jsonremote-schema.json
Reference via $schema for IDE autocompletion. These schemas are regenerated on build.
Inline Capabilities in tauri.conf.json
Capabilities can also be defined inline (less common):
{
"app": {
"security": {
"capabilities": [
{
"identifier": "inline-capability",
"windows": ["*"],
"permissions": ["fs:default"]
},
"my-external-capability"
]
}
}
}
Reference Links
- references/methods.md — Complete permission and capability format reference
- references/examples.md — Complete capability file examples for common scenarios
- references/anti-patterns.md — What NOT to do, with WHY explanations
Official Sources
When not to use it
- →When configuring permissions for Tauri v1 applications using `allowlist` syntax.
- →When assuming plugins have permissions by default after installation.
- →When using `"windows": ["*"]` with broad permissions in production.
Prerequisites
Limitations
- →The skill is designed for Tauri 2.x and does not support v1 `allowlist` syntax.
- →Plugins do not have permissions by default; they must be explicitly added.
- →Broad permissions with `"windows": ["*"]` are not recommended for production.
How it compares
This skill provides a structured and secure approach to Tauri 2.x permissions using capability files and explicit definitions, moving away from the deprecated v1 allowlist, offering granular control over application access.
Compared to similar skills
tauri-syntax-permissions side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| tauri-syntax-permissions (this skill) | 0 | 4mo | No flags | Intermediate |
| rust-errors | 5 | 1mo | No flags | Advanced |
| hula-skill | 3 | 7mo | Review | Intermediate |
| solana-dev | 0 | 4mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
rust-errors
EpicenterHQ
Rust to TypeScript error handling patterns for Tauri apps. Use when defining Rust errors that will be passed to TypeScript, handling Tauri command errors, or creating discriminated union error types.
hula-skill
HuLaSpark
HuLa project skill for frontend (Vue 3 + Vite + UnoCSS + Naive UI/Vant), backend (Tauri v2 + Rust + SeaORM/SQLite), full-stack flows, and build/release work. Use when the user mentions hula or HuLa or requests changes in this repository; after triggering, ask which scope (frontend/backend/fullstack/build-release) to enable.
solana-dev
solanabr
Unified skill hub for Solana development. Routes to external submodule skills (solana-foundation, sendai, solana-game, trailofbits, cloudflare, qedgen, colosseum) and local skills. Progressive disclosure — read only what you need.
tauri
BiFangKNT
构建、调试与发布 Tauri v2 应用的工程化工作流。覆盖项目初始化(create-tauri-app)、前端与 Rust 命令通信(`#[tauri::command]` + `invoke`)、状态管理、Capabilities 权限建模、插件接入、跨平台构建与问题排查。当用户需求涉及“创建 Tauri 项目”“把 Web 前端接到 Rust 后端”“最小权限配置(fs/http/shell)”“接入 Tauri 官方插件”“执行 tauri dev/build”“排查 Tauri 构建或运行错误”时使用此 skill。
perf
microsoft
Speed and memory performance rules for Rust crates, webui-framework, and webui-router.
fullstack-guardian
Jeffallan
Use when implementing features across frontend and backend, building APIs with UI, or creating end-to-end data flows. Invoke for feature implementation, API development, UI building, cross-stack work.