mcpField
T
tauri-native-api-integration

tauri-native-api-integration

github.com/oimiragieoDevelopment4469 installsUpdated 17w ago
Repository

About tauri-native-api-integration

tauri-native-api-integration is a coding-guidance skill for developers integrating native APIs in Tauri apps. It reviews implementation practices with particular attention to command permissions, IPC validation, asynchronous I/O, and type safety.

Key features

  1. 01Review Tauri integration practices
  2. 02Suggest code improvements and refactors
  3. 03Restrict command permissions
  4. 04Validate IPC input on the Rust side
  5. 05Use asynchronous I/O in command handlers
  6. 06Generate TypeScript types with tauri-specta

Use cases

  1. 01Check permissions configured for Tauri commands
  2. 02Review IPC input validation
  3. 03Assess IPC transfer approaches for large data

MCP support

The README does not describe an MCP integration.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/oimiragieo/agent-studio --skill tauri-native-api-integration

After installing, type/tauri-native-api-integrationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

commands/
tauri-native-api-integration.md
hooks/
post-execute.cjs
pre-execute.cjs
references/
research-requirements.md
rules/
tauri-native-api-integration.md
schemas/
input.schema.json
output.schema.json
scripts/
main.cjs
templates/
implementation-template.md

Details

From the project README

Tauri Native Api Integration Skill

You are a coding standards expert specializing in tauri native api integration. You help developers write better code by applying established guidelines and best practices. - Review code for guideline compliance - Suggest improvements based on best practices - Explain why certain patterns are preferred - Help refactor code to meet standards When reviewing or writing code, apply these guidelines:
  • Utilize Tauri's APIs for native desktop integration (file system access, system tray, etc.).
  • Follow Tauri's security best practices, especially when dealing with IPC and native API access.
  • Be cautious when using Tauri's allowlist feature, only exposing necessary APIs.
Example usage: ``` User: "Review this code for tauri native api integration compliance" Agent: [Analyzes code against guidelines and provides specific feedback] ```

Iron Laws

  1. NEVER expose all Tauri commands without an allowlist — use explicit permission-based access
  2. ALWAYS validate all IPC inputs on the Rust side — never trust the frontend
  3. NEVER perform synchronous I/O in Tauri command handlers — always use async
  4. ALWAYS use tauri-specta to generate TypeScript types from Rust structs for type safety
  5. NEVER transfer large data synchronously over IPC — use streaming or chunking

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
No command allowlistAll Rust functions exposed to frontend; attack surface maximizedAllowlist only specific commands needed by the frontend
Trusting frontend inputMalicious payloads can exploit Rust codeValidate and sanitize all IPC inputs on the Rust side
Synchronous I/O in commandsBlocks the Tauri event loop; UI freezesUse async Rust for all I/O operations in command handlers
Missing TypeScript typesRuntime type mismatches between Rust and frontendUse tauri-specta to generate TypeScript types from Rust structs
Large synchronous data transfersIPC bottleneck causes UI stutteringStream or chunk large data; avoid transferring full datasets over IPC

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing: Record any new patterns or exceptions discovered.

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Comments

Markdown supported