Tauri desktop application development patterns. Use when building the SpecFlux desktop app, implementing IPC communication between Rust and React, managing windows, or testing Tauri commands.
Always define IPC commands with TypeScript types:
// src-tauri/src/main.rs
#[tauri::command]
fn start_agent(task_id: i32) -> Result<(), String> {
// Implementation
Ok(())
}
// frontend/src/api/tauri.ts
import { invoke } from '@tauri-apps/api/tauri';
export async function startAgent(taskId: number): Promise<void> {
await invoke('start_agent', { taskId });
}
Create windows programmatically:
import { WebviewWindow } from '@tauri-apps/api/window';
const taskWindow = new WebviewWindow('task-detail', {
url: '/task/42',
title: 'Task #42',
width: 800,
height: 600
});
// tests/tauri.test.ts
import { mockIPC } from '@tauri-apps/api/mocks';
describe('Tauri IPC', () => {
beforeEach(() => {
mockIPC((cmd, args) => {
if (cmd === 'start_agent') {
return Promise.resolve();
}
});
});
test('starts agent', async () => {
await expect(startAgent(42)).resolves.toBeUndefined();
});
});
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer