Skip to content

fix(opencode): load full skill context for slash skills#29429

Open
syahmiharith wants to merge 8 commits into
anomalyco:devfrom
syahmiharith:fix/slash-skill-full-skill-system
Open

fix(opencode): load full skill context for slash skills#29429
syahmiharith wants to merge 8 commits into
anomalyco:devfrom
syahmiharith:fix/slash-skill-full-skill-system

Conversation

@syahmiharith
Copy link
Copy Markdown

Issue for this PR

Closes #24831

Type of change

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

What does this PR do?

Skill slash commands were using command template handling, which only passed the base SKILL.md content.

This routes skill-sourced slash commands through the existing skill tool behavior so referenced files and base directory context are included.

How did you verify your code works?

  • bun typecheck
  • bun test test/tool/skill.test.ts test/session/prompt.test.ts -t "skill slash command|tool.skill"

Screenshots / recordings

N/A, no UI change.

Checklist

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

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found a potential duplicate:

PR #29349: fix(skill): invoke full skill system for /skill-name commands
#29349

This PR appears to address the same issue as the current PR (#29429). Both PRs are about fixing slash skill commands to use the full skill system instead of just template handling, which would ensure referenced files and base directory context are included. Given that issue #24831 is referenced and these PRs have nearly identical purposes, PR #29349 may already be addressing this fix.

@syahmiharith
Copy link
Copy Markdown
Author

I compared #29349. This PR is intentionally different: #29349 builds the skill output inside the command template path, while this PR keeps skill command templates empty and invokes the existing skill tool behavior from the session prompt path, sharing the renderer with \ ool/skill.ts. That matches the guidance in #25439 to avoid reusing command logic for skill invocations.

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.

/skill-name doesn’t invoke full skill system

1 participant