Claude Agent SDK Dotnet — Development skill for Claude Code
A modern .NET library for interacting with the Claude Code CLI, with full Python SDK parity.
How to install Claude Agent SDK Dotnet
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open 0xeb/claude-agent-sdk-dotnet and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Agent SDK Dotnet does
A modern .NET library for interacting with the Claude Code CLI, with full Python SDK parity.
Alternatives in Development
- MCP Python SDK — Python SDK for building MCP servers 22.3k ★
- Claude Code SDK Python — The official Python SDK for Claude Code 5.6k ★
- Gemini CLI Foundations — This repository is a comprehensive skills library for Gemini CLI - reusable, production-ready skill packages t 5.3k ★
README
Claude Agent SDK for .NET
A modern .NET library for interacting with the Claude Code CLI, providing both a simple one-shot `QueryAsync()` API and a full bidirectional client with control-protocol support.
[]() []() []()
**Disclaimer:** This is an independent, unofficial port and is not affiliated with or endorsed by Anthropic, PBC.
Features
- Simple
Claude.QueryAsync()API for one-shot requests ClaudeSDKClientfor multi-turn, bidirectional conversations- Control protocol support (interrupts, modes, dynamic model switching)
- Hook system (PreToolUse, PostToolUse, UserPromptSubmit)
- Tool permission callbacks with allow/deny control
- In-process MCP server support (tools, prompts, resources)
- Cross-platform: Windows, Linux, macOS
- Source-generated JSON models for message types
- Well-tested: 109 tests (90 unit + 19 integration; integration tests are disabled by default)
Prerequisites
- .NET 8.0 or .NET 9.0
- Claude Code CLI >= 2.0.0:
npm install -g @anthropic-ai/claude-code
CLI Path Resolution
The SDK discovers the Claude Code CLI in this order:
ClaudeAgentOptions.CliPath(explicit path)CLAUDE_CLI_PATHenvironment variablePATHsearch forclaude(orclaude.cmdon Windows)
Quick Start
One-Shot Query
using Claude.AgentSdk;
await foreach (var msg in Claude.QueryAsync("What is 2+2?"))
{
if (msg is AssistantMessage am)
foreach (var block in am.Content)
if (block is TextBlock tb)
Console.Write(tb.Text);
}
Multi-Turn Conversation
using Claude.AgentSdk;
await using var client = new ClaudeSDKClient();
await client.ConnectAsync();
await client.QueryAsync("Write a Python hello world");
await foreach (var msg in client.Re
Related Skills
Dotnet Artisan
Comprehensive .NET development skills for modern C# and .NET
Open Agent SDK Python
Open-source Agent SDK for Python. Runs the full agent loop in-process — no CLI required.
ClaudeAgentSDK
Swift SDK for Claude Code — feature parity with the official Python SDK
ClaudeCodeSharpSDK
CLI-first .NET / C# SDK for Claude Code CLI with typed thread API, streamed JSONL events, structured outputs
Dotnet Skills
.NET development skills for Claude Code
Dotnet Developer Roadmap2025
Essential skills .NET developers must know to be hire-able in 2025
Related Agents
Dotnet Cop
MUST delegate when user runs /cop-review or asks for pre-merge review of HEAD vs a target branch on a .NET pro
Dotnet Architect
Analyzes .NET project context, requirements, and constraints to recommend architecture approaches, framework c
Dotnet
Implements .NET 8+ backend code using Clean Architecture. Receives failing tests, makes them pass.