lov-optimize-tauri-backend

lov-optimize-tauri-backend is a skill for Claude Code, Codex from lovstudio/skills. It costs 125 tokens per session (2,857 once invoked), scanned A, original, MIT.

A guide for structuring the Rust backend of Tauri 2 desktop apps, including the boundary between the frontend and native code.

In plain words
What is it for?
Use it to split backend code into modules, keep Tauri commands small and typed, improve development scripts, and recover state after restarts.
Why use it?
It helps reduce disruptive Rust restarts, oversized backend files, scattered command calls, and fragile long-running communication during development.

Skill for Claude CodeCodex

Part of the dev-tools plugin — 31 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lovstudio/skills/optimize-tauri-backend
Any agent
npx skills add lovstudio/skills --skill optimize-tauri-backend
Clone the repo
git clone --depth 1 https://github.com/lovstudio/skills

Made for: Claude Code, Codex.

Or install dev-tools, the plugin that ships this one along with the rest of its 31 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lov-optimize-tauri-backend

README.md
[![agentmods](https://agentmods.dev/badge/skills/lovstudio/skills/optimize-tauri-backend.svg)](https://agentmods.dev/skills/lovstudio/skills/optimize-tauri-backend)
Your own site
<a href="https://agentmods.dev/skills/lovstudio/skills/optimize-tauri-backend"><img src="https://agentmods.dev/badge/skills/lovstudio/skills/optimize-tauri-backend.svg" alt="Measured on agentmods" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,857 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00125 $0.02857
Opus 5 $0.00063 $0.01429
Sonnet 5 $0.00025 $0.00571
Haiku 4.5 $0.00013 $0.00286

Measured yesterday against content hash 0bc90e87f472, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lov-optimize-tauri-backend scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/optimize-tauri-backend/SKILL.md · 349 lines

How it starts

The opening of the file, as written. The whole thing — 349 lines — stays where its author put it; the contents beside it link to each section on GitHub.

optimize-tauri-backend — Tauri 后端优化

Use this skill to turn a growing Tauri backend into a smaller, more stable, more pleasant development surface. The goal is not magical Rust HMR. The goal is to reduce how often Rust changes are needed, make Rust restarts less disruptive, and keep the Tauri command boundary small, typed, and auditable.

When to Use

  • The user is developing with pnpm tauri dev / npm run tauri dev and Rust file changes keep closing and reopening the app.
  • src-tauri/src/lib.rs has become a God file.
  • The app exposes 100+ or 200+ #[tauri::command] functions.
  • Frontend code scatters raw invoke("command_name") strings across many components.
  • Long-running invoke / Channel calls cause stale callback warnings after reload or HMR.
  • The user wants backend modularization, command consolidation, better dev scripts, or restart-state recovery.

Core Position

State this clearly when asked about hot reload:

Surface Dev behavior
Frontend Vite / React real HMR
Rust / Tauri backend recompile + restart native process
Best optimization separate stable Tauri shell from volatile domain logic, then make restarts cheap

Do not promise Rust backend HMR inside Tauri. Tauri's Rust-side "hot reload" means watch, rebuild, and restart.

Workflow

Step 1: Read Local Rules First

Before changing files, inspect project instructions and config:

pwd
find .. -name AGENTS.md -print
find .. -name CLAUDE.md -print
rg -n "beforeDevCommand|devUrl|frontendDist|tauri dev|--no-watch|invoke\\(|#\\[tauri::command\\]|generate_handler" package.json src-tauri src 2>/dev/null

Honor local constraints. If the repo says not to run pnpm build, do not run it. Prefer rg and small file reads. Do not revert unrelated user changes.

Step 2: Baseline the Backend

Collect objective numbers before proposing or editing:

wc -l src-tauri/src/lib.rs 2>/dev/null
find src-tauri/src -maxdepth 3 -type f -name "*.rs" -print0 | xargs -0 wc -l | sort -n | tail
rg -n "#\\[tauri::command\\]" src-tauri/src | wc -l
rg -n "generate_handler!|invoke\\(" src-tauri/src src 2>/dev/null

Read the full file on GitHub · 349 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 349 lines · 125 tokens per session scan A 0bc90e87f472

Subscribe to this mod's changes

lov-optimize-tauri-backend is a skill published in the GitHub repository lovstudio/skills (64 stars, last pushed today), licensed MIT. It adds 125 tokens to every session and 2,857 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

polar-billing

This skill should be used when working on Polar billing system, Stripe integration, subscription lifecycle, checkout flows, or benefit provisioning.

fcakyon/claude-codex-settings · 29 tokens

dokploy-deploy

This skill should be used when user asks to "deploy with Dokploy", "use Dokploy Cloud", "manage self-hosted Dokploy", "deploy Docker Compose on Dokploy", "manage Dokploy databases", "configure Dokploy domains", or "look up Dokploy CLI commands".

fcakyon/claude-codex-settings · 63 tokens

mongodb-connection

Optimize MongoDB client connection configuration (pools, timeouts, patterns) for any supported driver language. Use this skill when working/updating/reviewing on functions that instantiate or configure a MongoDB client (eg, when calling connect()), configuring connection pools, troubleshooting connection errors…

fcakyon/claude-codex-settings · 122 tokens

mongodb-schema-design

MongoDB schema design patterns and anti-patterns. Use when designing data models, reviewing schemas, migrating from SQL, or troubleshooting performance issues caused by schema problems. Triggers on "design schema", "embed vs reference", "MongoDB data model", "schema review", "unbounded arrays", "one-to-many", "tree…

fcakyon/claude-codex-settings · 127 tokens

mongodb-search-and-ai

Guides MongoDB users through implementing and optimizing Atlas Search (full-text), Vector Search (semantic), and Hybrid Search solutions. Use this skill when users need to build search functionality for text-based queries (autocomplete, fuzzy matching, faceted search), semantic similarity (embeddings, RAG…

fcakyon/claude-codex-settings · 132 tokens

resolve-pr-comments

This skill should be used when user asks to "address PR comments", "resolve PR feedback", "handle review comments", "fix PR issues", "respond to PR review", or explicitly invokes "resolve-pr-comments".

fcakyon/claude-codex-settings · 47 tokens