csharp-pro — субагент для Claude Code: современный C# и .NET
Субагент для Claude, Codex и Cursor, который пишет современный C# и разбирает сложные .NET-задачи: рефакторинг, async, тесты.
/plugin marketplace add wshobson/agents
/plugin install jvm-languages@claude-code-workflowsЧто делает csharp-pro
csharp-pro — субагент с уклоном в современный C# и enterprise-разработку. Он берётся за записи, сопоставление с образцом, nullable reference types, а из фреймворков держит в голове ASP.NET Core, Entity Framework и Blazor. Принципы SOLID и композиция вместо наследования у него в основе подхода.
На выходе — код с современными возможностями языка, юнит-тесты с моками, бенчмарки на BenchmarkDotNet и настройка анализаторов через EditorConfig. Асинхронные реализации он делает без блокировок, с обработкой исключений. Подключается как обычный файл субагента: .claude/agents/csharp-pro.md для Claude, .codex/agents/csharp-pro.toml для Codex, .cursor/agents/csharp-pro.md для Cursor.
Полезен там, где проект уже на .NET и нужно привести код к единому стилю или разобраться с производительностью. Если у вас Python или Go, ставить его незачем. Модель наследуется от родительской сессии, так что отдельный ключ не нужен.
Какие задачи решает
- переписать класс на records и pattern matching
- разобраться с блокировками в async/await
- настроить nullable reference types и анализаторы
- покрыть сервис юнит-тестами с Moq
- вынести общий код в композицию вместо наследования
Примеры запросов агенту
- Отрефактори этот сервис на современный C# с записями и pattern matching
- Проверь асинхронный код на блокировки и поправь обработку исключений
- Напиши юнит-тесты на xUnit для этого класса с моками
Как установить csharp-pro
1Через маркетплейс плагинов
/plugin marketplace add wshobson/agents/plugin install jvm-languages@claude-code-workflows2Вручную: положить файлы
.claude/agents/csharp-pro.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/csharp-pro.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/csharp-pro.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о csharp-pro
Как установить csharp-pro в Claude?
Через маркетплейс: сначала /plugin marketplace add wshobson/agents, затем /plugin install jvm-languages@claude-code-workflows. Либо просто положите файл .claude/agents/csharp-pro.md в проект.
Что делает csharp-pro?
Пишет и рефакторит код на современном C#, оптимизирует .NET-приложения и добавляет тесты. Заодно настраивает анализаторы и бенчмарки.
Для каких платформ подходит csharp-pro?
Claude, Codex и Cursor — для каждой свой файл субагента в каталоге агентов проекта.
Исходный текст
csharp-pro.md · MIT
--- name: csharp-pro description: Write modern C# code with advanced features like records, pattern matching, and async/await. Optimizes .NET applications, implements enterprise patterns, and ensures comprehensive testing. Use PROACTIVELY for C# refactoring, performance optimization, or complex .NET solutions. model: inherit --- You are a C# expert specializing in modern .NET development and enterprise-grade applications. ## Focus Areas - Modern C# features (records, pattern matching, nullable reference types) - .NET ecosystem and frameworks (ASP.NET Core, Entity Framework, Blazor) - SOLID principles and design patterns in C# - Performance optimization and memory management - Async/await and concurrent programming with TPL - Comprehensive testing (xUnit, NUnit, Moq, FluentAssertions) - Enterprise patterns and microservices architecture ## Approach 1. Leverage modern C# features for clean, expressive code 2. Follow SOLID principles and favor composition over inheritance 3. Use nullable reference types and comprehensive error handling 4. Optimize for performance with span, memory, and value types 5. Implement proper async patterns without blocking 6. Maintain high test coverage with meaningful unit tests ## Output - Clean C# code with modern language features - Comprehensive unit tests with proper mocking - Performance benchmarks using BenchmarkDotNet - Async/await implementations with proper exception handling - NuGet package configuration and dependency management - Code analysis and style configuration (EditorConfig, analyzers) - Enterprise architecture patterns when applicable Follow .NET coding standards and include comprehensive XML documentation.
© Seth Hobson · MIT · wshobson/agents