- Home
- Skills
- Busirocket
- Agents Skills
- Busirocket Rust Tauri Standards
busirocket-rust-tauri-standards_skill
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill busirocket/agents-skills --skill busirocket-rust-tauri-standards- SKILL.md2.5 KB
Overview
This skill provides strict, reusable Rust and Tauri standards for building maintainable desktop apps. It codifies file layout, one-thing-per-file discipline, separation of SQL and LLM prompts from Rust sources, and a checklist for Tauri commands. The rules are designed to reduce coupling, improve reviewability, and make code safer to audit and test.
How this skill works
The skill inspects Rust/Tauri projects and enforces conventions via named rules: one public symbol per file, module layout (services/utils/models), SQL and prompt separation using include_str!(), and Tauri command registration/checklist. Each rule includes rationale, correct/incorrect examples, and concrete steps to remediate violations. Use the rules as a checklist when authoring code, reviewing PRs, or adding new Tauri commands.
When to use it
- Writing or refactoring Rust code inside a Tauri project
- Adding new Tauri commands and their invoke handlers
- Keeping SQL queries and AI prompts out of .rs source files
- Enforcing single-responsibility files (one public symbol per file)
- Establishing clear service vs. pure-logic boundaries in src-tauri
Best practices
- Place IO, DB, and network code in src-tauri/src/services/ and keep pure functions in src-tauri/src/utils/
- Store domain types in src-tauri/src/models/, one type per file, and avoid misc helper modules
- Put SQL in src-tauri/sql/<area>/Xxx.sql and prompts in src-tauri/prompts/<area>/Xxx.prompt, then load with include_str!()
- When adding a Tauri command: create a command file, register it in the invoke handler, and add it to the allowlist/permissions
- Keep handlers thin: validate inputs, call services, and return results—push business logic into services or utils
- Run the validation/checklist after changes and include rule references in PRs for faster reviews
Example use cases
- Creating a new file-system sync feature: add thin command handler, service implementation, and a model file for types
- Moving inline SQL out of a module into src-tauri/sql/user/GetUserById.sql and using include_str!() in the data access file
- Extracting an AI prompt from code into src-tauri/prompts/compose/GenerateSummary.prompt and loading it at runtime
- Reviewing a pull request to ensure no file contains more than one public function or type
- Adding a new Tauri command: implement, register in invoke handler, and add to permissions allowlist
FAQ
It improves discoverability, reduces merge conflicts, and makes changes easier to review and test.
How should I organize shared utilities?
Keep pure, side-effect-free code in src-tauri/src/utils/ and avoid a catch-all helpers.rs; create focused modules instead.