Skip to content

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
junmediatek:feat/skill-system-reminder
Open

feat(opencode): inject skill list via system-reminder, add skill usage guidance to system prompt#15343
junmediatek wants to merge 1 commit intoanomalyco:devfrom
junmediatek:feat/skill-system-reminder

Conversation

@junmediatek
Copy link
Contributor

@junmediatek junmediatek commented Feb 27, 2026

Issue for this PR

Closes #

Type of change

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

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 fail
  • bun typecheck — no type errors

Screenshots / recordings

No UI changes.

Checklist

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

If you do not follow this template your PR will be automatically rejected.

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. contributor labels Feb 27, 2026
…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
@junmediatek junmediatek force-pushed the feat/skill-system-reminder branch from 751d8ad to 1af0b7c Compare February 27, 2026 09:21
@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Feb 27, 2026
@github-actions
Copy link
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@junmediatek
Copy link
Contributor Author

hi @adamdotdevin
Cloud you help to review this PR?

@junmediatek
Copy link
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! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant