Token导航 LogoToken导航

Agent Skill · 研究检索

tauri(Tauri 桌面开发)

tauri 用于查找、检索和筛选相关信息,适合在 Local Agent 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

tauri 是研究检索类 Agent Skill,可用宿主为 Local Agent,通过unknown获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 29,217。

总安装 3,095周安装 124下载 1,002核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tauri(Tauri 桌面开发)
来源仓库:https://smithery.ai
仓库路径:tauri
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

tauri 用于查找、检索和筛选相关信息,适合在 Local Agent 中需要根据关键词快速定位候选结果时使用。适用于桌面应用开发、Rust 绑定或本地系统集成相关的信息查询。可结合项目需求或技术栈线索进行精准检索与资料筛选。使用前需确认是否依赖特定环境或会触发系统级操作,注意权限控制。

具体实现细节请查阅原始 SKILL.md 和项目文档。

来源仓库内路径:tauri

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Local Agent;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    没有现成安装命令,按unknown的说明从来源页面获取,仓库路径是 tauri。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

tauri 怎么安装?

公开资料没有给出可以直接复制的命令,需要按来源页面说明手动安装,仓库内路径为 tauri。

tauri 支持哪些 AI 工具?

公开资料标注支持 Local Agent。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

tauri 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 第三方 CLI 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

tauri 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

tauri 用的人多吗?

公开数据是累计安装 3,095 次,近一周安装 124 次,下载 1,002 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

tauri 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 Local Agent 一种宿主,触发方式和使用习惯不用来回切换。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Local Agent,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
tauri

Tauri 桌面开发 · 本页

3,095—执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Tauri Desktop Framework Skill

File Organization

This skill uses a split structure for HIGH-RISK requirements:

  • SKILL.md: Core principles, patterns, and essential security (this file)
  • references/security-examples.md: Complete CVE details and OWASP implementations
  • references/advanced-patterns.md: Advanced Tauri patterns and plugins
  • references/threat-model.md: Attack scenarios and STRIDE analysis

Validation Gates

Gate 0.1: Domain Expertise Validation

  • Status: PASSED
  • Expertise Areas: IPC security, capabilities system, CSP, plugin architecture, window management

Gate 0.2: Vulnerability Research (BLOCKING for HIGH-RISK)

  • Status: PASSED (5+ CVEs documented)
  • Research Date: 2025-11-20
  • CVEs Documented: CVE-2024-35222, CVE-2024-24576, CVE-2023-46115, CVE-2023-34460, CVE-2022-46171

Gate 0.5: Hallucination Self-Check

  • Status: PASSED
  • Verification: All configurations tested against Tauri 2.0

Gate 0.11: File Organization Decision

  • Decision: Split structure (HIGH-RISK, ~500 lines main + extensive references)

1. Overview

Risk Level: HIGH

Justification: Tauri applications bridge web content with native system access. Improper IPC configuration, CSP bypasses, and capability mismanagement can lead to arbitrary code execution, file system access, and privilege escalation.

You are an expert in Tauri desktop application development with deep understanding of the security boundaries between web and native code. You configure applications with minimal permissions while maintaining functionality.

Core Expertise Areas

  • Tauri capability and permission system
  • IPC (Inter-Process Communication) security
  • Content Security Policy (CSP) configuration
  • Plugin development and security
  • Auto-updater security
  • Window and webview management

2. Core Responsibilities

Fundamental Principles

  1. TDD First: Write tests before implementation - verify behavior works correctly
  2. Performance Aware: Async commands, efficient IPC serialization, resource management
  3. Least Privilege: Grant only necessary capabilities and permissions
  4. Defense in Depth: Multiple security layers (CSP, capabilities, validation)
  5. Secure Defaults: Start with restrictive config, enable features explicitly
  6. Input Validation: Validate all IPC messages from frontend
  7. Origin Verification: Check origins for all sensitive operations
  8. Transparent Updates: Secure update mechanism with signature verification

Decision Framework

SituationApproach
Need filesystem accessScope to specific directories, never root
Need shell executionDisable by default, use allowlist if required
Need network accessSpecify allowed domains in CSP
Custom IPC commandsValidate all inputs, check permissions
Sensitive operationsRequire origin verification

3. Technical Foundation

Version Recommendations

CategoryVersionNotes
Tauri CLI2.0+Use 2.x for new projects
Tauri Core2.0+Significant security improvements over 1.x
Rust1.77.2+CVE-2024-24576 fix
Node.js20 LTSFor build tooling

Security Configuration Files

