fix(skill): invoke full skill system for /skill-name commands#29349
Open
LifeJiggy wants to merge 1 commit into
Open
fix(skill): invoke full skill system for /skill-name commands#29349LifeJiggy wants to merge 1 commit into
LifeJiggy wants to merge 1 commit into
Conversation
When /skill-name is used, only the raw SKILL.md text was provided as the command template. Referenced files in the skill directory were never loaded, making relative references unresolvable. Fix by routing skill commands through the same file-loading and <skill_content> wrapping logic that the skill tool uses: - Load referenced files from skill directory via rg.files() - Wrap output in <skill_content> with name, content, base directory, files - Use EffectBridge to bridge the async Effect into the template promise
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 #24831
Type of change
What does this PR do?
When /skill-name is used, only the raw SKILL.md text was provided as the command template. Referenced files in the skill directory were never loaded, making relative references unresolvable.
Fix by routing skill commands through the same file-loading and <skill_content> wrapping logic that the skill tool uses:
I traced the difference between the /skill-name command path and the "use the skill" natural language path in the codebase.
The skill tool (tool/skill.ts) loads files from the skill directory and wraps content in <skill_content> with the base directory URL.
The command path (command/index.ts) was just returning item.content directly. The fix replicates what the tool path does so both invocation methods work the same way.
How did you verify your code works?
7 new tests for the hints() helper function pass. Typecheck clean on the package.
Checklist