Skip to content

Suggest skill slash commands in CLI - #10925

Merged
catrielmuller merged 5 commits into
mainfrom
improvement/cli-suggest-skills
Jun 5, 2026
Merged

Suggest skill slash commands in CLI#10925
catrielmuller merged 5 commits into
mainfrom
improvement/cli-suggest-skills

Conversation

@evanjacobson

@evanjacobson evanjacobson commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Issue

No linked issue; this is a small CLI discoverability fix.

Context

Skills can be invoked as slash commands, but they were hidden from CLI slash autocomplete. That made available skills harder to discover and created ambiguity when a skill shared a name with a built-in, configured, or MCP command.

Implementation

This makes skills visible in slash autocomplete and disambiguates conflicting command names with source suffixes like :skill and :mcp.

The :skill suffix follows the :mcp suffix convention.

Implementation notes
  • Uses a Kilo-owned helper for slash command display/matching so the TUI and run prompt follow the same formatting rules.
  • Keeps the shared upstream-file changes small and marked at call sites with kilocode_change, following the repo's fork-isolation pattern.
  • Adds coverage for listing and resolving a skill whose name conflicts with a command.

Screenshots / Video

N/A — CLI autocomplete behavior only; no visual PR evidence captured.

How to Test

Manual/local verification

  • Agent ran bun test ./test/kilocode/skill-command-autocomplete.test.ts from packages/opencode/ — passed: 1 test, 5 assertions.

Reviewer test steps

  1. Create or load a skill with the same name as an existing slash command, such as review.
  2. Open CLI slash autocomplete and confirm both the command and skill appear, with the skill shown using a :skill suffix.
  3. Select the skill autocomplete option and confirm it inserts /review:skill and resolves the skill instead of the command.

Blocked checks and substitute verification

  • Agent ran bun run script/check-opencode-annotations.ts from the repo root — currently fails because three changed lines in packages/opencode/src/command/index.ts are missing kilocode_change annotations.
  • Substitute verification: targeted behavior coverage passed via bun test ./test/kilocode/skill-command-autocomplete.test.ts.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Loom

This loom shows the autocomplete for skills and demonstrates a collision between the /commit cmd and some "commit" skill.
https://www.loom.com/share/1e15a3ee018747f589c2b7eadd24ab84

@kilo-code-bot

kilo-code-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (7 files)
  • packages/opencode/src/kilocode/cli/cmd/command-display.tsslashMatches added, no issues
  • packages/opencode/src/command/index.ts — annotation markers restructured to fix CI check, logic unchanged, no issues
  • packages/opencode/src/cli/cmd/run/footer.prompt.tsxslashMatches applied to parseSlashCommand, slashDisplay used for insertion text, no issues
  • packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx — display variable extracted for consistent insertion, no issues
  • packages/opencode/src/cli/cmd/tui/component/prompt/index.tsxslashMatches applied to command detection on submit, no issues
  • packages/opencode/test/kilocode/skill-command-autocomplete.test.ts — tests real implementation, covers conflict list/get, no issues
  • .changeset/floppy-ads-rule.md — user-facing changeset present, no issues

Reviewed by claude-4.6-sonnet-20260217 · 245,771 tokens

Review guidance: REVIEW.md from base branch main

@catrielmuller
catrielmuller merged commit 011477a into main Jun 5, 2026
25 of 29 checks passed
@catrielmuller
catrielmuller deleted the improvement/cli-suggest-skills branch June 5, 2026 21:38
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…st-skills

Suggest skill slash commands in CLI
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.

2 participants