Port of .NET PR #5078.
Python's FileSkillsSource currently scans the entire skill directory recursively (rglob("*")) for both resources and scripts. The agentskills.io spec defines specific subdirectories for resources (references/, assets/) and scripts (scripts/).
.NET already aligns with the spec by:
- Discovering resources from
references/ and assets/ subdirectories
- Discovering scripts from the
scripts/ subdirectory
- Supporting
"." root indicator to include files at the skill root level
- Making directories configurable via
resource_directories and script_directories options
- Validating that frontmatter
name matches the skill directory name
Changes needed
- Update
FileSkillsSource._discover_resource_files() and _discover_script_files() to scan spec-defined subdirectories instead of recursive rglob
- Add
resource_directories and script_directories parameters to FileSkillsSource.__init__()
- Add frontmatter name vs directory name validation
- Update tests and samples
Port of .NET PR #5078.
Python's
FileSkillsSourcecurrently scans the entire skill directory recursively (rglob("*")) for both resources and scripts. The agentskills.io spec defines specific subdirectories for resources (references/,assets/) and scripts (scripts/)..NET already aligns with the spec by:
references/andassets/subdirectoriesscripts/subdirectory"."root indicator to include files at the skill root levelresource_directoriesandscript_directoriesoptionsnamematches the skill directory nameChanges needed
FileSkillsSource._discover_resource_files()and_discover_script_files()to scan spec-defined subdirectories instead of recursiverglobresource_directoriesandscript_directoriesparameters toFileSkillsSource.__init__()