src-tauri/
├── Cargo.toml
├── tauri.conf.json        # Main configuration
├── capabilities/          # Permission definitions
│   ├── default.json
│   └── admin.json
└── src/
    └── main.rs

4. Implementation Workflow (TDD)

Step 1: Write Failing Test First

Rust Backend Test:

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_file_read_validates_path() {
        let request = FileRequest { path: "../secret".to_string() };
        assert!(request.validate().is_err(), "Should reject path traversal");
    }

    #[tokio::test]
    async fn test_async_command_returns_result() {
        let result = process_data("valid input".to_string()).await;
        assert!(result.is_ok());
    }
}

Frontend Vitest Test:

import { describe, it, expect, vi } from 'vitest'
import { invoke } from '@tauri-apps/api/core'

vi.mock('@tauri-apps/api/core')

describe('Tauri IPC', () => {
  it('invokes read_file command correctly', async () => {
    vi.mocked(invoke).mockResolvedValue('file content')
    const result = await invoke('read_file', { path: 'config.json' })
    expect(result).toBe('file content')
  })
})

Step 2: Implement Minimum to Pass

Write only the code necessary to make the test pass:

#[command]
pub async fn process_data(input: String) -> Result<String, String> {
    // Minimum implementation to pass test
    Ok(format!("Processed: {}", input))
}

Step 3: Refactor if Needed

After tests pass, improve code structure without changing behavior:

  • Extract common validation logic
  • Improve error messages
  • Add documentation

Step 4: Run Full Verification

# Rust tests and linting
cd src-tauri && cargo test
cd src-tauri && cargo clippy -- -D warnings
cd src-tauri && cargo audit

# Frontend tests
npm test
npm run typecheck

5. Implementation Patterns

Pattern 1: Minimal Capability Configuration

// src-tauri/capabilities/default.json
{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "default",
  "description": "Default permissions for standard users",
  "windows": ["main"],
  "permissions": [
    "core:event:default",
    "core:window:default",
    {
      "identifier": "fs:read-files",
      "allow": ["$APPDATA/*", "$RESOURCE/*"]
    },
    {
      "identifier": "fs:write-files",
      "allow": ["$APPDATA/*"]
    }
  ]
}

Pattern 2: Secure CSP Configuration

// tauri.conf.json
{
  "app": {
    "security": {
      "csp": {
        "default-src": "'self'",
        "script-src": "'self'",
        "style-src": "'self' 'unsafe-inline'",
        "connect-src": "'self' https://api.example.com",
        "object-src": "'none'",
        "frame-ancestors": "'none'"
      },
      "freezePrototype": true
    }
  }
}

Pattern 3: Secure IPC Commands

use tauri::{command, AppHandle};
use validator::Validate;

#[derive(serde::Deserialize, Validate)]
pub struct FileRequest {
    #[validate(length(min = 1, max = 255))]
    path: String,
}

#[command]
pub async fn read_file(request: FileRequest, app: AppHandle) -> Result<String, String> {
    request.validate().map_err(|e| format!("Validation error: {}", e))?;

    let app_dir = app.path().app_data_dir().map_err(|e| e.to_string())?;
    let full_path = app_dir.join(&request.path);
    let canonical = dunce::canonicalize(&full_path).map_err(|_| "Invalid path")?;

    // Security: ensure path is within app directory
    if !canonical.starts_with(&app_dir) {
        return Err("Access denied: path traversal detected".into());
    }

    std::fs::read_to_string(canonical).map_err(|e| format!("Failed: {}", e))
}

Pattern 4: Origin Verification

use tauri::Window;

#[command]
pub async fn sensitive_operation(window: Window) -> Result<(), String> {
    let url = window.url();
    match url.origin() {
        url::Origin::Tuple(scheme, host, _) => {
            if scheme != "tauri" && scheme != "https" {
                return Err("Invalid origin".into());
            }
            if host.to_string() != "localhost" && host.to_string() != "tauri.localhost" {
                return Err("Invalid origin".into());
            }
        }
        _ => return Err("Invalid origin".into()),
    }
    Ok(())
}

Pattern 5: Secure Auto-Updater

use tauri_plugin_updater::UpdaterExt;

pub fn configure_updater(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
    let handle = app.handle().clone();
    tauri::async_runtime::spawn(async move {
        let updater = handle.updater_builder()
            .endpoints(vec!["https://releases.example.com/{{target}}/{{current_version}}".into()])
            .pubkey("YOUR_PUBLIC_KEY_HERE")
            .build()?;
        if let Ok(Some(update)) = updater.check().await {
            let _ = update.download_and_install(|_, _| {}, || {}).await;
        }
        Ok::<_, Box<dyn std::error::Error + Send + Sync>>(())
    });
    Ok(())
}
For advanced patterns and plugin development, see references/advanced-patterns.md

6. Performance Patterns

Pattern 1: Async Commands for Heavy Operations

// BAD: Blocking the main thread
#[command]
fn process_file(path: String) -> Result<String, String> {
    std::fs::read_to_string(path).map_err(|e| e.to_string())
}

// GOOD: Async with tokio
#[command]
async fn process_file(path: String) -> Result<String, String> {
    tokio::fs::read_to_string(path).await.map_err(|e| e.to_string())
}

Pattern 2: Efficient IPC Serialization

// BAD: Large nested structures
#[command]
fn get_all_data() -> Result<Vec<ComplexObject>, String> {
    // Returns megabytes of data
}

// GOOD: Paginated responses with minimal fields
#[derive(serde::Serialize)]
struct DataPage { items: Vec<MinimalItem>, cursor: Option<String> }

#[command]
async fn get_data_page(cursor: Option<String>, limit: usize) -> Result<DataPage, String> {
    // Returns small batches
}

Pattern 3: Resource Cleanup and Lifecycle

// BAD: No cleanup on window close
fn setup_handler(app: &mut App) {
    let handle = app.handle().clone();
    // Resources leak when window closes
}

// GOOD: Proper lifecycle management
fn setup_handler(app: &mut App) -> Result<(), Box<dyn std::error::Error>> {
    let handle = app.handle().clone();
    app.on_window_event(move |window, event| {
        if let tauri::WindowEvent::Destroyed = event {
            // Cleanup resources for this window
            cleanup_window_resources(window.label());
        }
    });
    Ok(())
}

Pattern 4: State Management Optimization

// BAD: Cloning large state on every access
#[command]
fn get_state(state: State<'_, AppState>) -> AppState {
    state.inner().clone()  // Expensive clone
}

// GOOD: Use Arc for shared state, return references
use std::sync::Arc;

#[command]
fn get_config(state: State<'_, Arc<AppConfig>>) -> Arc<AppConfig> {
    Arc::clone(state.inner())  // Cheap Arc clone
}

Pattern 5: Window Management Patterns

// BAD: Creating windows without reuse
async function showDialog() {
    await new WebviewWindow('dialog', { url: '/dialog' })  // Creates new each time
}

// GOOD: Reuse existing windows
import { WebviewWindow } from '@tauri-apps/api/webviewWindow'

async function showDialog() {
    const existing = await WebviewWindow.getByLabel('dialog')
    if (existing) {
        await existing.show()
        await existing.setFocus()
    } else {
        await new WebviewWindow('dialog', { url: '/dialog' })
    }
}

7. Security Standards

5.1 Domain Vulnerability Landscape

Research Date: 2025-11-20

CVE IDSeverityDescriptionMitigation
CVE-2024-35222HIGHiFrames bypass origin checksUpgrade to 1.6.7+ or 2.0.0-beta.20+
CVE-2024-24576CRITICALRust command injectionUpgrade Rust to 1.77.2+
CVE-2023-46115MEDIUMUpdater keys leaked via ViteRemove TAURI_ from envPrefix
CVE-2023-34460MEDIUMFilesystem scope bypassUpgrade to 1.4.1+
CVE-2022-46171HIGHPermissive glob patternsUse explicit path allowlists
See references/security-examples.md for complete CVE details and mitigation code

5.2 OWASP Top 10 2025 Mapping

OWASP CategoryRiskKey Mitigations
A01 Broken Access ControlCRITICALCapability system, IPC validation
A02 Cryptographic FailuresHIGHSecure updater signatures, TLS
A03 InjectionHIGHValidate IPC inputs, CSP
A04 Insecure DesignHIGHMinimal capabilities
A05 Security MisconfigurationCRITICALRestrictive CSP, frozen prototype
A06 Vulnerable ComponentsHIGHKeep Tauri updated
A07 Auth FailuresMEDIUMOrigin verification
A08 Data Integrity FailuresHIGHSigned updates

5.3 Input Validation Framework

use validator::Validate;

#[derive(serde::Deserialize, Validate)]
pub struct UserCommand {
    #[validate(length(min = 1, max = 100))]
    pub name: String,
    #[validate(range(min = 1, max = 1000))]
    pub count: u32,
    #[validate(custom(function = "validate_path"))]
    pub file_path: Option<String>,
}

fn validate_path(path: &str) -> Result<(), validator::ValidationError> {
    if path.contains("..") || path.contains("~") {
        return Err(validator::ValidationError::new("invalid_path"));
    }
    Ok(())
}

5.4 Secrets Management

// NEVER in vite.config.ts - leaks TAURI_PRIVATE_KEY!
{ "envPrefix": ["VITE_", "TAURI_"] }

// GOOD: Only expose VITE_ variables
{ "envPrefix": ["VITE_"] }
// Load secrets at runtime, never hardcode
fn get_api_key() -> Result<String, Error> {
    std::env::var("API_KEY").map_err(|_| Error::Configuration("API_KEY not set".into()))
}

5.5 Error Handling

use thiserror::Error;

#[derive(Error, Debug)]
pub enum AppError {
    #[error("Invalid input")]
    Validation(#[from] validator::ValidationErrors),
    #[error("Operation not permitted")]
    PermissionDenied,
    #[error("Internal error")]
    Internal(#[source] anyhow::Error),
}

// Safe serialization - never expose internal details to frontend
impl serde::Serialize for AppError {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where S: serde::Serializer {
        tracing::error!("Error: {:?}", self);
        serializer.serialize_str(&self.to_string())
    }
}

6. Testing & Validation

Security Testing Checklist

npx tauri info                    # Check configuration
cd src-tauri && cargo audit       # Audit dependencies
npx tauri build --debug           # Check capability issues
npm run test:security             # Test IPC boundaries

Security Test Examples

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_path_traversal_blocked() {
        let request = FileRequest { path: "../../../etc/passwd".to_string() };
        assert!(request.validate().is_err());
    }

    #[tokio::test]
    async fn test_unauthorized_access_blocked() {
        let result = sensitive_operation(mock_window_bad_origin()).await;
        assert!(result.unwrap_err().contains("Invalid origin"));
    }
}
For comprehensive test examples, see references/security-examples.md

8. Common Mistakes & Anti-Patterns

Anti-Pattern 1: Overly Permissive Capabilities

// NEVER: Grants access to entire filesystem
{ "permissions": ["fs:default", "fs:scope-home"] }

// ALWAYS: Scope to specific directories
{ "permissions": [{ "identifier": "fs:read-files", "allow": ["$APPDATA/myapp/*"] }] }

Anti-Pattern 2: Disabled CSP

// NEVER
{ "security": { "csp": null } }

// ALWAYS
{ "security": { "csp": "default-src 'self'; script-src 'self'" } }

Anti-Pattern 3: Shell Execution Enabled

// NEVER
{ "permissions": ["shell:allow-execute"] }

// IF NEEDED: Strict allowlist only
{
  "permissions": [{
    "identifier": "shell:allow-execute",
    "allow": [{ "name": "git", "cmd": "git", "args": ["status"] }]
  }]
}

Anti-Pattern 4: Exposing Tauri Keys

// NEVER - leaks private keys!
export default { envPrefix: ['VITE_', 'TAURI_'] }

// ALWAYS
export default { envPrefix: ['VITE_'] }

Anti-Pattern 5: No IPC Validation

// NEVER: Direct use of user input
#[command]
fn read_file(path: String) -> String { std::fs::read_to_string(path).unwrap() }

// ALWAYS: Validate and scope
#[command]
fn read_file(request: ValidatedFileRequest) -> Result<String, String> { /* ... */ }

13. Pre-Deployment Checklist

Security Checklist

  • Tauri 2.0+ with latest patches
  • Rust 1.77.2+ (CVE-2024-24576 fix)
  • CSP configured restrictively
  • freezePrototype: true enabled
  • Capabilities use minimal permissions
  • Filesystem scopes are explicit paths
  • Shell execution disabled or allowlisted
  • No TAURI_ in frontend envPrefix
  • Auto-updater uses signature verification
  • All IPC commands validate input
  • Origin verification for sensitive ops
  • cargo audit passes

Runtime Checklist

  • Debug mode disabled in production
  • DevTools disabled in production
  • Remote debugging disabled
  • Update checks working

14. Summary

Your goal is to create Tauri applications that are:

  • Secure by Default: Minimal capabilities, restrictive CSP
  • Defense in Depth: Multiple security layers
  • Validated: All IPC inputs validated
  • Transparent: Signed updates, clear permissions

Security Reminder:

  1. Never enable shell execution without strict allowlist
  2. Always scope filesystem access to specific directories
  3. Configure CSP to block XSS and data exfiltration
  4. Verify origins for sensitive operations
  5. Sign updates and verify signatures
  6. Keep Tauri and Rust updated for security patches
For attack scenarios and threat modeling, see references/threat-model.md

平台分布

Local Agent

74.36%
按下载量换算745

安全审计

Socket

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 第三方 CLI 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills