원클릭으로
tauri-command
Scaffold a new Tauri command across Rust backend and TypeScript frontend with proper patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Scaffold a new Tauri command across Rust backend and TypeScript frontend with proper patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Drive the real GUI against the real engine via the standalone dev HTTP bridge (`npm run dev:bridge`). Use whenever "does the wiring test actually hold up against real code?" matters — smoke verification, UI development with live engine state, real-engine bug repro, exploratory debugging with Chrome DevTools instruments.
Generate Playwright E2E tests following project conventions (Tauri fixture, storage isolation, helpers).
Generate unit tests following project conventions. Use when the user asks to create, generate, or write tests for a file or component.
Scaffold a new React component with co-located test, shadcn/ui primitives, and barrel export registration.
Review changes and determine if PROJECT_SHADOW.md needs updating per AI_CONTRACT.md criteria. Runs automatically during code review.
| name | tauri-command |
| description | Scaffold a new Tauri command across Rust backend and TypeScript frontend with proper patterns. |
Scaffold a new Tauri command with both Rust and TypeScript sides.
Input: Command name and purpose. Example: /tauri-command check_update "Check if CLI update is available"
Steps
Add the Rust command in src-tauri/src/lib.rs:
#[tauri::command] function following existing patternsState<'_, SharedRunState> if run-related)Result<T, String> for fallible commandsinvoke_handler in run() functionIf the command spawns a CLI process:
build_engine_command() from cmd_impl.rs — never bare Command::new().cmd PATH shim wrapping (cmd /C for .cmd files)SharedRunStateAdd TypeScript bridge function in the appropriate location:
src/engine-bridge.tssrc/lib/import { invoke } from '@tauri-apps/api/core'Add capability permission if needed in src-tauri/capabilities/
Add the Tauri bridge mock in src/test/tauri-bridge-mock.ts for unit testing
Rust Pattern
#[tauri::command]
async fn my_command(arg: String) -> Result<MyResponse, String> {
// For CLI execution, ALWAYS use build_engine_command():
// let mut cmd = cmd_impl::build_engine_command(&exe, &args);
Ok(MyResponse { /* ... */ })
}
TypeScript Pattern
import { invoke } from '@tauri-apps/api/core';
export async function myCommand(arg: string): Promise<MyResponse> {
return invoke<MyResponse>('my_command', { arg });
}
Critical Landmine
Windows .cmd PATH resolution: Rust's std::process::Command only resolves .exe files. The endstate.cmd shim requires cmd /C wrapping. All spawn sites MUST use build_engine_command() from cmd_impl.rs. Direct Command::new(exe) will silently fail when the CLI is a .cmd shim on PATH.
Protected Files Warning
src/engine-bridge.ts and src-tauri/src/engine_adapter.rs are protected files. Modifications require explicit user instruction. If the new command needs changes there, flag this before proceeding.