Skip to content
Back to skills

Tauri Capabilities And Commands

ASecurity

Expose native capability in Tauri through #[tauri::command] handlers with validated input, authorized by a least-privilege capabilities/permissions allow-list (v2) scoped to the windows that need it — no wildcard fs/shell scopes.

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 23, 2026
ai-agentsrustshellfrontend

Security analysis

A100/100

Scanned September 23, 2026

npx -y skills add mcorbett51090/RavenClaude --skill tauri-capabilities-and-commands --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tauri Capabilities And Commands?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tauri Capabilities And Commands
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mcorbett51090-tauri-capabilities-and-commands/badge)](https://www.skillsdirectory.com/skills/mcorbett51090-tauri-capabilities-and-commands)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tauri-capabilities-and-commands
description: "Expose native capability in Tauri through #[tauri::command] handlers with validated input, authorized by a least-privilege capabilities/permissions allow-list (v2) scoped to the windows that need it — no wildcard fs/shell scopes."
---

# Tauri Capabilities & Commands

## A command is an untrusted entry point

```rust
// src-tauri/src/lib.rs — validate every argument
#[tauri::command]
fn read_doc(id: String) -> Result<String, String> {
    if id.len() > 64 || !id.chars().all(|c| c.is_ascii_alphanumeric() || c == '-') {
        return Err("bad id".into());
    }
    load_doc(&id).map_err(|e| e.to_string())
}
```

The frontend calls it with `invoke("read_doc", { id })`. The command runs in Rust; the frontend never touches the filesystem directly.

## Capabilities authorize what the frontend may call (v2)

```json
// src-tauri/capabilities/default.json — least privilege
{
  "identifier": "default",
  "windows": ["main"],
  "permissions": ["core:default", "fs:allow-read-text-file"]
}
```

Default-deny: add only the permissions a window actually uses. **Never** grant wildcard `fs:` or `shell:` scopes — scope filesystem permissions to specific paths and shell permissions to the exact program + argument shape.

## Sidecars

Bundle an external binary as a sidecar and narrow the shell/scope permission to that exact program and its allowed args — not a blanket execute capability.

## State

Share state across commands with `tauri::State` (managed state; `Mutex`/`RwLock` for shared-mutable) so borrows stay race-free.

> Tauri v2's permission/capability model is the assumed baseline — `[verify-at-use]` against the current docs before quoting specifics. Signing/notarization/update → `desktop-platform-engineer`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…