Skip to content

Python: Align file skill folder discovery with agentskills.io spec #5711

@SergeyMenshykh

Description

@SergeyMenshykh

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

Metadata

Metadata

Type

No type

Projects

Status

Planned

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions