Claude Code for .NET Developers: A Practical Agentic Workflow A developer-oriented guide details how Claude Code operates as a terminal-based agent for .NET teams, reading repositories, planning changes, editing multiple files, and iterating on `dotnet build` and `dotnet test` output rather than acting as autocomplete. The piece cites a JetBrains Research survey of more than 15,000 developers published in August 2026 putting Claude Code at 39% use at work, up from 18% in January, and recommends keeping each CLAUDE.md under 200 lines while separating shared AGENTS.md conventions from Claude-specific workflow instructions. This is Part 1 of the "Agentic Engineering for .NET Teams" series. Part 2 https://dotnet-talk.com/blog/context-engineering-net-coding-agent covers context engineering, Part 3 https://dotnet-talk.com/blog/agentic-dotnet-memory-mcp-handoffs covers sharing state across sessions and agents, and Part 4 https://dotnet-talk.com/blog/function-calling-csharp-ai-agent-tools covers function calling in C . GitHub Copilot suggests the next line, and a chat assistant answers questions about code you paste into it. Claude Code works differently: it reads your repository, proposes a plan, writes files, runs dotnet build , reads the compiler errors, fixes them, runs dotnet test and iterates on the failures, all from your terminal. Understanding that loop is what this article is about. Claude Code launched as a research preview in February 2025 and became generally available in May 2025. It now runs in the terminal, a desktop app, VS Code, JetBrains IDEs and Slack. Adoption has moved quickly: a JetBrains Research survey of more than 15,000 developers, published in August 2026, puts Claude Code at 39% use at work, up from 18% in the company's January survey. The reason is architectural rather than cosmetic, because this is an agent with filesystem and shell access, not an autocomplete. A rough mental model helps. Copilot completes code inside the file you are editing. Chat tools brainstorm and explain, but they cannot touch your repo. Cursor does multi-file edits inside a VS Code style editor. Claude Code is an agent that starts from the terminal: it searches your tree, plans, edits several files, runs shell commands and corrects itself based on the real output. The building blocks it exposes are CLAUDE.md , skills, subagents, slash commands, hooks and MCP servers, and plugins bundle several of those into one installable unit. You do not need all of them on the first day, but knowing they exist stops you from treating the tool as a smarter autocomplete. In February 2026, a year after he coined "vibe coding", Andrej Karpathy proposed the name "agentic engineering" for the professional version of this work: agents do much of the typing, and people keep the oversight. That is also the idea behind this series. The recommended install is the native installer, which updates itself in the background. Homebrew and WinGet also work, and the npm package is still available. All of them install the same native binary, so claude does not depend on Node.js at runtime. macOS, Linux and WSL curl -fsSL https://claude.ai/install.sh | bash or: brew install --cask claude-code or: winget install Anthropic.ClaudeCode or: npm install -g @anthropic-ai/claude-code needs Node.js 22 or later claude --version Claude Code is included with a paid Claude subscription. There is a 5-hour usage limit plus weekly limits, shared across claude.ai, Claude Code and the desktop app, and how fast you use them depends on the model and on how much context each request carries. Run /usage inside a session to see where you stand. This is the most important part of the setup, and it is the part most teams write once and then forget. Anthropic's own guidance is to keep each CLAUDE.md under 200 lines, because a longer file costs more context and is followed less reliably. Instructions that only matter for part of the codebase can go into path-scoped rule files under .claude/rules/ , which load only when Claude works with matching files. Two files are worth separating. AGENTS.md is an open format that several coding agents read, so it is a good home for things every tool should know: target framework, coding conventions, forbidden APIs and architectural rules. CLAUDE.md is specific to Claude Code and holds workflow instructions. Since v2.1.277, Claude Code can read AGENTS.md directly, but by default only when the repository has no CLAUDE.md . If you keep both, import one into the other with a line such as @AGENTS.md , so both always load. A practical structure for a Clean Architecture ASP.NET Core service: CLAUDE.md @AGENTS.md What this repo is ASP.NET Core Web API, Clean Architecture. Target: net10.0. Conventions and forbidden APIs are in AGENTS.md imported above . Build and test commands - Build: dotnet build src/MyService.slnx - Test: dotnet test src/MyService.slnx --no-build - Format: dotnet format src/MyService.slnx Workflow - Use plan mode for any change touching src/Billing/ or src/Domain/ - Always add or update xUnit tests in the same PR as domain changes - Prefer record types for value objects - Do not use MediatR pipeline behaviours for cross-cutting concerns; use middleware instead see ADR-004 The solution file ends in .slnx because that is what dotnet new sln creates from the .NET 10 SDK onwards; older repositories may still have a .sln , and both work with the commands above. A structure that works well is what, why and how: what the project is, why certain conventions exist, and how to run the workflow. Claude can also update the file for you, so "add this rule to CLAUDE.md" works in conversation. The old shortcut for quick memory entries was removed in December 2025, so asking Claude directly is now the way to do it. If you want to see what actually loaded into a session, /context shows the memory files alongside everything else in the context window. Hooks are what turn Claude Code from a tool that writes code into one that also checks it. A PostToolUse hook runs after a tool call succeeds, so a hook on Edit and Write can build the solution after every change. When the hook exits with code 2, Claude sees its stderr and fixes the problem before moving on. Add the hook to .claude/settings.json : { "hooks": { "PostToolUse": { "matcher": "Edit|Write", "hooks": { "type": "command", "command": "${CLAUDE PROJECT DIR}/.claude/hooks/dotnet-build.sh" } } } } And the script it calls: bash /usr/bin/env bash .claude/hooks/dotnet-build.sh: builds only when a C file or project changed. input=$ cat case "$input" in '.cs"' | '.csproj"' ;; exit 0 ;; esac cd "$CLAUDE PROJECT DIR" || exit 0 if out=$ dotnet build src/MyService.slnx --no-restore -v q -nologo 2 &1 ; then echo "$out" | grep -E "error A-Z + 0-9 +" | sort -u | head -20 &2 exit 2 fi The script reads the hook input from stdin, skips edits to files that cannot break the build, and passes only the compiler errors back to Claude. A full build after every edit can be slow on a large solution, so many teams point the hook at the nearest project instead, or run the tests from a Stop hook once Claude has finished a turn. For any non-trivial change, start in plan mode. In plan mode Claude reads the relevant code and proposes changes without editing your files. You review the plan, push back on anything wrong, and only then let it act. Running example: adding a PATCH /orders/{id}/status endpoint to an existing ASP.NET Core service, with request validation and integration tests. claude --permission-mode plan "Add a PATCH /orders/{id}/status endpoint. - Accept { status: string } body. Validate against the OrderStatus enum. - Return 400 if the transition is invalid see Domain/OrderStateMachine.cs . - Add FluentValidation validator. - Add integration tests in tests/MyService.IntegrationTests using the existing WebApplicationFactory