v1 to v2

22 added, 66 removed. Audit A to A.

---
name: command-dispatch
- version: 1
+ version: 2
description: >-
- Use this skill when the user's intent is to execute a system or plugin function. Applicable scenarios include:
- 1) The user sends a slash command starting with / (e.g. /cookiecloud, /sites, /subscribes, etc.);
- 2) The user describes an action in natural language that can be fulfilled by a system or plugin command
- (e.g. "sync sites", "show subscriptions", "refresh subscriptions", "check downloads", etc.).
- This skill helps you identify the user's intent, find the matching command, extract necessary parameters,
- and execute the corresponding command.
- allowed-tools: list_slash_commands query_plugin_capabilities run_slash_command
+ Use this skill when the user sends a slash command or asks to run a MoviePilot
+ system or plugin command in natural language. Discover the live command
+ catalog, resolve the exact command, and dispatch it through the structured API
+ gateway.
+ allowed-tools: moviepilot_api
+ allowed-api-operations: slash.list slash.run plugin.capabilities
---
# Command Dispatch
- Use this skill to identify user intent and dispatch the corresponding system or plugin command.
-
- ## When to Use
-
- - The user sends a `/xxx` slash command (execute directly)
- - The user describes an action in natural language, for example:
- - "Sync sites" → `/cookiecloud`
- - "Show my subscriptions" → `/subscribes`
- - "Refresh subscriptions" → `/subscribes refresh`
- - "What's downloading?" → `/downloading`
- - "Organize downloaded files" → `/transfer`
- - "Clear cache" → `/clear_cache`
- - "Restart the system" → `/restart`
- - "Pause all QB tasks" → `/pause_torrents` (plugin command)
-
- ## Tools
-
- - `list_slash_commands` — List all available slash commands (system + plugin), returns command name, description, and category
- - `query_plugin_capabilities` — Query detailed plugin capabilities (commands, actions, scheduled services)
- - `run_slash_command` — Execute a specified command (works for both system and plugin commands)
-
- ## Workflow
-
- ### Step 1: Identify User Intent
-
- Determine whether the user's message is requesting the execution of a command:
-
- - **Direct command**: Message starts with `/`, e.g. `/sites`, `/subscribes` → skip to Step 3
- - **Natural language**: The user describes an actionable request → continue to Step 2
-
- ### Step 2: Find Matching Command
-
- Use `list_slash_commands` to retrieve all available commands. Match the user's described intent against the `description` and `category` fields of each command.
-
- If the user's description involves a specific plugin's functionality, additionally use `query_plugin_capabilities` to query that plugin's detailed capabilities.
-
- **Matching strategy**:
- - Prefer exact matches on command description
- - Then narrow down by category and match
- - If no matching command is found, inform the user that no corresponding function is available
-
- ### Step 3: Extract Parameters and Execute
-
- Some commands support additional arguments (space-separated after the command), for example:
- - `/redo <history_id>` — Manually re-organize a specific record
- - `/sites disable <site_id>` — Disable one or more sites
- - `/subscribes delete <subscribe_id>` — Delete one or more subscriptions
-
- Use `run_slash_command` to execute the command in the format `/command_name arg1 arg2`.
-
- ### Step 4: Report Result
-
- Command execution is asynchronous. After triggering, inform the user that the command has started. If the command does not exist, list available commands for reference.
+ Use `moviepilot_api`; retired command tools and MCP aliases do not exist.
- ## Important Notes
+ 1. For a literal `/command ...`, preserve the command text and inspect the live
+ catalog with `slash.list` when availability or syntax is uncertain.
+ 2. For natural-language requests, call `slash.list`, then match the returned
+ name, description, and category. If a plugin owns the capability, optionally
+ call `plugin.capabilities` for its declared commands and actions.
+ 3. Never invent a command or argument. If the live catalog has no match, report
+ that no supported command was found.
+ 4. Command execution changes external state. Obtain confirmation unless the user
+ already explicitly requested the exact command/action.
+ 5. Dispatch with `slash.run` and `body.command` containing the complete command,
+ for example `/sites disable 3`. Check the returned acceptance/result before
+ reporting completion.
- - Command execution requires admin privileges; the tool will automatically check permissions
- - Both system and plugin commands are executed via the `run_slash_command` tool — no need to distinguish between them
- - If you are unsure which command matches the user's intent, use `list_slash_commands` first to look up before deciding
- - Never guess non-existent commands; always select from the available command list
+ Examples of intent mapping such as site sync, subscription refresh, cache clear,
+ or restart are hints only; the live `slash.list` response is authoritative.