Uh oh!
There was an error while loading. Please reload this page.
fix(opencode): include skill files when invoking via slash command - #37044
fix(opencode): include skill files when invoking via slash command#37044SakshamKapoor2911 wants to merge 1 commit into
Conversation
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
The following comment was made by an LLM, it may be inaccurate: Duplicate PR FoundPR #35522: fix(opencode): include skill files when invoking via slash command This appears to be a duplicate of the current PR #37044. Both PRs have the identical title and address the same issue—including skill files when invoking via slash commands. PR #35522 likely covers the same bug fix regarding the |
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Closes#24831
Type of change
What does this PR do?
/skill-nameslash commands only injected the skill markdown body as prompt text, without the<skill_files>section that theskilltool provides. This meant referenced files (scripts, reference docs) in the skill directory were not discoverable by the model when using the slash command shortcut.This fix scans the skill directory for files (excluding SKILL.md, up to 10) and appends a
<skill_files>section to the command template, matching the format used by theskilltool (tool/skill.ts). Built-in skills with<built-in>location are unchanged.Note: PR #35522 addresses the same issue. This implementation uses
Glob.scanSyncfor a synchronous approach that doesn't require the template getter to return a Promise, and uses**/*to include files in subdirectories.How did you verify your code works?
packages/opencodepasses with no new errors<skill_files>layout fromtool/skill.tsGlob.scanSyncso works inside the template getterScreenshots / recordings
No UI change.
Checklist