home / skills / busirocket / agents-skills / busirocket-tauri

busirocket-tauri skill

/skills/busirocket-tauri

This skill standardizes Tauri desktop app setup, guiding command creation, invoke handler registration, and structured Rust and SQL layouts for maintainability.

npx playbooks add skill busirocket/agents-skills --skill busirocket-tauri

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.5 KB
---
name: busirocket-tauri
description:
  Tauri-specific standards for desktop apps. Use when creating Tauri commands,
  configuring invoke handler and permissions, and applying Rust layout under
  src-tauri.
metadata:
  author: cristiandeluxe
  version: "1.0.0"
---

# Tauri Standards

Tauri-specific conventions for desktop applications. Builds on `busirocket-rust`
for language and module rules.

## When to Use

Use this skill when:

- Creating or refactoring Tauri commands
- Registering commands in the invoke handler and permissions
- Structuring a Tauri project (src-tauri layout, sql, prompts)

## Non-Negotiables (MUST)

- When creating a Tauri command: (1) create command file, (2) register in invoke
  handler, (3) add to permissions allowlist.
- Rust code lives under `src-tauri/src/`; apply `busirocket-rust` module layout
  there (services, utils, models).
- SQL under `src-tauri/sql/<area>/`, prompts under `src-tauri/prompts/<area>/`.

## Rules

### Project Structure

- `tauri-project-structure` - Where Rust, SQL, and prompts live in a Tauri app

### Tauri Commands

- `tauri-commands-checklist` - Tauri commands checklist (MANDATORY)

## Related Skills

- `busirocket-rust` - Rust language, one-thing-per-file, boundaries, SQL/prompt
  separation
- `busirocket-core-conventions` - General file structure principles

## How to Use

Read the rule files for Tauri-specific steps and paths:

```
rules/tauri-commands-checklist.md
rules/tauri-project-structure.md
```

Apply `busirocket-rust` for all Rust code inside `src-tauri/src/`.

Overview

This skill defines Tauri-specific standards for desktop applications, focusing on command creation, invoke handler registration, permissions, and Rust layout under src-tauri. It enforces file locations for Rust, SQL, and prompt assets and complements general Rust and core conventions. Follow these standards to keep Tauri projects consistent, auditable, and safe for desktop contexts.

How this skill works

The skill inspects project structure and provides explicit rules for where code and assets must live (src-tauri/src, src-tauri/sql, src-tauri/prompts). It mandates a checklist for creating Tauri commands: create a command file, register it in the invoke handler, and add it to the permissions allowlist. It also maps to related Rust and core conventions to ensure module layout and separation of concerns.

When to use it

  • Creating or refactoring Tauri commands
  • Registering commands in the invoke handler and setting permissions
  • Organizing Rust code within a Tauri app (src-tauri/src/)
  • Placing SQL files under src-tauri/sql/ and prompts under src-tauri/prompts/
  • Onboarding contributors to a Tauri codebase to ensure consistent layout

Best practices

  • Always create a dedicated file per Tauri command and follow the commands checklist
  • Register every new command in the invoke handler and add it to the permissions allowlist before runtime testing
  • Keep Rust code under src-tauri/src/ and apply busirocket-rust module layout (services, utils, models)
  • Store SQL scripts by area under src-tauri/sql/<area>/ and prompts under src-tauri/prompts/<area>/ to avoid mixing concerns
  • Use related skills (busirocket-rust, busirocket-core-conventions) to enforce one-thing-per-file and clear boundaries

Example use cases

  • Add a new background worker command: create command file, register in invoke handler, add permission entry
  • Refactor a monolithic src-tauri/src/lib.rs into services, utils, and models per busirocket-rust layout
  • Organize database migrations and queries under src-tauri/sql/payments/ and prompts for user flows under src-tauri/prompts/payments/
  • Audit permissions to ensure only approved commands are invokable from the frontend

FAQ

What are the three mandatory steps for adding a Tauri command?

Create a command file, register the command in the invoke handler, and add the command to the permissions allowlist.

Where should Rust code live in a Tauri project?

All Rust source must be under src-tauri/src/, following the busirocket-rust module layout (services, utils, models).