feat(opencode): inject skill list via system-reminder, add skill usage guidance to system prompt#15343
Open
junmediatek wants to merge 1 commit intoanomalyco:devfrom
Open
feat(opencode): inject skill list via system-reminder, add skill usage guidance to system prompt#15343junmediatek wants to merge 1 commit intoanomalyco:devfrom
junmediatek wants to merge 1 commit intoanomalyco:devfrom
Conversation
…e guidance to system prompt - Inject available skills as <system-reminder> in first user message (before all other messages), so models can easily discover skills from conversation context - Add SystemPrompt.skills() with slash command usage guidance, applied to all providers via system prompt - Simplify SkillTool description to focus on usage rules and slash command behavior; remove <available_skills> XML from tool description (now in system-reminder) - Update skill test to match new description format
751d8ad to
1af0b7c
Compare
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Contributor
Author
|
hi @adamdotdevin |
Contributor
Author
|
Hi @jayair 👋 Could you please help review this PR when you have a moment? The changes are ready for review. Thanks in advance! 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #
Type of change
What does this PR do?
The skill tool currently lists available skills only inside its tool description. Models don't always read tool descriptions proactively, so skills are often overlooked — especially when the user types a slash command like
/skill-name.This PR injects the available skills list into a
<system-reminder>block prepended to the first user message, so the model sees it as part of the conversation context rather than just the tool spec. It also adds a short skill usage hint to the system prompt (slash command syntax, priority invocation rule) that applies to all providers without touching any provider-specific template files.The SkillTool description is simplified accordingly — it now points the model to the system-reminder for the skills list and focuses on behavioral rules.
How did you verify your code works?
cd packages/opencode && bun test test/tool/skill.test.ts— 2 pass, 0 failbun typecheck— no type errorsScreenshots / recordings
No UI changes.
Checklist
If you do not follow this template your PR will be automatically rejected.