Skip to content
Development
Skill

/desktop-security-tauri

Tauri 2.x deny-by-default security model, capabilities, permissions, scopes, ACL

From plugin
skills
26200 skills

Claude Code

$ npx -y skills add agents-inc/skills --skill desktop-security-tauri --agent claude-code

SKILL.md

desktop-security-tauri.SKILL.md
name: desktop-security-tauri
description: Tauri 2.x deny-by-default security model, capabilities, permissions, scopes, ACL

Tauri Capabilities & ACL

> **Quick Guide:** Tauri 2 uses a deny-by-default security model. Nothing is accessible unless explicitly granted in a capability file (`src-tauri/capabilities/*.json`). Capabilities bind permissions to specific windows. Permissions follow the `plugin:command` identifier pattern. Scopes restrict operations to specific paths or URLs with allow/deny lists (deny always wins). Every plugin and custom command needs a permission grant -- missing permissions cause runtime errors, not compile errors. > > **Current version:** Tauri 2.x (stable). Tauri 1.x used a boolean allowlist which is completely removed in v2.

---

<critical_requirements>

CRITICAL: Before Using This Skill

**(You MUST create at least one capability file in `src-tauri/capabilities/` -- without it, ALL plugin and core API calls fail at runtime)**

**(You MUST include `core:default` in every capability -- without it, basic app lifecycle commands fail)**

**(You MUST scope permissions to specific windows using the `windows` array -- a window not listed in any capability has zero IPC access)**

**(You MUST use deny scopes to restrict sensitive paths -- deny ALWAYS takes precedence over allow)**

**(You MUST use `plugin:permission-name` format for plugin permissions and plain `permission-name` for app commands)**

</critical_requirements>

---

**Auto-detection:** Tauri capabilities, src-tauri/capabilities, capability file, permissions, ACL, allow-scope, deny-scope, core:default, fs:allow, shell:allow, http:allow, permission set, remote domain, CapabilityRemote, desktop-schema.json, mobile-schema.json, scope allow deny, Tauri security, tauri permission denied, capability identifier

**When to use:**

  • Creating or modifying capability files for a Tauri 2 app
  • Granting permissions to specific windows or webviews
  • Restricting filesystem, HTTP, or shell access with scoped permissions
  • Writing custom permissions for your own Tauri commands
  • Grouping permissions into permission sets
  • Enabling remote domain access to Tauri APIs
  • Debugging "permission denied" or "not allowed" runtime errors
  • Migrating from the Tauri v1 allowlist to v2 capabilities

**When NOT to use:**

  • Writing Tauri commands or IPC bridge logic (use desktop-framework-tauri)
  • Plugin installation and registration (use desktop-framework-tauri)
  • Window management, system tray, or menus (use desktop-framework-tauri)
  • General Rust programming unrelated to Tauri ACL
  • Frontend framework patterns

**Key patterns covered:**

  • Capability file structure and fields ([examples/core.md](examples/core.md))
  • Window-specific and platform-specific capabilities ([examples/core.md](examples/core.md))
  • Scoped permissions with allow/deny lists ([examples/core.md](examples/core.md))
  • Custom permission definitions in TOML ([examples/custom-permissions.md](examples/custom-permissions.md))
  • Permission sets for grouping related permissions ([examples/custom-permissions.md](examples/custom-permissions.md))
  • Remote domain access ([examples/core.md](examples/core.md))
  • Debugging permission errors ([examples/core.md](examples/core.md))
  • Migration from v1 allowlist ([reference.md](reference.md))

**Detailed resources:**

  • [examples/core.md](examples/core.md) - Capability files, scoped permissions, window/platform targeting, remote access, debugging
  • [examples/custom-permissions.md](examples/custom-permissions.md) - Custom permission definitions, permission sets, app-level permissions
  • [reference.md](reference.md) - Permission identifier patterns, path variables, core permissions, v1 migration checklist

---

<philosophy>

Philosophy

Tauri 2 implements a **deny-by-default** access control model. Every potentially dangerous operation (filesystem, network, shell, clipboard) is blocked until explicitly granted in a capability file. This is a fundamental shift from v1's boolean allowlist -- instead of toggling features on/off globally, you define granular permissions scoped to specific windows, platforms, and paths.

**The security hierarchy:**

1. **Capabilities** - Bind permissions to windows/webviews. A window not listed in any capability has zero IPC access. 2. **Permissions** - Define what operations are allowed or denied. Follow the `plugin:command` identifier pattern. 3. **Scopes** - Restrict WHERE operations can act (paths, URLs). Deny always supersedes allow.

**Key design decisions:**

  • **Granular, not global** -- permissions are per-window, per-platform, per-path
  • **Deny wins** -- if a path is denied by any scope, it is blocked even if allowed by another
  • **Runtime, not compile-time** -- missing permissions cause runtime errors, not build errors. This makes debugging harder but allows dynamic permission resolution.
  • **Schema-driven** -- capability files reference auto-generated schemas (`desktop-schema.json`, `mobile-schema.json`) for IDE autocompletion

**When to invest in fine-grained capabilities:**

  • Multi-window apps where windows need different permission levels
  • Apps handling sensitive data (credentials, financial records)
  • Apps distributed publicly where security posture matters
  • Apps with remote content that needs limited API access

**When simple capabilities suffice:**

  • Single-window apps with straightforward needs
  • Internal tools where the security boundary is less critical
  • Prototypes and MVPs where iteration speed matters more

</philosophy>

---

<patterns>

Core Patterns

Pattern 1: Capability File Structure

Every Tauri 2 app needs at least one capability file in `src-tauri/capabilities/`. The file grants permissions to specific windows.

{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "main-capability",
  "description": "Permissions for the main application window",
  "windows": ["main"],
  "permissions": ["core:default", "event:default", "win
Read more
@agents-inc
Ships withskills

The official skills marketplace for Agents Inc. 230+ skills covering everything from React and Prisma to Redis, ElevenLabs, and infrastructure tooling. Pick the skills that match your stack and install them via Claude Code. Need more control?

Stars on GitHub

Momentum

stars in total
26
Star history of agents-inc/skills on GitHub, a chart by star-history.com

Other skills on skills.

ai-infrastructure-litellm

ai-infrastructure-lite…

LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking,…

@agents-inc@agents-incInstall Skill
ai-infrastructure-modal

ai-infrastructure-moda…

Serverless GPU compute platform for AI model deployment — web endpoints, GPU functions, model serving, and TypeScript client…

@agents-inc@agents-incInstall Skill
ai-infrastructure-ollama

ai-infrastructure-olla…

Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output,…

@agents-inc@agents-incInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about desktop-security-tauri.

Which coding agents can use desktop-security-tauri?
desktop-security-tauri installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.