fix: prevent reading SKILL.md files when listing available skills #10419
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.
Related GitHub Issue
Closes: #10393
Description
This PR attempts to address Issue #10393 where asking "list all skills" causes the model to read each SKILL.md file unnecessarily.
Root Cause:
The skills system prompt tells the model to read SKILL.md files when a skill applies, but it does not clearly distinguish between "using a skill" (which requires reading the full instructions) and "listing/describing skills" (which only needs the metadata already in the prompt).
Changes:
<if_user_asks_to_list_skills>section to the skills system prompt insrc/core/prompts/sections/skills.ts<available_skills>(name, description, location) when users ask to list, show, display, or enumerate available skillsFeedback and guidance are welcome.
Test Procedure
<if_user_asks_to_list_skills>section is present in the generated promptPre-Submission Checklist
Documentation Updates
Additional Notes
This is a prompt engineering fix that adds explicit instructions to prevent the model from unnecessarily reading SKILL.md files when users only want to know what skills are available.