Skip to main content
skill CX Codex

tauri-development — Claude Code skill: what it does, how to install

The skill provides guidelines for building desktop applications with Tauri. It sets coding standards across Rust and TypeScript.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill tauri-development -a claude-code
Open on GitHub

What tauri-development does

The skill establishes a repository layout, splitting frontend code in src/ from native Rust logic in src-tauri/. It directs the assistant to build interfaces with React or Next.js, paired with TailwindCSS and ShadCN-UI components. Frontend communication relies on invoke and listen helpers imported directly from @tauri-apps/api.

Rust commands require the #[tauri::command] macro and standard Result return types for error propagation. Frequent IPC roundtrips degrade responsiveness. Because of this, the guide mandates batching operations instead of making frequent roundtrips. Security rules enforce input validation and strict permission scopes inside tauri.conf.json.

What it helps with

  • organize project structure across src/ and src-tauri/
  • implement Rust commands using the #[tauri::command] macro
  • connect Next.js and ShadCN-UI frontend to Tauri APIs
  • restrict permissions and configure CSP in tauri.conf.json

Example prompts for the agent

  • Create a Tauri command in Rust to read a file and invoke it from React
  • Set up a Tauri project structure using Next.js, TailwindCSS, and ShadCN-UI
  • Add a Tauri event listener in TypeScript using the listen helper

How to install tauri-development

1Skills CLI (Vercel)

npx skills add Mindrally/skills --skill tauri-development -a claude-code

2Manually: put the files in place

~/.claude/skills/tauri-development/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/tauri-development/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about tauri-development

How to install tauri-development in Claude Code?

Run npx skills add Mindrally/skills --skill tauri-development -a claude-code in your terminal. This writes the skill definition to ~/.claude/skills/tauri-development/SKILL.md.

What does the tauri-development skill do?

It instructs the agent how to build Tauri desktop apps using Rust backend commands and TypeScript frontends.

What frontend stack does this skill assume?

It specifies TypeScript with React or Next.js, styled using TailwindCSS and accessible ShadCN-UI components.

Source text

SKILL.md · Apache-2.0
---
name: tauri-development
description: Tauri development guidelines for building cross-platform desktop applications with TypeScript, Rust, and modern web technologies
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Tauri Development Guidelines

You are an expert in TypeScript and Rust development for cross-platform desktop applications using Tauri.

## Core Principles

- Write clean, maintainable TypeScript and Rust code
- Use TailwindCSS and ShadCN-UI for styling
- Follow step-by-step planning for complex features
- Prioritize code quality, security, and performance

## Technology Stack

- **Frontend**: TypeScript, React/Next.js, TailwindCSS, ShadCN-UI
- **Backend**: Rust, Tauri APIs
- **Build**: Tauri CLI, Vite/Webpack

## Project Structure

```
src/
├── app/                # Next.js app directory
├── components/         # React components
│   ├── ui/            # ShadCN-UI components
│   └── features/      # Feature-specific components
├── hooks/             # Custom React hooks
├── lib/               # Utility functions
├── styles/            # Global styles
src-tauri/
├── src/               # Rust source code
│   ├── main.rs       # Entry point
│   └── commands/     # Tauri commands
├── Cargo.toml        # Rust dependencies
└── tauri.conf.json   # Tauri configuration
```

## TypeScript Guidelines

### Code Style
- Use functional components with TypeScript
- Define proper interfaces for all data structures
- Use async/await for asynchronous operations
- Implement proper error handling

### Tauri Integration
```typescript
import { invoke } from '@tauri-apps/api/tauri';

// Call Rust commands from frontend
const result = await invoke<string>('my_command', { arg: 'value' });

// Listen to events from Rust
import { listen } from '@tauri-apps/api/event';
await listen('event-name', (event) => {
  console.log(event.payload);
});
```

## Rust Guidelines

### Command Definitions
```rust
#[tauri::command]
fn my_command(arg: String) -> Result<String, String> {
    // Implementation
    Ok(format!("Received: {}", arg))
}

fn main() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![my_command])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
```

### Error Handling
- Use Result types for fallible operations
- Define custom error types when needed
- Propagate errors appropriately
- Log errors for debugging

### Security
- Validate all inputs from the frontend
- Use Tauri's security features (CSP, allowlist)
- Minimize permissions in tauri.conf.json
- Sanitize file paths and user inputs

## UI Development

### TailwindCSS
- Use utility-first approach
- Implement responsive design
- Use dark mode support
- Follow consistent spacing and sizing

### ShadCN-UI Components
- Use pre-built accessible components
- Customize with TailwindCSS
- Maintain consistent theming
- Follow accessibility best practices

## State Management

- Use React Context for global state
- Consider Zustand for complex state
- Keep state close to where it's used
- Implement proper state synchronization with Rust

## File System Operations

```rust
use std::fs;
use tauri::api::path::app_data_dir;

#[tauri::command]
fn read_file(path: String) -> Result<String, String> {
    fs::read_to_string(&path)
        .map_err(|e| e.to_string())
}

#[tauri::command]
fn write_file(path: String, content: String) -> Result<(), String> {
    fs::write(&path, content)
        .map_err(|e| e.to_string())
}
```

## Building and Distribution

- Configure proper app metadata
- Set up code signing for distribution
- Use Tauri's updater for auto-updates
- Test on all target platforms

## Performance

- Minimize IPC calls between frontend and Rust
- Use batch operations where possible
- Implement proper caching
- Profile and optimize hot paths

## Testing

- Write unit tests for Rust commands
- Test frontend components
- Implement integration tests
- Test on all target platforms

© Mindrally · Apache-2.0 · Mindrally/skills

Similar skills

Everything for Frontend and UI →

From the same set214

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor