desktop-shell

Guides development of the Tauri v2 desktop shell, sidecar supervision, and OS capability services.

4|Updated Jul 30, 2026
One-click install
npx skills add https://github.com/gabriellst/codm --skill desktop-shell-gabriellst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: desktop-shell
Source: https://github.com/gabriellst/codm/tree/main/.claude/skills/desktop-shell
Command: npx skills add https://github.com/gabriellst/codm --skill desktop-shell-gabriellst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on the CODM desktop app requires navigating a strict architecture: generated Tauri config, sidecar supervision, typed Rust commands, and a decorator-free DI layer in the React console. This Skill encodes all of those rules so changes to the shell, sidecars, or OS capabilities (folder picker, notifications, badge, secrets, autostart) follow the established contracts instead of drifting. ## Core Features & Use Cases - Generated config discipline: Explains that tauri.conf.json, capabilities JSON, and shell-env.json are rendered by bun desktop:generate from packages/app/tauri/config/ and must never be hand-edited, with drift gated by tests. - Capability addition workflow: Provides the step-by-step shape for adding a native capability — port, token, Tauri/Browser/Fake service implementations, declarative registry entries, and the CAPABILITIES + CAPABILITY_PERMISSIONS map. - Sidecar and boot-failure handling: Documents port candidate resolution, readiness gates, boot-error splash behavior, and macOS signing/TCC requirements. - Use Case: When asked to add a new OS integration (e.g., a file watcher) to the desktop console, use this Skill to correctly wire the port, both platform services, the DI registry, and the generated Tauri permissions. ## Quick Start Ask the agent to add a new OS capability to the desktop console or to modify the Tauri shell, and it will follow the port-plus-platform-services pattern with generated config.

Frequently Asked Questions about desktop-shell

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new OS capability to a Tauri React app?

Declare a pure-type port and token, implement colocated Tauri and Browser service classes, add declarative [Token, Class] pairs to the tauri and browser registries plus a Fake for tests, and declare the capability in CAPABILITIES and CAPABILITY_PERMISSIONS before running bun desktop:generate.

How do I call custom Rust commands from React in Tauri v2?

Annotate the Rust command with #[tauri::command] and #[specta::specta], register it in the tauri_specta::Builder, and regenerate typed TypeScript bindings via cargo test. The React side imports { commands } from '@codm/app-tauri/commands' — never a stringly invoke call.

Can I edit tauri.conf.json or capabilities JSON by hand?

No. Both files are generated by bun desktop:generate from the config folder in packages/app/tauri, and drift is a red build via the --check gate. Edit the source config files (app.ts, capabilities.ts, sidecars.ts, ports.ts) and regenerate instead.

Why does the packaged Tauri app fail with EADDRINUSE on boot?

The packaged app uses an ordered candidate port list rather than a fixed dev port, resolved at boot via bind-then-release. If every candidate is occupied, the shell reports a PortsExhausted boot error naming each tried port instead of silently rebinding.

Why does a Tauri app lose macOS file access after an update?

An ad-hoc signature pins the TCC grant to the binary's cdhash, so every update invalidates Full Disk Access. The shell must ship with a real Developer ID signing identity so the grant survives updates, since spawned agents inherit the app's TCC identity.

Should React components check isTauri() to change behavior?

No. Components branch on what a service port reports, such as supportsFolderPicker(), and browser services degrade honestly by returning false or null. Platform detection happens once in ServicesProvider at the composition root.