From d116a4c0cab4fb52d2736a79e2517c90780b313c Mon Sep 17 00:00:00 2001 From: Sam Morrow Date: Wed, 13 May 2026 10:46:15 +0200 Subject: [PATCH] feat: update skill frontmatter to MCP skills-as-groups spec format Replace allowed-tools YAML array with metadata.io.modelcontextprotocol/tools space-separated string in skill resource frontmatter, aligning with the proposed MCP skills-as-groups specification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pkg/github/skill_resources.go | 6 ++---- pkg/github/skill_resources_test.go | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/github/skill_resources.go b/pkg/github/skill_resources.go index bc32d24e1..d2f3ee545 100644 --- a/pkg/github/skill_resources.go +++ b/pkg/github/skill_resources.go @@ -496,10 +496,8 @@ func buildSkillContent(skill skillDefinition) string { b.WriteString("---\n") fmt.Fprintf(&b, "name: %s\n", skill.name) fmt.Fprintf(&b, "description: %s\n", skill.description) - b.WriteString("allowed-tools:\n") - for _, tool := range skill.allowedTools { - fmt.Fprintf(&b, " - %s\n", tool) - } + b.WriteString("metadata:\n") + fmt.Fprintf(&b, " io.modelcontextprotocol/tools: \"%s\"\n", strings.Join(skill.allowedTools, " ")) b.WriteString("---\n\n") b.WriteString(skill.body) return b.String() diff --git a/pkg/github/skill_resources_test.go b/pkg/github/skill_resources_test.go index 70871459d..3af24d47b 100644 --- a/pkg/github/skill_resources_test.go +++ b/pkg/github/skill_resources_test.go @@ -42,8 +42,8 @@ func TestBuildSkillContent(t *testing.T) { assert.Contains(t, content, "---\n") assert.Contains(t, content, "name: test-skill\n") assert.Contains(t, content, "description: A test skill\n") - assert.Contains(t, content, " - tool_a\n") - assert.Contains(t, content, " - tool_b\n") + assert.Contains(t, content, "metadata:\n") + assert.Contains(t, content, " io.modelcontextprotocol/tools: \"tool_a tool_b\"\n") assert.Contains(t, content, "# Test\n") }