When to use this skill
ALWAYS use this skill when the user mentions:
- Preventing multiple app instances
- Handling second-launch arguments
- Deep-linking or CLI with single-instance
Trigger phrases include:
- "single instance", "second launch", "arguments", "deep linking"
- "single instance", "second launch", "arguments", "deep linking"
How to use this skill
- Enable single-instance and define init behavior
- Capture and route second-launch arguments to the app
- Focus or restore the main window on re-entry
- Validate behavior with deep-linking or CLI scenarios
Outputs
- Single-instance behavior plan
- Second-launch routing checklist
Scope
- Boundary: Single-instance configuration and runtime behavior
- Key points: Safe argument passing and window focus behavior
References
- https://v2.tauri.app/llms.txt
- https://v2.tauri.app/plugin/single-instance/
- https://v2.tauri.app/zh-cn/plugin/single-instance/
Keywords
tauri single instance, second launch, args, focus window
Common Gotchas
- Version Compatibility: Pay attention to compatibility between framework versions and dependency libraries; APIs may differ across versions.
- Configuration File Format: Configuration file format errors are the most common problem; it is recommended to use your editor's syntax checking.
- Environment Variables: Ensure all necessary environment variables are set correctly, and do not hard-code sensitive information.
- Dependency Conflicts: When multiple versions coexist, watch out for dependency conflicts and use a lock file to pin versions.
- Performance Pitfalls: In large-data scenarios, pay attention to performance optimization and avoid common issues such as N+1 queries.
Usage Flow
Step 1: Environment Preparation
Ensure the development environment has the necessary dependencies and tools installed.
Step 2: Configuration Initialization
Perform basic configuration according to project requirements.
Step 3: Using Core Features
Implement the core functionality according to the example code.
Step 4: Test Verification
Run tests to ensure the functionality works properly.
Step 5: Deployment and Release
After development is complete, proceed with deployment and monitoring.