用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill creating-tauri-project命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | creating-tauri-project |
| description | > Use when this capability is needed. |
Generates a complete my-tauri-app/ scaffold with:
Before generating anything, ask the user for:
my-tauri-app)If the user has already provided these details, skip asking and proceed directly.
For each enabled platform, the sidecar binary must be named with its Rust target triple suffix.
Read references/target-triples.md for the full mapping.
Common triples:
| Platform | Triple |
|---|---|
| Windows x64 | x86_64-pc-windows-msvc |
| macOS ARM | aarch64-apple-darwin |
| macOS x64 | x86_64-apple-darwin |
| Linux x64 | x86_64-unknown-linux-gnu |
Binary names follow: <backend-name>-<triple>[.exe on Windows]
Create ALL files listed below. Use the templates in references/ for file contents.
<project-name>/
├── frontend/
│ ├── src/
│ │ ├── main.<ext> # Entry point (tsx/svelte/vue/jsx)
│ │ └── App.<ext>
│ ├── index.html
│ ├── vite.config.<ext>
│ ├── tsconfig.json # if TypeScript
│ └── package.json
├── backend/
│ ├── src/ # Python: main.py here; .NET: Program.cs; Go: main.go
│ ├── requirements.txt # Python only
│ ├── <name>.csproj # .NET only
│ ├── go.mod # Go only
│ └── tests/
├── src-tauri/
│ ├── binaries/ # gitignored — holds built sidecar executables
│ │ └── .gitkeep
│ ├── capabilities/
│ │ └── default.json
│ ├── icons/ # placeholder icons note
│ ├── src/
│ │ └── main.rs
│ ├── tauri.conf.json
│ ├── Cargo.toml
│ └── build.rs
├── .github/
│ └── workflows/
│ └── release.yml
├── .gitignore
├── package.json # root — scripts for dev/build + sidecar
├── pnpm-workspace.yaml # if pnpm
└── README.md
package.json (root){
"name": "<project-name>",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "tauri dev",
"build": "tauri build",
"build:backend": "<see backend section>",
"frontend:dev": "cd frontend && <pm> run dev",
"tauri": "tauri"
},
"devDependencies": {
"@tauri-apps/cli": "^2"
}
}
pnpm-workspace.yamlpackages:
- 'frontend'
src-tauri/tauri.conf.json{
"$schema": "https://schema.tauri.app/config/2",
"productName": "<ProjectName>",
"version": "0.1.0",
"identifier": "com.<author>.<project-name>",
"build": {
"frontendDist": "../frontend/dist",
"devUrl": "http://localhost:5173",
"beforeDevCommand": "cd frontend && <pm> run dev",
"beforeBuildCommand": "cd frontend && <pm> run build"
},
"bundle": {
"active": true,
"targets": "all",
"externalBin": [
"binaries/<backend-name>"
]
},
Key:
externalBinpaths are prefix-only — Tauri appends the target triple at runtime.
src-tauri/capabilities/default.json{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Default capability set",
"windows": ["main"],
"permissions": [
"core:default",
"shell:allow-execute",
"shell:allow-open"
]
}
For sidecar permissions, also add:
{ "identifier": "shell:allow-execute", "allow": [{ "name": "<backend-name>", "sidecar": true }] }
src-tauri/src/main.rs// Prevents additional console window on Windows in release
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use tauri::Manager;
use tauri_plugin_shell::ShellExt;
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.setup(|app| {
// Spawn the backend sidecar
let sidecar_command = app.shell().sidecar("<backend-name>").unwrap();
let (_rx, _child) = sidecar_command.spawn().expect("Failed to spawn sidecar");
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
src-tauri/Cargo.toml[package]
name = "<project-name>"
version = "0.1.0"
edition = "2021"
[lib]
name = "<project_name>_lib"
crate-type = ["lib", "cdylib", "staticlib"]
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = [] }
tauri-plugin-shell = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
src-tauri/build.rsfn main() {
tauri_build::build()
}
.gitignorenode_modules/
dist/
target/
src-tauri/binaries/*
!src-tauri/binaries/.gitkeep
*.pyc
__pycache__/
.env
Read references/backends.md for language-specific templates.
| Backend | Entry file | Build command output |
|---|---|---|
| Python/FastAPI | backend/src/main.py | PyInstaller → src-tauri/binaries/ |
| .NET | backend/src/Program.cs | dotnet publish -r <rid> -o src-tauri/binaries/ |
| Go | backend/src/main.go | go build -o src-tauri/binaries/<name>-<triple> |
| Node | backend/src/index.js | pkg or nexe → src-tauri/binaries/ |
Read references/frontends.md for framework-specific templates.
| Framework | vite.config | Entry ext | Notes |
|---|---|---|---|
| React | .ts | .tsx | @vitejs/plugin-react |
| Svelte | .ts | .svelte | @sveltejs/vite-plugin-svelte |
| Vue | .ts | .vue | @vitejs/plugin-vue |
| Vanilla | .js | .js | No framework plugin |
Always set server.port: 5173 and clearScreen: false in vite config for Tauri compatibility.
See references/cicd.md for the full multi-platform release.yml template.
Key jobs:
[ubuntu, macos, windows] → compiles sidecar for each targettauri-apps/tauri-action@v0Generate a README with:
## Development section: steps to install and run## Building section: steps to compile backend + pnpm build## Architecture section: brief explanation of the sidecar patternAfter creating all files, remind the user:
<pm> install in root and frontend/cargo add tauri-plugin-shell in src-tauri/com.<author>.<name> identifier in tauri.conf.jsonsrc-tauri/icons/ (use tauri icon CLI)tauri devcapabilities/default.json permissionssrc-tauri/binaries/ is gitignored — binaries are built artifacts, not committedexternalBin array in tauri.conf.json uses prefix paths — Tauri resolves the full triple-suffixed filename at runtimeAPPLE_* env vars in CISource: DINHDUY/ai-workflow-kit — distributed by TomeVault.