Uh oh!
There was an error while loading. Please reload this page.
.NET: Discover skill resources from directory instead of markdown links - #4401
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the .NET skill-loading pipeline to discover skill resources by scanning the skill directory (by allowed extensions) instead of parsing markdown links from SKILL.md, and adapts configuration and tests accordingly.
Changes:
- Replace markdown-link-based resource extraction with recursive directory scanning filtered by an allowed extension list.
- Add an options surface (
AllowedResourceExtensions) and wire it throughFileAgentSkillsProviderintoFileAgentSkillLoader. - Update and expand unit tests to validate discovery, extension filtering, and symlink behavior under the new approach.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI/Skills/FileAgentSkillLoader.cs | Implements directory-scan-based resource discovery, extension validation, and log sanitization. |
| dotnet/src/Microsoft.Agents.AI/Skills/FileAgentSkillsProvider.cs | Passes configured allowed resource extensions into the loader. |
| dotnet/src/Microsoft.Agents.AI/Skills/FileAgentSkillsProviderOptions.cs | Exposes AllowedResourceExtensions to configure discovery behavior. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/FileAgentSkillLoaderTests.cs | Updates tests to validate file-based discovery and new edge cases. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…rgeyMenshykh/agent-framework into discover-resources-from-paths
Uh oh!
There was an error while loading. Please reload this page.
Summary
Switches
FileAgentSkillLoaderfrom parsing markdown links ([text](path)) to discover resources to scanning the skill directory for files with matching extensions. This is more robust and aligns with the convention that all files in a skill folder are part of that skill.Changes
.md,.json,.yaml,.yml,.csv,.xml,.txtby default)FileAgentSkillLoaderaccepts an optionalallowedResourceExtensionsparameter;FileAgentSkillsProviderOptionsexposes a corresponding propertySanitizePathForLogto prevent log injection via crafted filenames containing control characters