Claude Agent Csharp — AI skill for Claude Code
Building a coding agent in C# with ToolRunner and Microsoft.Extensions.AI - companion sample for the blog post.
How to install Claude Agent Csharp
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open AdrianBailador/claude-agent-csharp and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Agent Csharp does
Building a coding agent in C# with ToolRunner and Microsoft.Extensions.AI - companion sample for the blog post.
Alternatives in AI
- Post Training — ai-research-skills GRPO, RLHF, DPO, SimPO 5.4k ★
- Browser Operator Core — Browser Operator - The AI browser with built in Multi-Agent platform 500 ★
- Academic Writing Skills — AI-powered post-writing toolkit for academic papers — format validation, grammar/style polishing, de-AI editin 430 ★
README
There's No Official Claude Agent SDK for C#. Here's What to Use Instead
Companion sample for the blog post [There's No Official Claude Agent SDK for C#. Here's What to Use Instead](https://adrianbailador.github.io/blog/71-claude-code-agent-csharp/).
Two runnable console apps, both building the same small coding agent — one that can read files, list a directory, write files, and run a shell command against a scoped workspace — using the two paths that actually exist in C# today.
| Project | Approach |
|---|---|
ToolRunnerAgent |
The official Anthropic SDK's client.Beta.Messages.ToolRunner — the agent loop as an IAsyncEnumerable, one turn at a time |
MeaiAgent |
The same loop through Microsoft.Extensions.AI's UseFunctionInvocation(), tools defined as plain C# methods |
Requirements
- .NET 10 SDK
- An Anthropic API key
export ANTHROPIC_API_KEY=sk-ant-...
Running it
dotnet run --project ToolRunnerAgent
dotnet run --project MeaiAgent
Both default to: *"Add a `.gitignore` for a .NET project to the workspace, then run `git status`"* (or *"...then show me its contents"* for the MEAI version, which doesn't wire up `run_command`). Pass your own task as arguments instead:
dotnet run --project ToolRunnerAgent -- List everything in the workspace, then read any file you find.
Each app creates a `workspace/` directory (or `$AGENT_WORKSPACE`, if set) next to the executable and scopes every file operation to it — the agent cannot read or write outside of it, `write_file` always asks for a `y/n` confirmation before it touches disk, and `run_command` (in `ToolRunnerAgent` only) checks the command's program name against an allowlist (`dotnet`, `git`, `ls`) before it even reaches the confirmation prompt.
What each project demonstrates
**`ToolRunnerAgent/Program.cs`**
BetaRunnableTool+BetaTool— defining a tool as hand-written JSON Schema plus aRundeleg
Related Skills
05 Blog Post Writer
Write a publishable post in the person's own voice, structured so an AI assistant can quote it, with every fac
QuotaHush
Local, private usage monitor for Claude Code, OpenAI Codex, DeepSeek, and Z.AI - browser + VS Code extensions
Pi Extensions
Nick Nisi's pi extensions — a pnpm monorepo of independently installable pi packages (@nicknisi/pi-). TUI poli
Loadout
The package manager for AI coding agent extensions. Discover, install, update, optimize, and roll back skills
Crossplug
crossplug — AI coding-agent plugin bridge: convert plugins between DSH / MiniMax Code (mcode) / pi, agent-plug
Dataverse Skills
Microsoft Dataverse skills for AI coding agents. Wraps the Dataverse MCP server, Dataverse CLI, Python SDK, an
Related Agents
Abacus AI Agent
Abacus.AI, the company behind ChatLLM and CodeLLM, ships its coding assistant as an agent extension for VS Cod
Blog Crosslink Optimizer
Use this agent when working on a blog post and wanting to enhance it with relevant cross-links to other posts
SEO Article Writer
Use this agent when the user asks to write, create, or draft an SEO-optimized article, blog post, or page. Thi