Tauri logo

Tauri

OrganizationPopular
EpicenterHQ
tauri

Tauri commands, permissions, capabilities, security config, path handling, cross-platform file ops, and native filesystem APIs. Use when mentioning Tauri, desktop apps, Rust commands, invoke, capabilities, permissions, ResourceId, file paths, or platform differences.

Overview

PublisherEpicenterHQ
Repositoryepicenter
Skill nametauri
Stars
4.8K
Forks
386
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by EpicenterHQ on GitHub. Read the source before you install it.

Installation

Install the Tauri AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/EpicenterHQ/epicenter/tree/main/.agents/skills/tauri
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/EpicenterHQ/epicenter.git /tmp/epicenter
mkdir -p .claude/skills
cp -r /tmp/epicenter/.agents/skills/tauri .claude/skills/tauri
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Tauri in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Tauri on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Tauri is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Tauri Patterns

Reference Repositories

  • Tauri: Desktop app framework with Rust backend and web frontend

Upstream Grounding

When Tauri command behavior, permissions, capabilities, CSP, asset protocols, path APIs, plugin filesystem behavior, or IPC semantics affect correctness, use source-backed grounding before relying on memory. If DeepWiki MCP is available, ask a narrow question against tauri-apps/tauri; if it is unavailable or the repo is not indexed, use upstream source or official docs directly. Treat DeepWiki as orientation, then verify decisive details against local generated bindings, installed Rust crates, TypeScript types, source, or official docs before changing code.

Skip DeepWiki for repo-local command naming and app-specific wrapper conventions already visible in the code.

Commands, Permissions, And Security

  • Expose focused Rust APIs with #[tauri::command], register them with generate_handler!, and return Result<T, E> for fallible work.
  • Validate command inputs on the Rust side. TypeScript callers are not the trust boundary.
  • Current Epicenter capabilities grant commands by window label. Keep command registrations and the relevant capability grants consistent. Proposed ADR-0402 would replace these with a host-wide constant; it is unbuilt and must not be assumed when adding a native call.
  • Treat CSP, devCsp, asset protocol configuration, convertFileSrc, freezePrototype, and remote IPC as security-sensitive config.
  • Long-lived Rust objects should be Tauri resources with frontend ResourceIds. Do not serialize complex long-lived objects through command responses.

Webview CSP

Never ship app.security.csp: null (that disables CSP entirely). The highest-value directive is connect-src: locking it to your API origin plus Tauri's IPC blocks an injected same-origin script from exfiltrating in-memory secrets (tokens, keys) to an attacker host. Start from a narrow policy, then add only the sources your app actually uses, for example asset protocols, wasm, workers, media, or dev server origins. Set both csp (production) and devCsp (the dev override, which replaces csp during tauri dev):

jsonc
"security": {
  // Tauri's tauri-codegen hashes every inline <script> in the built
  // frontendDist and injects the hashes, so production script-src does NOT
  // need 'unsafe-inline' (a SvelteKit SPA still boots via its hash).
  "csp": "default-src 'self'; connect-src 'self' ipc: http://ipc.localhost https://api.example.com wss://api.example.com; img-src 'self' data: blob: https:; style-src 'self' 'unsafe-inline'; script-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'",
  // Dev loads from the Vite server (not the hashed build), so its inline/HMR
  // scripts ARE unhashed: devCsp must keep 'unsafe-inline' (+ 'unsafe-eval')
  // and add the localhost dev origins.
  "devCsp": "default-src 'self'; connect-src 'self' ipc: http://ipc.localhost http://localhost:5173 ws://localhost:5173 https://api.example.com wss://api.example.com; img-src 'self' data: blob: https:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; object-src 'none'; base-uri 'self'"
}

Rules: always include ipc: http://ipc.localhost in connect-src or invoke() breaks; only list asset: / http://asset.localhost if the asset protocol is actually enabled (convertFileSrc); always smoke-test a real tauri dev AND a release build, watching the webview console for CSP violations.

Typed IPC And Generated Bindings

When a Tauri app uses tauri-specta, keep the Rust command registry, generated TypeScript bindings, and app-owned command surface in sync. Read Rust command errors when a command changes errors consumed by TypeScript or when choosing how its generated Result crosses IPC.

  • Register every typed command in the tauri_specta::collect_commands! builder.
  • Register frontend-listened event payloads in tauri_specta::collect_events!, even when no command returns that event type.
  • For tauri-specta v2 RC events, use #[tauri_specta(event_name = "...")] on the event type. Do not invent #[tauri_specta::event(...)] unless installed macro docs or local macro source prove that form exists.
  • Re-export event and command payload types from their owning Rust module when lib.rs imports them for the builder.
  • Treat bindings.gen.ts as derived output. Regenerate and review both consumers when a command, error, or generation mode changes. If a command only fixes Rust compile shape without changing the public IPC contract, avoid broad generated churn.
  • Commands returning raw tauri::ipc::Response cannot be generated by specta because the body is not specta::Type. Mount those through a separate tauri::generate_handler! route and keep a small handwritten TypeScript wrapper.

Verification for IPC changes usually needs both sides:

bash
cargo check --manifest-path apps/epicenter/src-tauri/Cargo.toml
cargo test --manifest-path apps/epicenter/src-tauri/Cargo.toml export_types

If binding generation rewrites unrelated sections, inspect the diff before committing it.

Context Detection

Before choosing a path API, determine your execution context:

ContextLocationCorrect API
Tauri frontendapps/*/src/**/*.ts, apps/*/src/**/*.svelte@tauri-apps/api/path
Node.js/Bun backendpackages/**/*.ts, CLI toolsNode.js path module

Rule: If the code runs in the browser (Tauri webview), use Tauri's path APIs. If it runs in Node.js/Bun, use the Node.js path module.

