KS
Killer-Skills

add-tauri-command — Categories.community

v1.0.0
GitHub

About this Skill

Perfect for Desktop Agents needing to extend Tauri command functionality in Electron desktop apps Speicher Analyse - Windows Festplattenanalyse und Systemoptimierung (Electron Desktop App)

haenel881988 haenel881988
[0]
[0]
Updated: 2/21/2026

Quality Score

Top 5%
42
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add haenel881988/speicher-analyse/add-tauri-command

Agent Capability Analysis

The add-tauri-command MCP Server by haenel881988 is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion.

Ideal Agent Persona

Perfect for Desktop Agents needing to extend Tauri command functionality in Electron desktop apps

Core Value

Empowers agents to integrate custom commands into the Speicher Analyse app, leveraging Tauri's modular structure and Rust-based backend, with features like command re-exporting and system optimization

Capabilities Granted for add-tauri-command MCP Server

Implementing custom disk health checks
Adding network analysis capabilities
Extending system optimization features

! Prerequisites & Limits

  • Requires knowledge of Rust and Tauri framework
  • Limited to Electron desktop apps
  • Needs access to src-tauri/src/commands/ module
Project
SKILL.md
3.7 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Tauri-Command hinzufügen

Du fügst einen neuen Tauri-Command zur Speicher Analyse App hinzu.

Argumente

  • $ARGUMENTS[0] = Command-Name in snake_case (z.B. get_disk_health)
  • $ARGUMENTS[1] = Beschreibung (optional)

Voranalyse

  1. Lies src-tauri/src/commands/ — das passende Modul (cmd_scan, cmd_files, cmd_network, cmd_privacy, cmd_system, cmd_terminal, cmd_misc) identifizieren
  2. Lies src-tauri/src/commands/mod.rs um die Re-Export-Struktur zu verstehen
  3. Lies src-tauri/src/lib.rs um die Command-Registrierung im generate_handler![] zu sehen
  4. Lies src/api/tauri-api.ts um die typisierte API-Bridge zu verstehen
  5. Prüfe ob ein ähnlicher Command bereits existiert

3 Dateien ändern

1. src-tauri/src/commands/cmd_*.rs — Command-Funktion

Im passenden Modul hinzufügen:

rust
1#[tauri::command] 2pub async fn command_name(param: String) -> Result<serde_json::Value, String> { 3 // SECURITY: Parameter für PowerShell escapen 4 let safe_param = param.replace("'", "''"); 5 6 let script = format!("Get-Something '{}'", safe_param); 7 let output = crate::ps::run_ps(&script).await?; 8 9 let json: serde_json::Value = serde_json::from_str(&output) 10 .map_err(|e| format!("JSON-Parse-Fehler: {}", e))?; 11 Ok(json) 12}

Security-Regeln (PFLICHT bei JEDEM Command):

  • PowerShell-Escaping: Alle String-Parameter die in format!() für PowerShell verwendet werden MÜSSEN mit .replace("'", "''") escaped werden
  • Pfad-Validierung: Pfade vom Frontend validieren (existiert? innerhalb erlaubter Verzeichnisse?)
  • Enum-Whitelist: Parameter mit festen Werten per match auf erlaubte Werte prüfen
  • IP-Validierung: IP-Adressen mit Regex validieren

Konventionen:

  • snake_case für Funktionsnamen
  • #[tauri::command] Attribut
  • Result<serde_json::Value, String> Rückgabetyp
  • Async für I/O-Operationen
  • PowerShell über crate::ps::run_ps() oder crate::ps::run_ps_json()

2. src-tauri/src/lib.rs — Command registrieren

rust
1.invoke_handler(tauri::generate_handler![ 2 // ... bestehende Commands ... 3 commands::command_name, // NEU 4])

3. src/api/tauri-api.ts — Typisierte Export-Funktion

typescript
1export const commandName = (param: string) => 2 invoke<ReturnType>('command_name', { param });

Benennungs-Konvention:

  • Rust-Command: snake_case (z.B. get_disk_health)
  • TypeScript-Funktion: camelCase (z.B. getDiskHealth)
  • Frontend-Import: import { getDiskHealth } from '../api/tauri-api'

Frontend-Aufruf (optional)

typescript
1// In src/views/SomeView.tsx 2import { commandName } from '../api/tauri-api'; 3import { useAppContext } from '../context/AppContext'; 4 5const { showToast } = useAppContext(); 6try { 7 const result = await commandName(arg); 8} catch (err: any) { 9 showToast('Fehler: ' + err.message, 'error'); 10}

Security-Checkliste (PFLICHT vor Commit)

  • Alle String-Parameter für PowerShell mit .replace("'", "''") escaped?
  • Pfade vom Frontend validiert?
  • Enum-Parameter per Whitelist/match geprüft?
  • IP-Adressen per Regex validiert?
  • Keine format!() mit unescaptem User-Input?

Häufige Fehler vermeiden

  • Command in cmd_*.rs definiert aber NICHT in mod.rs re-exportiert → Compile-Fehler
  • Command NICHT in lib.rs registriert → "unknown command"
  • camelCase in Rust → muss snake_case sein
  • TypeScript-Funktion mit falschem invoke-Namen → stille Fehler
  • Parameter in format!() ohne Escaping → Command Injection

Ausgabe

  • Rust-Command: commands::command_name (in welchem cmd_*.rs Modul)
  • TypeScript-Funktion: commandName() in src/api/tauri-api.ts
  • Parameter: Typen und Escaping-Status
  • Registrierung: In lib.rs + mod.rs eingetragen

Related Skills

Looking for an alternative to add-tauri-command or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication