From ef1baea163c492c845c68100af2802bc7bae60ac Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Wed, 11 Feb 2026 19:13:29 +0900 Subject: [PATCH] fix: improve error message for marketplace plugin commands - Detect namespaced commands (containing ':') from Claude marketplace plugins - Provide clear error message explaining marketplace plugins are not supported - Point users to .claude/commands/ as alternative for custom commands - Fixes issue where /daplug:run-prompt gave ambiguous 'command not found' Closes #1682 --- src/hooks/auto-slash-command/executor.ts | 2 +- src/tools/slashcommand/slashcommand-tool.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hooks/auto-slash-command/executor.ts b/src/hooks/auto-slash-command/executor.ts index 24ca3003..185ca479 100644 --- a/src/hooks/auto-slash-command/executor.ts +++ b/src/hooks/auto-slash-command/executor.ts @@ -202,7 +202,7 @@ export async function executeSlashCommand(parsed: ParsedSlashCommand, options?: if (!command) { return { success: false, - error: `Command "/${parsed.command}" not found. Use the slashcommand tool to list available commands.`, + error: parsed.command.includes(":") ? `Marketplace plugin commands like "/${parsed.command}" are not supported. Use .claude/commands/ for custom commands.` : `Command "/${parsed.command}" not found. Use the slashcommand tool to list available commands.`, } } diff --git a/src/tools/slashcommand/slashcommand-tool.ts b/src/tools/slashcommand/slashcommand-tool.ts index fb1227f3..f436c3ac 100644 --- a/src/tools/slashcommand/slashcommand-tool.ts +++ b/src/tools/slashcommand/slashcommand-tool.ts @@ -88,7 +88,9 @@ export function createSlashcommandTool(options: SlashcommandToolOptions = {}): T return `No exact match for "/${commandName}". Did you mean: ${matchList}?\n\n${formatCommandList(allItems)}` } - return `Command or skill "/${commandName}" not found.\n\n${formatCommandList(allItems)}\n\nTry a different name.` + return commandName.includes(":") + ? `Marketplace plugin commands like "/${commandName}" are not supported. Use .claude/commands/ for custom commands.\n\n${formatCommandList(allItems)}` + : `Command or skill "/${commandName}" not found.\n\n${formatCommandList(allItems)}\n\nTry a different name.` }, }) }