tauri-development — скилл для Claude Code: что делает и как установить
Скилл задаёт правила разработки десктопных программ на Tauri. Он настраивает связку Rust-бэкенда с фронтендом на TypeScript, React или Next.js.
npx skills add Mindrally/skills --skill tauri-development -a claude-codeЧто делает tauri-development
Скилл описывает архитектуру проекта с разделением на папки src/ и src-tauri/. В интерфейсе он ориентирует агента на Next.js и ShadCN-UI со стилями TailwindCSS. Вызовы бэкенда идут через функции invoke и listen из библиотеки @tauri-apps/api.
На стороне Rust команды оформляются макросом #[tauri::command] с обязательным возвратом типа Result. Для файловых операций используются вызовы read_file и write_file. Частые обращения через IPC перегружают приложение. Из-за этого скилл требует объединять запросы в пакеты и минимизировать вызовы между фронтендом и бэкендом. Дополнительно правила предписывают настраивать политику CSP и урезать права в tauri.conf.json.
Какие задачи решает
- настроить структуру каталогов для проекта на Tauri, TypeScript и Rust
- создать обработчики команд Rust с возвратом
Result - связать компоненты интерфейса с бэкендом через
invoke - ограничить права доступа и настроить CSP в
tauri.conf.json
Примеры запросов агенту
- Помоги написать Tauri-команду на Rust для сохранения файла и вызови её из React через invoke
- Настрой структуру проекта для десктопного приложения на Tauri с Next.js и ShadCN-UI
- Добавь слушатель событий Tauri на фронтенде с помощью функции listen
Как установить tauri-development
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill tauri-development -a claude-code2Вручную: положить файлы
~/.claude/skills/tauri-development/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/tauri-development/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill tauri-development -a codex2Вручную: положить файлы
.agents/skills/tauri-development/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill tauri-development -a cursor2Вручную: положить файлы
.cursor/skills/tauri-development/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills tauri-development2Вручную: положить файлы
.github/skills/tauri-development/SKILL.md1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill tauri-development -a gemini-cli2Командой платформы
gemini skills install https://github.com/Mindrally/skills --path tauri-developmentВручную: положить файлы
.devin/skills/tauri-development/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill tauri-development -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора168
Похожие
Рядом в теме «Фронтенд и UI»
Всё по теме «Фронтенд и UI» →Вопросы о tauri-development
Как установить tauri-development в Claude Code?
Выполните в терминале команду npx skills add Mindrally/skills --skill tauri-development -a claude-code. Файл инструкции сохранится в каталоге ~/.claude/skills/tauri-development/SKILL.md.
Зачем нужен скилл tauri-development?
Он даёт ИИ-агенту правила написания кода для десктопных программ: паттерны вызовов через IPC, структуру каталогов и требования к безопасности.
Какой стек технологий рекомендует скилл?
Для интерфейса используются TypeScript, Next.js, TailwindCSS и компоненты ShadCN-UI. Для бэкенда и системных вызовов применяется Rust с API Tauri.
Исходный текст
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