.NET: Remove resource/script placeholder requirement from custom skill templates#6706
Open
SergeyMenshykh wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the {resource_instructions} / {script_instructions} placeholder-substitution mechanism from the .NET AgentSkillsProvider custom prompt templates, and embeds the corresponding guidance directly into the default template so custom templates only need {skills}.
Changes:
- Simplified prompt-template validation to require only
{skills}. - Inlined resource/script guidance into the default skills instruction prompt and removed placeholder replacements.
- Updated unit tests and builder/options XML docs to reflect the new custom-template contract.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI/Skills/AgentSkillsProvider.cs | Removes resource/script placeholder constants and replacement logic; embeds guidance directly in the default prompt; simplifies template validation. |
| dotnet/src/Microsoft.Agents.AI/Skills/AgentSkillsProviderOptions.cs | Updates XML docs to state that only {skills} is required in custom templates. |
| dotnet/src/Microsoft.Agents.AI/Skills/AgentSkillsProviderBuilder.cs | Updates XML docs for UsePromptTemplate to reflect the {skills}-only requirement. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/AgentSkillsProviderTests.cs | Updates tests to align with {skills}-only validation and removes placeholder-related exception tests. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/AgentSkillsProviderBuilderTests.cs | Updates fluent-builder test to use a {skills}-only prompt template. |
…mechanism
Embed resource and script instruction text directly in the default
prompt template instead of using placeholder substitution. Custom
templates now only need the {skills} placeholder.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3e71204 to
da8dfeb
Compare
peibekwe
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove the
{resource_instructions}and{script_instructions}placeholder mechanism fromAgentSkillsProvider. The instruction text is now embedded directly in the default template.Custom templates only need
{skills}— matching Python where these values are hardcoded constants, not configurable via options.Breaking (Experimental API): Custom templates that previously used
{resource_instructions}/{script_instructions}will now render those tokens literally. Users should inline their own resource/script guidance text directly.Closes: #6707