Skip to content

Commit 4bf0d38

Browse files
committed
Prefix skill slash commands with "skill:"
1 parent 917d1ad commit 4bf0d38

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

cli/src/commands/command-registry.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,10 +500,13 @@ export function findCommand(cmd: string): CommandDefinition | undefined {
500500
return staticCommand
501501
}
502502

503-
// Check if this is a skill command
504-
const skill = getSkillByName(lowerCmd)
505-
if (skill) {
506-
return createSkillCommand(skill.name)
503+
// Check if this is a skill command (prefixed with "skill:")
504+
if (lowerCmd.startsWith('skill:')) {
505+
const skillName = lowerCmd.slice('skill:'.length)
506+
const skill = getSkillByName(skillName)
507+
if (skill) {
508+
return createSkillCommand(skill.name)
509+
}
507510
}
508511

509512
return undefined

cli/src/data/slash-commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ export const SLASHLESS_COMMAND_IDS = new Set(
159159
*/
160160
export function getSlashCommandsWithSkills(skills: SkillsMap): SlashCommand[] {
161161
const skillCommands: SlashCommand[] = Object.values(skills).map((skill) => ({
162-
id: skill.name,
163-
label: skill.name,
162+
id: `skill:${skill.name}`,
163+
label: `skill:${skill.name}`,
164164
description: skill.description,
165165
}))
166166

0 commit comments

Comments
 (0)