add-command

A command template for adding a Tauri IPC command. Tauri IPC is the message path between a desktop app's frontend and its Rust backend.

In plain words
What is it for?
Adding a command to a Tauri app, including its Rust handler, registration in main.rs, frontend invoke call, and basic consistency checks.
Why use it?
It gives the agent a defined sequence for connecting the Rust handler, registration, and TypeScript call without mismatched names or parameters.

Command for Claude Code

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 commands/talayash/agentrium/add-command
Clone the repo
git clone --depth 1 https://github.com/talayash/agentrium

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 296 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.00000 $0.00296
Opus 5 $0.00000 $0.00148
Sonnet 5 $0.00000 $0.00059
Haiku 4.5 $0.00000 $0.00030

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

Security

Grade A, and why

add-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/commands/add-command.md · 32 lines

What it actually says

Add a new Tauri IPC command

Add a new Tauri IPC command named $ARGUMENTS. If the name is not provided, ask the user.

Follow these steps in order:

Step 1: Understand the command

Ask the user (if not already clear) what the command should do, what parameters it takes, and what it returns.

Step 2: Add the Rust handler

Add an async handler function in src-tauri/src/commands.rs. Follow existing patterns:

  • Use #[tauri::command] attribute
  • Accept state: tauri::State<'_, AppState> if database or terminal access is needed
  • Return Result<T, String> where T is the appropriate return type
  • Map errors with .map_err(|e| e.to_string())

Step 3: Register in main.rs

Add the new command to the invoke_handler macro call in src-tauri/src/main.rs.

Step 4: Add the TypeScript invoke call

Add the corresponding invoke<ReturnType>('command_name', { params }) call in the appropriate frontend file. Import invoke from @tauri-apps/api/core.

Step 5: Verify

  • Confirm the command name matches exactly between Rust registration and TypeScript invoke
  • Confirm parameter names match between Rust and TypeScript
  • Confirm the return type is handled properly (try/catch in TypeScript)
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 · 32 lines · 0 tokens per session scan A 47fd97191518

Subscribe to this mod's changes

add-command is a command published in the GitHub repository talayash/agentrium (39 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 296 tokens. 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.