add-tauri-command

A workflow for exposing Rust backend functionality to a Vue frontend through Tauri's command bridge. Tauri is a framework for desktop apps that can connect a web-based interface to native code.

In plain words
What is it for?
Use it to add a Tauri command, call it from a Vue component through the shared TypeScript wrapper, and pass data safely between Rust and the interface.
Why use it?
It helps keep backend and frontend changes aligned and applies checks for paths, external processes, Git commands, and command permissions.

Skill for Claude CodeCodex

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/devlint/gitwand/add-tauri-command
Any agent
npx skills add devlint/GitWand --skill add-tauri-command
Clone the repo
git clone --depth 1 https://github.com/devlint/GitWand

Made for: Claude Code, Codex.

Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,581 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.00050 $0.01581
Opus 5 $0.00025 $0.00790
Sonnet 5 $0.00010 $0.00316
Haiku 4.5 $0.00005 $0.00158

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

Security

Grade A, and why

add-tauri-command 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.

.claude/skills/add-tauri-command/SKILL.md · 191 lines

How it starts

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

Skill : add-tauri-command

Ajouter une commande Tauri de bout en bout — Rust + TypeScript dans le même commit, sans trou de sécurité.

Les deux fichiers cibles sont toujours :

  • apps/desktop/src-tauri/src/lib.rs — implémentation Rust
  • apps/desktop/src/utils/backend.ts — wrapper TypeScript

Les composants et composables Vue ne doivent jamais appeler invoke() directement. Tout passe par backend.ts.


Étape 1 — Spécifier la commande

Avant d'écrire une ligne de code, répondre à ces questions :

Question Impact
Nom de la commande ? snake_case en Rust, camelCase en TS
Paramètres et leurs types ? Identifier ceux qui sont des chemins → safe_repo_path obligatoire
Type de retour ? Définir / réutiliser une interface TS dans types.ts
Spawne-t-elle un process externe ? Vérifier les capabilities Tauri
Exécute-t-elle git ? Règle .arg() obligatoire, jamais format!()

Étape 2 — Implémenter en Rust dans lib.rs

Appliquer les règles dans cet ordre exact :

2a. Tout paramètre chemin passe par safe_repo_path()

/// Retourne le contenu du fichier de config d'un repo.
#[tauri::command]
fn read_config_file(cwd: String, path: String) -> Result<String, String> {
    // ✅ TOUJOURS : valider le chemin avant tout usage
    let safe = safe_repo_path(&cwd, &path)
        .map_err(|e| e.to_string())?;
    let content = std::fs::read_to_string(&safe)
        .map_err(|e| e.to_string())?;
    Ok(content)
}
// ❌ JAMAIS : path traversal possible
fn read_config_file(cwd: String, path: String) -> Result<String, String> {
    let full = std::path::PathBuf::from(&cwd).join(&path); // "../../../etc/passwd" passe !
    Ok(std::fs::read_to_string(full).map_err(|e| e.to_string())?)
}

2b. Les commandes git utilisent .arg() séparé — jamais format!()

// ✅ Chaque argument est isolé : pas d'injection possible
let output = Command::new(git_binary())
    .arg("log")
    .arg("--oneline")
    .arg("-n").arg(&limit.to_string())
    .arg("--").arg(&safe_path)
    .current_dir(&cwd)
    .output()
    .map_err(|e| e.to_string())?;

Read the full file on GitHub · 191 lines

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 · 191 lines · 50 tokens per session scan A 3174f487230b

Subscribe to this mod's changes

add-tauri-command is a skill published in the GitHub repository devlint/GitWand (167 stars, last pushed 3d ago), licensed MIT. It adds 50 tokens to every session and 1,581 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

hunk-extensions

Maps the hunkdiff/extension authoring surface for Hunk, the terminal diff viewer — hiding or reordering reviewed files, docked panes, alternate file views, commands and key bindings, dialogs, workspace writes, themes, syntax languages, VCS backends, lifecycle events. Use when writing, debugging, or installing a Hunk…

modem-dev/hunk · 105 tokens

hunk-launch-video

Produces Hunk videos by driving the real TUI headlessly in a PTY, compositing captioned 1080p frames in Chromium, and encoding with ffmpeg. Use for feature demos, workflow explainers, announcements, launch videos, and full-release roundups.

modem-dev/hunk · 60 tokens

hunk-review

Interacts with live Hunk diff review sessions via CLI. Inspects review focus, navigates files, hunks, and exact lines, reloads session contents, adds inline review comments, and paints attention marks on character ranges. Use when the user has a Hunk session running or wants to review diffs interactively.

modem-dev/hunk · 69 tokens

hunk-release

Prepares, publishes, verifies, and curates Hunk releases. Use for release metadata, benchmarks, tags, publishing, release videos, backports, or recovery.

modem-dev/hunk · 38 tokens

mobile-app

像素级 iPhone 15 Pro 边框, 一屏 app 截图.

nexu-io/html-anything · 21 tokens

git-machete

Use whenever invoking the git machete CLI to organize branch chains, compute fork points, run stacked rebases/merges, or manage GitHub/GitLab PR/MR chains - especially in a repo that already has a .git/machete file. Lists which subcommands modify .git/machete, run rebase/merge, run hooks, or read stdin, so the agent…

VirtusLab/git-machete · 165 tokens