Skip to content

/skill slash command wipes existing input text instead of preserving it #27578

@HaleTom

Description

@HaleTom

Description

When the user types text into the prompt box, then invokes /skill (e.g. to select a skill after the input is already partly composed), selecting a skill from the picker discards all previously typed text. The input box is replaced entirely with /skill-name and the prior text is lost with no way to recover it.

This is especially frustrating because /skill is only recognized when typed as the very first characters of the prompt. So if you've typed a multi-line prompt and realize you need a skill, you must:

  1. Move the cursor to line 1, column 1
  2. Type /skill → Enter to open the picker
  3. Select the skill → all your text is gone

Steps to reproduce

  1. Type a multi-line prompt (e.g. "Please refactor the auth module to use JWT tokens")
  2. Place cursor at position 1,1
  3. Type /skill and press Enter
  4. Select any skill from the picker
  5. Observe: the previously typed text is wiped; only /skill-name remains in the input box

Expected behavior

The selected skill name should be prepended to the existing input text, not replace it. E.g. after selecting context7-mcp, the input should read:

/context7-mcp Please refactor the auth module to use JWT tokens

Alternatively, /skill should be recognized anywhere in the input (not just at the start), or the existing text should be preserved in undo history / clipboard so the user can paste it back.

Plugins

Using standard plugins: magic-context, opencode-queue, superpowers, etc.

OpenCode version

Latest (via opencode.dev install)

Operating System

linux x64 (Arch)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions