Skip to content

fix(skill): reload slash skill content on invocation - #49547

Open
lazyayuan wants to merge 2 commits into
anomalyco:devfrom
lazyayuan:skill-command-reload
Open

lazyayuan wants to merge 2 commits into
anomalyco:devfrom
lazyayuan:skill-command-reload

Conversation

@lazyayuan

Copy link
Copy Markdown

Issue for this PR

Closes #49451

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Skill-backed slash commands captured item.content when the Command service initialized, so editing an existing SKILL.md had no effect until OpenCode restarted. This changes the slash command template getter to call Skill.require() on each invocation, reloading the current disk-backed content while keeping command discovery metadata cached.

How did you verify your code works?

Verified manually in the desktop app:

  1. Invoked an existing project Skill through its slash command.
  2. Edited and saved its SKILL.md in VS Code.
  3. Invoked the same slash command again in the same OpenCode process.
  4. Confirmed the second invocation used the updated Skill content without restarting.

Screenshots / recordings

Not applicable; this changes command content loading and has no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

Slash skill commands do not reload edited SKILL.md content

1 participant