Skip to content

.NET: Remove resource/script placeholder requirement from custom skill templates#6706

Open
SergeyMenshykh wants to merge 1 commit into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-drop-placeholder-requirement
Open

.NET: Remove resource/script placeholder requirement from custom skill templates#6706
SergeyMenshykh wants to merge 1 commit into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-drop-placeholder-requirement

Conversation

@SergeyMenshykh

@SergeyMenshykh SergeyMenshykh commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Remove the {resource_instructions} and {script_instructions} placeholder mechanism from AgentSkillsProvider. 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

Copilot AI review requested due to automatic review settings June 24, 2026 11:54
@moonbox3 moonbox3 added the .NET Usage: [Issues, PRs], Target: .Net label Jun 24, 2026
@SergeyMenshykh SergeyMenshykh self-assigned this Jun 24, 2026
@SergeyMenshykh SergeyMenshykh moved this to In Review in Agent Framework Jun 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Code Review

Reviewers: 5 | Confidence: 92% | Result: All clear

Reviewed: Correctness, Security Reliability, Test Coverage, Failure Modes, Design Approach


Automated review by SergeyMenshykh's agents

…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>
@SergeyMenshykh SergeyMenshykh force-pushed the sergeymenshykh-drop-placeholder-requirement branch from 3e71204 to da8dfeb Compare June 24, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

.NET: Remove resource/script placeholder requirement from custom skill templates

5 participants