From 63eb27069a8eb3266d1e92cf051fda86e13289cf Mon Sep 17 00:00:00 2001 From: Hikari Date: Fri, 23 Jan 2026 15:03:52 -0800 Subject: [PATCH] feat: add /skill command for invoking Claude Code skills - New slash command: /skill - Sends prompt to Claude to run skills from ~/.claude/skills/ - Shows usage help if skill name is missing Closes #57 --- src/lib/commands/slashCommands.ts | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/lib/commands/slashCommands.ts b/src/lib/commands/slashCommands.ts index cf83a7b..185f03f 100644 --- a/src/lib/commands/slashCommands.ts +++ b/src/lib/commands/slashCommands.ts @@ -183,6 +183,47 @@ export const slashCommands: SlashCommand[] = [ } }, }, + { + name: "skill", + description: "Invoke a Claude Code skill from ~/.claude/skills/", + usage: "/skill ", + execute: async (args: string) => { + const conversationId = get(claudeStore.activeConversationId); + if (!conversationId) { + claudeStore.addLine("error", "No active conversation"); + return; + } + + const parts = args.trim().split(/\s+/); + const skillName = parts[0]; + const skillData = parts.slice(1).join(" "); + + if (!skillName) { + claudeStore.addLine( + "error", + "Usage: /skill \nExample: /skill onboard-mentee Discord ID: 123, GitHub: username" + ); + return; + } + + try { + claudeStore.addLine("system", `Invoking skill: ${skillName}`); + characterState.setState("thinking"); + + const message = skillData + ? `Please run the /${skillName} skill with the following data:\n\n${skillData}` + : `Please run the /${skillName} skill.`; + + await invoke("send_prompt", { + conversationId, + message, + }); + } catch (error) { + claudeStore.addLine("error", `Failed to invoke skill: ${error}`); + characterState.setTemporaryState("error", 3000); + } + }, + }, ]; export function parseSlashCommand(input: string): {