Skip to content

[dotnet-port-fixes] Align skills prompt placeholders with .NET #372

Description

@github-actions

Summary

Ported the upstream .NET skills provider behavior that removed special {resource_instructions} and {script_instructions} placeholder handling. The Go skills provider now embeds resource/script guidance in the default prompt and only requires {skills} for custom templates; legacy placeholder tokens in custom templates remain literal instead of being substituted.

Ported .NET PRs

Upstream commit: microsoft/agent-framework@d0be98d.

Breaking Changes

No.

Tests and Examples

Ran go test ./agent/skills.

Updated skills provider tests to cover custom templates that omit the legacy placeholders and to verify legacy placeholder tokens remain literal.

Notes

Skipped broader recent upstream changes that were already aligned in Go or required larger/public API behavior. The worktree had an unrelated untracked .github/agents/port-candidate-selector.agent.md file, which was not committed.

Generated by .NET to Go Fixes and Test Porting Agent · 1.1K AIC · ⌖ 60.9 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-skills-prompt-placeholders-20260626034300-aaa847d41a63dd26.

Click here to create the pull request

To fix the permissions issue, go to SettingsActionsGeneral and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ

Show patch preview (147 of 147 lines)
From e92a87065a345c5c6b1084ac936ea9acb814d5a9 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Fri, 26 Jun 2026 03:43:00 +0000
Subject: [PATCH] Align skills prompt placeholders with .NET

Port upstream .NET behavior from microsoft/agent-framework#6706 so custom skills prompt templates only require the {skills} placeholder. Legacy resource and script instruction placeholders are no longer specially substituted; default guidance remains embedded in the default prompt.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
 agent/skills/provider.go      | 23 +++++++--------------
 agent/skills/provider_test.go | 39 +++++++++++++++++++++--------------
 agent/skills/skills_test.go   |  2 +-
 3 files changed, 31 insertions(+), 33 deletions(-)

diff --git a/agent/skills/provider.go b/agent/skills/provider.go
index 2ba0d4f21..d62d08453 100644
--- a/agent/skills/provider.go
+++ b/agent/skills/provider.go
@@ -20,9 +20,7 @@ import (
 )
 
 const (
-	skillsPlaceholder               = "{skills}"
-	resourceInstructionsPlaceholder = "{resource_instructions}"
-	scriptInstructionsPlaceholder   = "{script_instructions}"
+	skillsPlaceholder = "{skills}"
 )
 
 const defaultSkillsInstructionPrompt = `You have access to skills containing domain-specific knowledge and capabilities.
@@ -35,8 +33,9 @@ Each skill provides specialized instructions, reference documents, and assets fo
 When a task aligns with a skill's domain, follow these steps in exact order:
 - Use ` + "`load_skill`" + ` to retrieve the skill's instructions.
 - Follow the provided guidance.
-{resource_instructions}
-{script_instructions}
+- Use ` + "`read_skill_resource`" + ` to read any referenced resources, using the name exactly as listed
+   (e.g. ` + "`\"style-guide\"` not `\"style-guide.md\"`, `\"references/FAQ.md\"` not `\"FAQ.md\"`" + `).
+- Use ` + "`run_skill_script`" + ` to run referenced scripts, using the name exactly as listed.
 Only loa
... (truncated)

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