You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ported the .NET skill content behavior from microsoft/agent-framework#6672 so file-based Go skills append authoritative <available_resources> and <available_scripts> blocks to loaded skill content. Empty resource/script lists now emit explicit self-closing blocks, and scripts with schemas are represented with nested <parameters_schema> entries instead of the older <script_schemas> shape.
Added/updated file-skill content tests for populated and empty resource/script blocks.
Updated provider load-skill expectations for the explicit empty blocks.
Ran go test ./agent/skills/....
Ran go test ./....
Notes
Skipped microsoft/agent-framework#6759, which adds description attributes to resource/script entries, as a separate follow-up after this basic block-shape parity change. No public Go API changes were made.
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch dotnet-port-skill-available-blocks-50cec47c9536893b.
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (241 of 241 lines)
From 25ab5cbd21a27a540aed9fcbc946739ee9e66bc3 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Sat, 27 Jun 2026 03:45:14 +0000
Subject: [PATCH] Align skill asset blocks with .NET
Port the .NET skill content behavior that emits explicit available resources and scripts blocks for file-based skills.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
agent/skills/fsskills/source.go | 36 ++++++++++------
agent/skills/fsskills/source_script_test.go | 34 ++++++++-------
agent/skills/fsskills/source_test.go | 46 +++++++++++++++++++++
agent/skills/skills.go | 6 +--
agent/skills/skills_test.go | 2 +-
5 files changed, 93 insertions(+), 31 deletions(-)
diff --git a/agent/skills/fsskills/source.go b/agent/skills/fsskills/source.go
index 29f013764..4e0700c64 100644
--- a/agent/skills/fsskills/source.go+++ b/agent/skills/fsskills/source.go@@ -242,9 +242,8 @@ func (s *Source) parseSkillDirectory(skillFS fs.FS, logPath string) *skills.Skil
return
}
raw := string(data)
- if schemasBlock := buildScriptSchemasBlock(scripts); schemasBlock != "" {- raw += schemasBlock- }+ raw += "\n" + buildAvailableResourcesBlock(resources)+ raw += "\n" + buildAvailableScriptsBlock(scripts)
cachedContent = raw
})
return cachedContent, contentErr
@@ -562,24 +561,35 @@ type discoveredSkillDir struct {
path string
}
-// buildScriptSchemasBlock returns a <script_schemas> XML block listing each-// script with its parameter schema. Scripts with no schema emit a self-closing-// element; scripts with a schema emit the JSON inline.-// Returns an empty string when scripts is empty.-func buildScriptSchemasBlock(scripts []skills.Script) string {+func buildAvailableResourcesBlock(resources []skills.Resource) string {+ if len(resources) == 0 {+ return "\n<available_resources />"+ }+ var sb strings.Builder+ s
... (truncated)
Summary
Ported the .NET skill content behavior from microsoft/agent-framework#6672 so file-based Go skills append authoritative
<available_resources>and<available_scripts>blocks to loaded skill content. Empty resource/script lists now emit explicit self-closing blocks, and scripts with schemas are represented with nested<parameters_schema>entries instead of the older<script_schemas>shape.Upstream commit: e4b89373f1cdc2fe6a047fd74d48bf9ab74b951b (microsoft/agent-framework@e4b8937).
Ported .NET PRs
Breaking Changes
No.
Tests and Examples
go test ./agent/skills/....go test ./....Notes
Skipped microsoft/agent-framework#6759, which adds description attributes to resource/script entries, as a separate follow-up after this basic block-shape parity change. No public Go API changes were made.
Note
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch
dotnet-port-skill-available-blocks-50cec47c9536893b.Click here to create the pull request
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (241 of 241 lines)