fix: propagate tags from skill frontmatter to SkillResource#3404
Open
clawtom wants to merge 1 commit intoPrefectHQ:mainfrom
Open
fix: propagate tags from skill frontmatter to SkillResource#3404clawtom wants to merge 1 commit intoPrefectHQ:mainfrom
clawtom wants to merge 1 commit intoPrefectHQ:mainfrom
Conversation
Fixes PrefectHQ#3402: SkillsProvider was constructing SkillResource without populating the `tags` field, even when tags were present in the skill's YAML frontmatter. This prevented tag-based filtering from working for skills resources. Apply the fix in both list_resources() and get_resource() paths.
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.
Summary
Fixes #3402.
SkillsProvider(andSkillProvider) were constructingSkillResourceobjects without populating thetagsfield, even whentagswere declared in the skill's YAML frontmatter. This prevented tag-based filtering from working for skill resources.Root cause
In
skill_provider.py, both thelist_resources()andget_resource()paths constructedSkillResourcewith an empty/defaulttagsset:The
tagsdata is available inskill.frontmatter(parsed from YAML frontmatter), but was never forwarded toSkillResource.Fix
Pass
tags=set(skill.frontmatter.get("tags", []))in both construction sites (list and get paths). The manifest resources are intentionally left without tags, as they represent directory listings rather than the skill content itself.Testing
To reproduce before fix:
After fix,
resources[0].tags == {"python", "testing"}.