Skip to content

List skills in the OpenCode TUI's / autocomplete - #137

Merged
jappeace merged 1 commit into
jappeace:masterfrom
jappeace-sloth:opencode/skill-autocomplete
Oct 18, 2026
Merged

jappeace merged 1 commit into
jappeace:masterfrom
jappeace-sloth:opencode/skill-autocomplete

Conversation

@jappeace-sloth

Copy link
Copy Markdown
Contributor

Summary

Typing / in the OpenCode TUI never suggested a custom skill. OpenCode 1.19.0 does load the skills from ~/.claude/skills and registers each one as a command (typing /<skill> in full already runs it), but the autocomplete skips them on purpose (packages/tui/src/component/prompt/autocomplete.tsx:451, if (serverCommand.source === "skill") continue) and leaves only the /skills selector.

opencode/skill-autocomplete.patch removes that skip and tags skills :skill, the way MCP prompts are tagged :mcp. Picking one inserts /<skill> like any other command. With the repo's skills, typing /email now suggests /email-writing:skill first.

A TUI plugin registering one slash command per skill was the alternative. It was rejected because it would go through the legacy api.command bridge that upstream marks for removal in v2 (tui/src/plugin/command-shim.ts), and it would duplicate the server's own skill commands.

Instance: stan@panorama-tower

Test plan

  • opencode/test/skill-autocomplete.js drives the real TUI in a private tmux server with a fixture skill under ~/.claude/skills and types /fixture-sk. On the unpatched binary the popup says "No matching items" and the test fails; on the patched build it passes.
  • opencode/check.nix (with a dontCheck claude-gate, see below): 4/4 opencode integration tests and 24/24 stopgate unit tests pass in the sandbox
  • Relaunch ryan so the container picks up the rebuilt opencode, then type / and see the skills

nix-build gate/nix/ci.nix is red on master for an unrelated reason: 35de2a9 disabled the Sunday rule in WorkingHours.hs but kept its unit test, so claude-gate fails its suite.

🤖 Generated with Claude Code

OpenCode 1.19.0 loads the skills from ~/.claude/skills and registers each
one as a server command, so typing /<skill> already runs it, but the TUI
autocomplete drops them on purpose (autocomplete.tsx:451,
`if (serverCommand.source === "skill") continue`) and offers only the
/skills selector. Typing / therefore never suggested a custom skill.

skill-autocomplete.patch removes that skip and tags skills ":skill", the
way MCP prompts are tagged ":mcp". Selecting one inserts "/<skill> " like
any other command. A TUI plugin registering one slash command per skill
was considered and rejected: it goes through the legacy api.command bridge
that upstream marks for removal in v2 (tui/src/plugin/command-shim.ts) and
would duplicate the server's own skill commands.

opencode/test/skill-autocomplete.js drives the real TUI in a private tmux
server with a fixture skill under ~/.claude/skills, types "/fixture-sk",
and expects "/fixture-skill:skill" in the popup. On the unpatched binary
the popup says "No matching items" and the test fails; with the patch it
passes. check.nix runs it (tmux added to its inputs); all opencode
integration tests and the stopgate unit tests pass in the sandbox.

The full gate/nix/ci.nix is still red on master for an unrelated reason:
35de2a9 disabled the Sunday rule but kept its unit test, so the check was
run with a dontCheck claude-gate.

Instance: stan@panorama-tower

Prompt: can we make it so that opencode also suggests my custom skills?

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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