Available Functions from @tauri-apps/api/path

Path Manipulation

FunctionPurposeExample
join(...paths)Join path segments with platform separatorawait join(baseDir, 'workspaces', id)
dirname(path)Get parent directoryawait dirname('/foo/bar/file.txt') → /foo/bar
basename(path, ext?)Get filename, optionally strip extensionawait basename('/foo/bar.txt', '.txt') → bar
extname(path)Get file extensionawait extname('file.txt') → .txt
normalize(path)Resolve .. and . segmentsawait normalize('/foo/bar/../baz') → /foo/baz
resolve(...paths)Resolve to absolute pathawait resolve('relative', 'path')
isAbsolute(path)Check if path is absoluteawait isAbsolute('/foo') → true

Platform Constants

FunctionPurposeReturns
sep()Platform path separator\ on Windows, / on POSIX
delimiter()Platform path delimiter; on Windows, : on POSIX

sep() and delimiter() are synchronous in Tauri v2. Most directory and path manipulation helpers are async because they call the backend.

Base Directories

FunctionPurpose
appLocalDataDir()App's local data directory
appDataDir()App's roaming data directory
appConfigDir()App's config directory
appCacheDir()App's cache directory
appLogDir()App's log directory
tempDir()System temp directory
resourceDir()App's resource directory
resolveResource(path)Resolve path relative to resources

Patterns

Constructing Paths (Correct)

typescript
import { appLocalDataDir, dirname, join } from '@tauri-apps/api/path';

// Join path segments; handles platform separators automatically
const baseDir = await appLocalDataDir();
const filePath = await join(baseDir, 'workspaces', workspaceId, 'data.json');

// Get parent directory; cleaner than manual slicing
const parentDir = await dirname(filePath);
await mkdir(parentDir, { recursive: true });

Logging Paths (Exception)

For human-readable log output, hardcoded / is acceptable since it's not used for filesystem operations:

typescript
// OK for logging; consistent cross-platform log output
const logPath = pathSegments.join('/');
console.log(`[Persistence] Loading from ${logPath}`);

Anti-Patterns

Never: Manual String Concatenation

typescript
// BAD: Hardcoded separator breaks on Windows
const filePath = baseDir + '/' + 'workspaces' + '/' + id;

// BAD: Template literal with hardcoded separator
const filePath = `${baseDir}/workspaces/${id}`;

// GOOD: Use join()
const filePath = await join(baseDir, 'workspaces', id);

Never: Manual Parent Directory Extraction

typescript
// BAD: Manual slicing is error-prone
const parentSegments = pathSegments.slice(0, -1);
const parentDir = await join(baseDir, ...parentSegments);

// GOOD: Use dirname()
const parentDir = await dirname(filePath);

Never: Hardcoded Separators in Filesystem Operations

typescript
// BAD: Windows uses backslashes
const configPath = appDir + '/config.json';

// GOOD: Platform-agnostic
const configPath = await join(appDir, 'config.json');

Never: Assuming Path Format

typescript
// BAD: Splitting on '/' fails on Windows paths
const parts = filePath.split('/');

// GOOD: Use dirname/basename for extraction
const dir = await dirname(filePath);
const file = await basename(filePath);

Import Pattern

Always import from @tauri-apps/api/path:

typescript
import {
	appLocalDataDir,
	dirname,
	join,
	basename,
	extname,
	normalize,
	resolve,
	sep,
} from '@tauri-apps/api/path';

Note on Async

Most Tauri path helpers are async because they communicate with the Rust backend via IPC. Always check the installed TypeScript types before assuming a helper returns a Promise. Directory helpers and path manipulation helpers such as appLocalDataDir(), join(), and dirname() are async; simple constants such as sep() and delimiter() are sync in Tauri v2.

typescript
const baseDir = await appLocalDataDir();
const filePath = await join(baseDir, 'file.txt');
const parent = await dirname(filePath);
const separator = sep();

Filesystem Operations

Use @tauri-apps/plugin-fs for file operations, combined with Tauri path APIs:

typescript
import { appLocalDataDir, dirname, join } from '@tauri-apps/api/path';
import { mkdir, readFile, writeFile } from '@tauri-apps/plugin-fs';

async function saveData(segments: string[], data: Uint8Array) {
	const baseDir = await appLocalDataDir();
	const filePath = await join(baseDir, ...segments);

	// Ensure parent directory exists
	const parentDir = await dirname(filePath);
	await mkdir(parentDir, { recursive: true });

	await writeFile(filePath, data);
}

Native Ownership Boundaries

Prefer app-owned identifiers over frontend-controlled paths when the native side owns data.

  • Recording operations should pass a recording id when Rust owns the recordings directory.
  • Model selection can pass a path, but Rust should canonicalize it and reject values outside the allowed app data model directory.
  • Markdown export, downloads, and temporary files should use focused commands rooted in app-owned directories rather than broad filesystem permissions.
  • Removing a capability, plugin, or command should also remove stale docs and UI that describe it. Proposed ADR-0402 would consolidate capability verification into one schema comparison; current tests still cover separate window grants.

The frontend can remember user intent. Rust enforces the filesystem boundary.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Tauri AI skill do?

Tauri commands, permissions, capabilities, security config, path handling, cross-platform file ops, and native filesystem APIs. Use when mentioning Tauri, desktop apps, Rust commands, invoke, capabilities, permissions, ResourceId, file paths, or platform differences.

Why use Tauri on TypingMind?

Because you install it once and use it with any model. Tauri is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Tauri in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/EpicenterHQ/epicenter/tree/main/.agents/skills/tauri. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Tauri?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Tauri?

As many as you like. As long as a model supports skills, you can use Tauri with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Tauri AI skill free?

It is published on GitHub by EpicenterHQ. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