Skip to content

feat: invoke skills as slash commands#9577

Open
kilo-code-bot[bot] wants to merge 2 commits intomainfrom
mark/skill-slash-command
Open

feat: invoke skills as slash commands#9577
kilo-code-bot[bot] wants to merge 2 commits intomainfrom
mark/skill-slash-command

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot Bot commented Apr 27, 2026

Summary

Skills are now first-class slash commands. Previously they could only be invoked from the skill picker dialog (TUI) or the skill tool the agent calls on its own; typing /kilo-config did not work in the TUI and in the VS Code webview skill-sourced commands were indistinguishable from regular ones.

What changed

  • command/index.ts: every skill is registered under /skill:<name> unconditionally and under the bare /<name> when no other command owns that name, so shadowed skills stay reachable.
  • TUI autocomplete now lists skills (hiding the :skill alias when the bare form is already shown) and tags them with a :skill suffix.
  • VS Code slash-command dropdown renders a skill/mcp badge next to the command name using the existing (but previously unused) i18n keys, and de-duplicates skill entries the same way.
  • Tests cover both the happy path and the shadowing case.

Skills are now first-class slash commands in both the CLI TUI and the
VS Code webview. Each skill is registered under its bare name when free
(e.g. /kilo-config) and always under a /skill:<name> alias so shadowed
skills remain reachable. The VS Code dropdown renders a 'skill' badge to
distinguish skill-sourced commands from custom commands and MCP prompts.
if (names.has(c.name)) return false
if (c.source === "skill" && c.name.startsWith("skill:")) {
const bare = c.name.slice("skill:".length)
if (bareSkills.has(bare)) return false
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Client-command collisions hide the skill alias

bareSkills is built before client commands are filtered out, so if a skill name matches a client-side slash command like settings or help, the bare skill is removed by names.has(c.name) and this branch also removes /skill:<name>. That makes the skill unreachable in VS Code despite the alias guarantee. Consider only hiding the alias when the bare skill will actually be returned.

Suggested change
if (bareSkills.has(bare)) return false
if (bareSkills.has(bare) && !names.has(bare)) return false

@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot Bot commented Apr 27, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • packages/kilo-vscode/webview-ui/src/hooks/useSlashCommand.ts

Reviewed by gpt-5.5-2026-04-23 · 393,086 tokens

If a skill's bare name collides with a hardcoded client-side slash
command in the VS Code webview (e.g. settings, help, models), we still
need the /skill:<name> alias to be reachable. Only hide the alias when
the bare skill will actually appear in the dropdown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant