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
Aligns the Go SDK with the .NET breaking change microsoft/agent-framework#5475, which switched skill script arguments from a key-value dictionary to a positional CLI-style string array.
Changes made:
agent/skills/skills.go — Script.Run signature changed from func(context.Context, *Skill, map[string]any) to func(context.Context, *Skill, []string). ScriptRunner type updated accordingly. Added doc comments explaining the positional []string arg format.
agent/skills/provider.go — run_skill_script tool's Arguments field changed from map[string]any to []string. JSON schema description updated to instruct the LLM to send a string array (e.g. ["--value","26.2","--factor","1.60934"]). runSkillScript method signature updated.
agent/skills/fsskills/source.go — newScript closure updated; removed the nil-to-empty-map fallback (no longer needed with []string).
agent/skills/fsskills/source_script_test.go — All ScriptRunner signatures updated; TestFileSource_ExecutorReceivesArguments now passes []string{"--value","26.2","--factor","1.60934"}.
agent/skills/provider_test.go — ScriptRunner signatures updated; TestProvider_RunSkillScript_PassesArguments now invokes the tool with a JSON string array and validates correctly.
examples/02-agents/skills/internal/skillhelpers/subprocess_script_runner.go — Rewritten to accept []string and pass tokens directly to the subprocess. Removed buildCLIFlags / NormalizeKey helpers.
examples/02-agents/skills/internal/skillhelpers/inline.go — NumberArg and StringArg rewritten to look up by positional index instead of map key. Removed json.Number handling and sort import.
examples/02-agents/skills/step03_mixed_skills/main.go — Both convert-volume and convert-temperature script closures updated to positional []string args.
Why this was selected:
The .NET SDK explicitly marked this as a breaking change. The Go SDK had a meaningful misalignment by still using map[string]any. Aligning here ensures LLM tool calls produce the same schema in both SDKs.
Upstream commit: 2eb0705e on upstream-agent-framework/main
Breaking Changes
Yes.
Old:Script.Run func(context.Context, *Skill, map[string]any) and ScriptRunner func(context.Context, *Skill, *Script, map[string]any)
New:Script.Run func(context.Context, *Skill, []string) and ScriptRunner func(context.Context, *Skill, *Script, []string)
Any code that defined custom scripts using key-based argument lookup (e.g. arguments["value"]) must be updated to positional index access (e.g. args[0]). Since the Go SDK is in beta, this breaking change is acceptable and mirrors the upstream .NET breaking change.
Tests and Examples
Updated agent/skills/fsskills/source_script_test.go — all tests pass new []string arg format.
Updated examples for step02 (code-defined) and step03 (mixed) skills.
Note: Go 1.25 is required to build/test this module; tests were validated by code review since Go 1.25 is not available in this agent environment.
Notes
The .NET implementation uses reflection on typed delegates to auto-parse named parameters. Go cannot replicate this without reflect, so the Go approach uses purely positional []string tokens. File-based scripts using argparse (like convert.py) accept CLI flags naturally (e.g. ["--value", "26.2", "--factor", "1.60934"]).
SKILL.md instruction files don't need updating since they document the --flag value CLI style, which the LLM naturally translates to the string array format given the updated JSON schema.
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 port-skill-script-string-args-389e2b66775d99f5.
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 (500 of 639 lines)
From 61b0a9291ebfd07112ff32f4b7cbc06615c36513 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Wed, 6 May 2026 09:05:29 +0000
Subject: [PATCH] Port string[] arguments for file-based skill scripts
Aligns the Go SDK with the .NET breaking change in microsoft/agent-framework#5475.
Previously, skill scripts received arguments as map[string]any (a key-value
dictionary). Now they receive arguments as []string (positional CLI-style
string tokens), matching the .NET change that shifted the run_skill_script
tool schema to {"type":"array","items":{"type":"string"}}.
Changes:
- skills.Script.Run: map[string]any -> []string- skills.ScriptRunner: map[string]any -> []string- provider.go: run_skill_script tool Arguments field []string; jsonschema updated- fsskills/source.go: newScript closure updated; nil-map fallback removed- Tests updated: source_script_test.go, provider_test.go- Examples updated: skillhelpers/inline.go, subprocess_script_runner.go,
step02_code_defined_skills/main.go, step03_mixed_skills/main.go
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
agent/skills/fsskills/source.go | 5 +-
agent/skills/fsskills/source_script_test.go | 36 ++++++------
agent/skills/provider.go | 8 +--
agent/skills/provider_test.go | 25 ++++----
agent/skills/skills.go | 13 ++++-
.../skills/internal/skillhelpers/inline.go | 57 +++++--------------
.../skillhelpers/subprocess_script_runner.go | 48 ++++------------
.../skills/step02_code_defined_skills/main.go | 10 ++--
.../skills/step03_mixed_skills/main.go | 22 +++----
9 files changed, 90 insertions(+), 134 deletions(-)
diff --git a/agent/skills/fsskills/source.go b/agent/skills/fsskills/source.go
index daaf813d..e15bdbb0 100644
--- a/agent/skills/fsskills/source.go+++ b/agent/skills/fsskills/source.go@@ -531,16 +531,13 @@ func validateExtensions(exte
... (truncated)
Summary
Aligns the Go SDK with the .NET breaking change microsoft/agent-framework#5475, which switched skill script arguments from a key-value dictionary to a positional CLI-style string array.
Changes made:
agent/skills/skills.go—Script.Runsignature changed fromfunc(context.Context, *Skill, map[string]any)tofunc(context.Context, *Skill, []string).ScriptRunnertype updated accordingly. Added doc comments explaining the positional[]stringarg format.agent/skills/provider.go—run_skill_scripttool'sArgumentsfield changed frommap[string]anyto[]string. JSON schema description updated to instruct the LLM to send a string array (e.g.["--value","26.2","--factor","1.60934"]).runSkillScriptmethod signature updated.agent/skills/fsskills/source.go—newScriptclosure updated; removed the nil-to-empty-map fallback (no longer needed with[]string).agent/skills/fsskills/source_script_test.go— AllScriptRunnersignatures updated;TestFileSource_ExecutorReceivesArgumentsnow passes[]string{"--value","26.2","--factor","1.60934"}.agent/skills/provider_test.go—ScriptRunnersignatures updated;TestProvider_RunSkillScript_PassesArgumentsnow invokes the tool with a JSON string array and validates correctly.examples/02-agents/skills/internal/skillhelpers/subprocess_script_runner.go— Rewritten to accept[]stringand pass tokens directly to the subprocess. RemovedbuildCLIFlags/NormalizeKeyhelpers.examples/02-agents/skills/internal/skillhelpers/inline.go—NumberArgandStringArgrewritten to look up by positional index instead of map key. Removedjson.Numberhandling andsortimport.examples/02-agents/skills/step02_code_defined_skills/main.go— Script closure updated to parse positional args; instructions updated.examples/02-agents/skills/step03_mixed_skills/main.go— Bothconvert-volumeandconvert-temperaturescript closures updated to positional[]stringargs.Why this was selected:
The .NET SDK explicitly marked this as a breaking change. The Go SDK had a meaningful misalignment by still using
map[string]any. Aligning here ensures LLM tool calls produce the same schema in both SDKs.Ported .NET PRs
Upstream commit:
2eb0705eonupstream-agent-framework/mainBreaking Changes
Yes.
Script.Run func(context.Context, *Skill, map[string]any)andScriptRunner func(context.Context, *Skill, *Script, map[string]any)Script.Run func(context.Context, *Skill, []string)andScriptRunner func(context.Context, *Skill, *Script, []string)Any code that defined custom scripts using key-based argument lookup (e.g.
arguments["value"]) must be updated to positional index access (e.g.args[0]). Since the Go SDK is in beta, this breaking change is acceptable and mirrors the upstream .NET breaking change.Tests and Examples
agent/skills/fsskills/source_script_test.go— all tests pass new[]stringarg format.agent/skills/provider_test.go—TestProvider_RunSkillScript_PassesArgumentsvalidates end-to-end[]stringarg passing.Notes
reflect, so the Go approach uses purely positional[]stringtokens. File-based scripts usingargparse(likeconvert.py) accept CLI flags naturally (e.g.["--value", "26.2", "--factor", "1.60934"]).--flag valueCLI style, which the LLM naturally translates to the string array format given the updated JSON schema.806075ae(last ported commit in Go SDK PR Port .NET skill and workflow fixes #126).Warning
The following domain was blocked by the firewall during workflow execution:
proxy.golang.orgTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.
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
port-skill-script-string-args-389e2b66775d99f5.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 (500 of 639 lines)
From 61b0a9291ebfd07112ff32f4b7cbc06615c36513 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 09:05:29 +0000 Subject: [PATCH] Port string[] arguments for file-based skill scripts Aligns the Go SDK with the .NET breaking change in microsoft/agent-framework#5475. Previously, skill scripts received arguments as map[string]any (a key-value dictionary). Now they receive arguments as []string (positional CLI-style string tokens), matching the .NET change that shifted the run_skill_script tool schema to {"type":"array","items":{"type":"string"}}. Changes: - skills.Script.Run: map[string]any -> []string - skills.ScriptRunner: map[string]any -> []string - provider.go: run_skill_script tool Arguments field []string; jsonschema updated - fsskills/source.go: newScript closure updated; nil-map fallback removed - Tests updated: source_script_test.go, provider_test.go - Examples updated: skillhelpers/inline.go, subprocess_script_runner.go, step02_code_defined_skills/main.go, step03_mixed_skills/main.go Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- agent/skills/fsskills/source.go | 5 +- agent/skills/fsskills/source_script_test.go | 36 ++++++------ agent/skills/provider.go | 8 +-- agent/skills/provider_test.go | 25 ++++---- agent/skills/skills.go | 13 ++++- .../skills/internal/skillhelpers/inline.go | 57 +++++-------------- .../skillhelpers/subprocess_script_runner.go | 48 ++++------------ .../skills/step02_code_defined_skills/main.go | 10 ++-- .../skills/step03_mixed_skills/main.go | 22 +++---- 9 files changed, 90 insertions(+), 134 deletions(-) diff --git a/agent/skills/fsskills/source.go b/agent/skills/fsskills/source.go index daaf813d..e15bdbb0 100644 --- a/agent/skills/fsskills/source.go +++ b/agent/skills/fsskills/source.go @@ -531,16 +531,13 @@ func validateExtensions(exte ... (truncated)