multiAI Summary Pending

tauri-app-file-system

Read and write local files using the Tauri v2 file-system plugin with scoped directory access. Use when implementing file read/write operations, configuring safe directory scopes, or building import/export file workflows.

223 stars

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/tauri-app-file-system/SKILL.md --create-dirs "https://raw.githubusercontent.com/partme-ai/full-stack-skills/main/skills/tauri-skills/tauri-app-file-system/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/tauri-app-file-system/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How tauri-app-file-system Compares

Feature / Agenttauri-app-file-systemStandard Approach
Platform SupportmultiLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Read and write local files using the Tauri v2 file-system plugin with scoped directory access. Use when implementing file read/write operations, configuring safe directory scopes, or building import/export file workflows.

Which AI agents support this skill?

This skill is compatible with multi.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

## When to use this skill

**ALWAYS use this skill when the user mentions:**
- Reading or writing local files in a Tauri app
- Configuring file system scope for safe access
- File import/export workflows

**Trigger phrases include:**
- "file system", "read file", "write file", "fs plugin", "file access", "scope"

## How to use this skill

1. **Install the file-system plugin**:
   ```bash
   cargo add tauri-plugin-fs
   ```
2. **Register the plugin** in your Tauri builder:
   ```rust
   tauri::Builder::default()
       .plugin(tauri_plugin_fs::init())
   ```
3. **Configure scoped access** in `src-tauri/capabilities/default.json`:
   ```json
   {
     "permissions": [
       { "identifier": "fs:allow-read-text-file", "allow": [{ "path": "$APPDATA/**" }] },
       { "identifier": "fs:allow-write-text-file", "allow": [{ "path": "$APPDATA/**" }] }
     ]
   }
   ```
4. **Read and write files from the frontend**:
   ```typescript
   import { readTextFile, writeTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
   const content = await readTextFile('config.json', { baseDir: BaseDirectory.AppData });
   await writeTextFile('config.json', JSON.stringify(data), { baseDir: BaseDirectory.AppData });
   ```
5. **Define minimal directory scopes** to restrict access to only the directories your app needs
6. **Validate access boundaries** and handle permission errors gracefully

## Outputs

- File system plugin setup with scoped directory access
- Read/write operations using BaseDirectory constants
- Minimal-scope permission configuration

## References

- https://v2.tauri.app/plugin/file-system/

## Keywords

tauri file system, read file, write file, scope, fs plugin, file access