add-tauri-command
Skill2 starsChanged 5 months agoMITView on GitHub
Use when adding, renaming, or changing the signature of a Tauri command in src-tauri — any new IPC surface between the Rust core and the React UI.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- Mooshieblob1/MooshieUItheir own version, first seen Oct 8, 2026
- openfootmanager/openfootmanagertheir own version, first seen Oct 8, 2026
- kevinlin/cowork-ztheir own version, first seen Jul 25, 2026
- devlint/GitWandtheir own version, first seen Jun 17, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- openfootmanager/openfootmanager★ 1.2ksame name
- Mooshieblob1/MooshieUI★ 225same name
- devlint/GitWand★ 198same name
- kevinlin/cowork-z★ 13same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- hyper-frames/CLAUDE.mdCLAUDE.md
- add-db-migrationSkill
- add-feature-surfaceSkill
- emitter-snapshot-changeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Domain module: Add the command to src-tauri/src/commands/<domain>.rs (create the domain file if new — never a catch-all module).
- Very specific: line 15
Register: Add to the single generate_handler![...] list in lib.rs (and to tauri_specta::Builder command list).
- Very specific: line 16
Regenerate bindings: Run the specta export (see justfile: just bindings) so src/lib/ipc/bindings.gen.ts updates.
- Very specific: line 19
Capabilities: If the command needs a plugin permission, add it to the relevant file in src-tauri/capabilities/ (per-concern files, minimum …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add a Tauri command
End-to-end checklist. A command is not "done" until both sides are typed and tested.
Checklist (todo per item)
- Domain module. Add the command to
src-tauri/src/commands/<domain>.rs(create the domain file if new — never a catch-all module). Name: snake_case verb phrase, one command per user-facing action. - Signature.
async fnif it does I/O; owned params;State<'_, AppState>for state;Channel<T>param if it streams. ReturnsResult<T, Error>(the app error enum — add a variant if no existing one fits; wrap engine errors via#[from]). - Thin shell. Body = unwrap args → call engine /
db/repository / jobs layer → map errors. If you're writing SQL or business logic inside the command, stop and move it down a layer. - Register. Add to the single
generate_handler![...]list inlib.rs(and totauri_specta::Buildercommand list). There is exactly one registration site. - Regenerate bindings. Run the specta export (see
justfile:just bindings) sosrc/lib/ipc/bindings.gen.tsupdates. Never hand-edit that file. - Typed wrapper. Expose it from
src/lib/ipc/<domain>.tsre-exporting the generated function with any ergonomics (query-key helpers for TanStack Query). Feature code imports the wrapper, never the bindings file or rawinvoke. - Tests, both sides. Rust: unit test for the layer the command delegates to (the command itself stays thin enough not to need one); if the command has branching, test it with a test
AppState. TS: if a hook/component consumes it, mock viamockIPCin the colocated test. - Capabilities. If the command needs a plugin permission, add it to the relevant file in
src-tauri/capabilities/(per-concern files, minimum scope). - Gate.
just check.
Common mistakes
- Registering in a second
invoke_handlercall — Tauri silently keeps only the last one. - Returning
Stringerrors — the frontend loses thekinddiscriminant. - Streaming via events instead of
Channel<T>— events are broadcast and unordered per docs; channels are the streaming path. - Forgetting
clearMocks()in the TS test — IPC mocks leak across tests.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

