ClaudeAgentSdk.DotNet — Development skill for Claude Code
Typed, AOT-compatible C# SDK for the Claude Code CLI.
How to install ClaudeAgentSdk.DotNet
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Hazzajenko/ClaudeAgentSdk.DotNet and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What ClaudeAgentSdk.DotNet does
Typed, AOT-compatible C# SDK for the Claude Code CLI. It is a port of the official Python SDK. It supports streaming queries, structured output, custom MCP tools and permission hooks. Requires .NET 10 and the Claude CLI.
Alternatives in Development
- Claude-code-safety-net Rules Reference — Custom rules reference for defining safe/dangerous command patterns 1.2k ★
- Dario — A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline 485 ★
- Dotnet Artisan — Comprehensive .NET development skills for modern C# and .NET 228 ★
README
Claude Agent SDK for .NET
[](https://www.nuget.org/packages/ClaudeAgentSdk.DotNet) [](https://github.com/Hazzajenko/ClaudeAgentSdk.DotNet/actions) [](LICENSE)
Typed, AOT-compatible C# SDK for the [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) agent protocol. Port of the official [Python Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python).
Installation
dotnet add package ClaudeAgentSdk.DotNet
[!NOTE] Requires .NET 10+ and the [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code/getting-started) installed and available on your PATH.
Quick Start
using ClaudeAgentSdk;
using ClaudeAgentSdk.Messages;
await foreach (var message in Claude.QueryAsync("What is 2 + 2?"))
{
if (message is AssistantMessage { Text: var text })
Console.WriteLine($"Claude: {text}");
}
One-Shot API
`Claude.QueryAsync` streams messages from a single prompt. `Claude.QueryTextAsync` returns just the final text.
// Stream all messages
var options = new ClaudeClientOptions
{
SystemPrompt = "You are a helpful assistant that explains things simply.",
MaxTurns = 1,
};
await foreach (var message in Claude.QueryAsync("Explain what C# is in one sentence.", options))
{
if (message is AssistantMessage { Text: var text })
Console.WriteLine($"Claude: {text}");
}
// Get text only — no streaming
string reply = await Claude.QueryTextAsync("What is 2 + 2?");
Structured Output
`Claude.QueryAsync` auto-derives a JSON schema from your source-generated `JsonTypeInfo` and deserializes the result — one line, fully AOT-safe.
using System.Text.Jso
Related Skills
MCP Ops Server
Custom MCP server (official Python SDK) giving Claude safe, typed access to an orders/customers/tickets DB: re
Storeops Harness Dotnet
StoreOps API (.NET 8 / ASP.NET Core) governed by a working Claude Code harness — Planner, Generator, Evaluator
Claude Agent SDK Dotnet
A modern .NET library for interacting with the Claude Code CLI, with full Python SDK parity.
Create Drizzle Repository
Scaffold a new Drizzle-backed repository by defining a domain port, implementing it with typed Drizzle queries
Claude Code Headless
Programmatically drive the real Claude Code CLI in a PTY — structured semantic/screen/committed events, live t
ClaudeCodeSharpSDK
CLI-first .NET / C# SDK for Claude Code CLI with typed thread API, streamed JSONL events, structured outputs
Related Agents
Solver Net
Networking solver (NET): protocol analysis/exploitation, port scan, custom service over socket. Only invoked b
Vercel AI SDK Expert
Use for Vercel AI SDK v5 implementation work: chat interfaces, tool calling, streaming, agentic loop control,
Hono Builder
Hono API implementer — routes, middleware, validation, error handling, streaming/SSE, the typed RPC client (Ap