Skip to content

[dotnet-port-fixes] Align skill content availability blocks #380

Description

@github-actions

Summary

Ported the .NET AgentFileSkill content alignment from microsoft/agent-framework#6672. File-backed Go skills now append authoritative <available_resources> and <available_scripts> blocks to loaded skill content, including self-closing empty blocks when a skill has no resources or scripts. Script parameter schemas are now nested under <parameters_schema> inside each available script entry.

Ported .NET PRs

Breaking Changes

No.

Tests and Examples

  • Added and updated file-backed skill content tests for resource/script availability blocks, empty availability blocks, script parameter schemas, and load_skill output.
  • Ran go test ./agent/skills/....
  • Ran go test ./....

Notes

Skipped broader upstream follow-ups such as resource/script description attributes from microsoft/agent-framework#6759, which are better handled separately. Programmatic Go skills use caller-supplied content rather than a shared inline content builder, so this PR focuses on the file-backed source parity with .NET AgentFileSkill.

Generated by .NET to Go Fixes and Test Porting Agent · 1.4K AIC · ⌖ 19.6 AIC · ⊞ 21.6K · ◷


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-fixes-skill-content-26d62e8fa34a83a2.

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 (248 of 248 lines)
From 538251692a361690bad7ba42d50cf48032050ba8 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Sun, 28 Jun 2026 03:46:28 +0000
Subject: [PATCH] Align skill content availability blocks

Port the .NET AgentFileSkill behavior from microsoft/agent-framework#6672 so file-backed skill content always advertises available resources and scripts, including empty self-closing blocks when none are present.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
 agent/skills/fsskills/source.go             | 38 +++++++++++++--------
 agent/skills/fsskills/source_script_test.go | 37 ++++++++++++--------
 agent/skills/fsskills/source_test.go        | 30 ++++++++++++++++
 agent/skills/skills.go                      |  7 ++--
 agent/skills/skills_test.go                 |  4 +--
 5 files changed, 83 insertions(+), 33 deletions(-)

diff --git a/agent/skills/fsskills/source.go b/agent/skills/fsskills/source.go
index 29f013764..bd52a967e 100644
--- a/agent/skills/fsskills/source.go
+++ b/agent/skills/fsskills/source.go
@@ -241,10 +241,9 @@ func (s *Source) parseSkillDirectory(skillFS fs.FS, logPath string) *skills.Skil
 					contentErr = err
 					return
 				}
-				raw := string(data)
-				if schemasBlock := buildScriptSchemasBlock(scripts); schemasBlock != "" {
-					raw += schemasBlock
-				}
+				raw := string(data) +
+					"\n" + buildAvailableResourcesBlock(resources) +
+					"\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 buildAvailableRes
... (truncated)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions