Full-stack-skills 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.

install
source · Clone the upstream repo
git clone https://github.com/partme-ai/full-stack-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/partme-ai/full-stack-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/tauri-skills/tauri-app-file-system" ~/.claude/skills/partme-ai-full-stack-skills-tauri-app-file-system && rm -rf "$T"
manifest: skills/tauri-skills/tauri-app-file-system/SKILL.md
source content

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:
    cargo add tauri-plugin-fs
    
  2. Register the plugin in your Tauri builder:
    tauri::Builder::default()
        .plugin(tauri_plugin_fs::init())
    
  3. Configure scoped access in
    src-tauri/capabilities/default.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:
    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

Keywords

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