When to use this skill
ALWAYS use this skill when the user mentions:
- Capability/Scope design or ACL permission control / 能力、Scope、ACL 权限控制
- Building capabilities/default.json / 生成或校验 capabilities/default.json
- Tightening plugin access in production / 生产环境权限收敛
Trigger phrases include:
- "capabilities", "scope", "acl", "permissions file"
- "Permission configuration", "capability file", "Scope configuration", "ACL"
How to use this skill
- Translate features into plugin capabilities / 业务功能映射为插件能力
- Define scoped access rules per capability / 为能力定义 Scope 规则
- Generate and validate capabilities/default.json / 生成并校验能力文件
- Verify runtime behavior matches minimum-privilege policy / 验证最小权限运行效果
Outputs
- Capability-to-scope mapping / 能力到 Scope 的映射
- Validated capabilities/default.json / 可直接使用的能力文件
- Permission audit checklist / 权限审计清单
Scope
- Boundary: Capabilities, scope, and ACL configuration only / 仅限权限配置
- v2 focus: Capabilities & scope are mandatory controls / v2 强制配置
- Out of scope: app feature design or backend auth / 不含功能设计与后端鉴权
References
- https://v2.tauri.app/llms.txt
- https://v2.tauri.app/security/capabilities/
- https://v2.tauri.app/security/scope/
- https://v2.tauri.app/security/acl/
Keywords
tauri security, capabilities, scope, acl, permissions, 权限配置, 能力文件, 最小权限
Common Gotchas (Gotchas)
- Version compatibility: Pay attention to compatibility between the framework version 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 the editor's syntax checking
- Environment variables: Ensure all necessary environment variables are set correctly; do not hard-code sensitive information
- Dependency conflicts: When multiple versions coexist, pay attention to dependency conflicts and use a lock file to pin versions
- Performance pitfalls: Pay attention to performance optimization in large-data scenarios and avoid common issues such as N+1 queries
Usage flow
Step 1: Environment preparation
Ensure the necessary dependencies and tools are installed in the development environment.
Step 2: Configuration initialization
Perform basic configuration according to project requirements.
Step 3: Using core functionality
Implement 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.