{"slug":"lov-optimize-tauri-backend","title":"lov-optimize-tauri-backend","summary":"Optimize Tauri backend architecture and development ergonomics for Tauri 2 apps, especially Rust restart pain, oversized src-tauri/src/lib.rs files, excessive #[tauri::command] surfaces, stringly invoke APIs, long IPC streams, and dev-state recovery. Use when the user asks about ","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-08T21:20:59.180986Z","repo":{"url":"https://github.com/lovstudio/skills","stars":67,"forks":17,"license":"MIT","updatedAt":"2026-09-14T03:52:41Z"},"bodyHtml":"<h1>Tauri 后端调优 · Tauri Backend Tuner</h1>\n<p><img src=\"https://img.shields.io/badge/version-0.2.0-CC785C\" alt=\"Version\"></p>\n<p>Optimize Tauri 2 backend architecture, command surfaces, IPC streams, and Rust\ndevelopment ergonomics.</p>\n<p>Independent source repository, also distributed through <a href=\"https://example.com/skills/dev-skills\">skill-publisher dev-skills</a> — by <a href=\"https://example.com\">example.com</a></p>\n<h2>Install</h2>\n<pre><code>npx skills add skill-publisher/optimize-tauri-backend-skill --all -g\n</code></pre>\n<p>The aggregate bundle remains available:</p>\n<pre><code>npx skills add skill-publisher/dev-skills --all -g\n</code></pre>\n<p>Or through Claude Code plugin marketplace:</p>\n<pre><code>/plugin marketplace add skill-publisher/dev-skills\n/plugin install dev-tools@lov-dev\n</code></pre>\n<h2>What It Covers</h2>\n<ul>\n<li>Explains why Rust-side Tauri changes restart the native app during <code>tauri dev</code>.</li>\n<li>Adds frontend-focused <code>tauri dev --no-watch</code> workflows.</li>\n<li>Splits oversized <code>src-tauri/src/lib.rs</code> into real Rust modules.</li>\n<li>Moves <code>generate_handler!</code> into a stable command registry.</li>\n<li>Reduces excessive <code>#[tauri::command]</code> counts through typed domain routers.</li>\n<li>Centralizes frontend <code>invoke()</code> calls through an app adapter.</li>\n<li>Adds stream id + cancel handling for long <code>Channel</code> IPC calls.</li>\n<li>Preserves dev restart state with hash/session resume and save flushing.</li>\n</ul>\n<h2>Typical Use</h2>\n<pre><code>/lov-optimize-tauri-backend 分析这个 Tauri app 的 Rust 重启问题，并优化后端结构\n</code></pre>\n<pre><code>/lov-optimize-tauri-backend lib.rs 太大、commands 太多，帮我降到 100 个以内\n</code></pre>\n<pre><code>/lov-optimize-tauri-backend fix Tauri stale callback warnings after HMR/reload\n</code></pre>\n<h2>Expected Output</h2>\n<p>The skill guides the agent to report:</p>\n<ul>\n<li>current <code>lib.rs</code> line count;</li>\n<li>largest Rust backend files;</li>\n<li>total <code>#[tauri::command]</code> count;</li>\n<li>whether startup code owns command registration;</li>\n<li>whether frontend invokes are centralized;</li>\n<li>which long IPC streams need cancellation;</li>\n<li>verification results from <code>cargo fmt</code>, <code>cargo check</code>, and TypeScript checks\nwhen allowed by the target repo.</li>\n</ul>\n<h2>Dependencies</h2>\n<p>No script dependencies. This is an instruction-only development skill.</p>\n<h2>License</h2>\n<p>MIT</p>\n","files":[{"path":"CHANGELOG.md","sizeBytes":300,"isText":true},{"path":".gitignore","sizeBytes":78,"isText":false},{"path":"LICENSE","sizeBytes":1072,"isText":false},{"path":"README.md","sizeBytes":2118,"isText":true},{"path":"SKILL.md","sizeBytes":11751,"isText":true},{"path":"skill.yaml","sizeBytes":858,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"notes-only","suspicious":0,"notes":2,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-08T21:21:31.104072Z","sha256":"212BBBC93089CF0C756D8331BD0F1FBBFCE41F9DEF99D5093470746374E6FC06","sizeBytes":8847},"review":null,"source":{"repositoryUrl":"https://github.com/lovstudio/skills","path":"skills/optimize-tauri-backend","license":"MIT","commit":"703b37345d95ba06dd109763c7854c9f3b221db4","subtreeSha":"C5C9095A3C4A5C967405740B617B6C5ECA3B6C84BDFC0E4478AD6BFAAFCA13AD","lastSyncedAt":"2026-09-18T13:47:20.398869Z"},"reviewedAt":"2026-09-08T21:22:22.850634Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/lovstudio/skills/tree/main/skills/optimize-tauri-backend"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install lovstudio-skills@llmmart"},{"target":"git","command":"git clone https://github.com/lovstudio/skills.git"}]}