Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

Motivation and Context

Adds a sample demonstrating Anthropic Claude Skills support in .NET, matching the Python sample functionality as requested in Issue #2690. Follows Stephen Toub's recommended simplified approach using AsAITool().

Description

Sample Agent_Anthropic_Step04_UsingSkills demonstrates:

  • Listing available Anthropic-managed skills
  • Using BetaSkillParams.AsAITool() to add skills (SDK auto-handles beta flags)
  • Extended thinking configuration
  • Downloading generated files via Files API
BetaSkillParams pptxSkill = new()
{
    Type = BetaSkillParamsType.Anthropic,
    SkillID = "pptx",
    Version = "latest"
};

ChatClientAgent agent = anthropicClient.Beta.AsAIAgent(
    model: model,
    instructions: "You are a helpful agent for creating PowerPoint presentations.",
    tools: [pptxSkill.AsAITool()]);

Key: AsAITool() auto-handles beta headers and container config - no manual RawRepresentationFactory needed!

Changes:

  • Program.cs - Simplified with skills listing and file download
  • README.md - Updated documentation
  • AnthropicSkillsIntegrationTests.cs - Simplified tests

Contribution Checklist

- Add Agent_Anthropic_Step04_UsingSkills sample demonstrating pptx skill usage
- Add integration tests for skills functionality
- Update README.md with new sample reference
- Update solution file to include new sample project

Co-authored-by: rogerbarreto <[email protected]>
Copilot AI changed the title [WIP] Add Claude Skills support example for Anthropic Add .NET Anthropic Claude Skills sample Jan 29, 2026
Copilot AI requested a review from rogerbarreto January 29, 2026 10:29
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation .NET labels Jan 29, 2026
@github-actions github-actions bot changed the title Add .NET Anthropic Claude Skills sample .NET: Add .NET Anthropic Claude Skills sample Jan 29, 2026
@rogerbarreto rogerbarreto marked this pull request as ready for review January 29, 2026 14:07
Copilot AI review requested due to automatic review settings January 29, 2026 14:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new .NET sample demonstrating Anthropic Claude Skills support, matching Python sample functionality as requested in Issue #2690. The implementation uses a simplified AsAITool() approach that automatically handles beta flags and container configuration.

Changes:

  • Added a new sample Agent_Anthropic_Step04_UsingSkills demonstrating Skills usage (pptx skill)
  • Added integration tests for Skills functionality in AnthropicSkillsIntegrationTests.cs
  • Updated parent README to reference the new sample

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
AnthropicSkillsIntegrationTests.cs Integration tests for Anthropic Skills functionality with two test cases
Agent_Anthropic_Step04_UsingSkills/README.md Documentation for the Skills sample with code examples and prerequisites
Agent_Anthropic_Step04_UsingSkills/Program.cs Sample code demonstrating Skills listing, agent creation, and file download
Agent_Anthropic_Step04_UsingSkills.csproj Project configuration file matching existing sample patterns
agent-framework-dotnet.slnx Solution file updated to include the new sample project
AgentWithAnthropic/README.md Updated table of samples to reference the new Skills sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: Claude Skills support

3 participants