csharp-refactoring
Refactor C# code safely
- For people who code
- Needs: A coding agent such as Claude Code or Codex, in a .NET project with the .NET SDK installed
What it does
Safely refactors C#/.NET code without changing behavior.
This repository contains the .NET team's curated set of portable skills and host-specific custom agents for coding agents. For information about the Agent Skills standard, see agentskills.io.
Plugin support is component-specific:
- Skills and MCP servers are the portable component types defined by Agent Plugins 1.0.
- Files under
agents/*.agent.mduse GitHub Copilot custom-agent conventions. They are not installed as native OpenAI Codex agents. - Native Codex agents use
.codex/agents/*.toml. This repository does not currently ship them because Codex plugin installation does not place agent files in those discovery locations.
| Plugin | Description |
|---|---|
| dotnet | High-level .NET development skills plus C# language server (LSP) integration for hosts that support it. |
| dotnet-advanced | Collection of .NET skills for handling specific .NET tasks for special scenarios. |
| dotnet-data | Skills for .NET data access and Entity Framework related tasks. |
| dotnet-diag | Skills for .NET performance investigations, debugging, and incident analysis. |
| dotnet-msbuild | Comprehensive MSBuild and .NET build skills: failure diagnosis, performance optimization, code quality, and modernization. |
| dotnet-nuget | NuGet and .NET package management: dependency management and modernization. |
| dotnet-upgrade | Skills for migrating and upgrading .NET projects across framework versions, language features, and compatibility targets. |
| dotnet-maui | Skills for .NET MAUI development: environment setup, diagnostics, and troubleshooting. |
| dotnet-ai | AI and ML skills for .NET: technology selection, LLM integration, agentic workflows, RAG pipelines, MCP, and classic ML with ML.NET. |
| dotnet-template-engine | .NET Template Engine skills: template discovery, project scaffolding, and template authoring. |
| dotnet-test | Skills for running, generating, analyzing, and improving .NET tests: test execution, filtering, platform detection, coverage, testability, and MSTest workflows. |
| dotnet-test-migration | Skills and a GitHub Copilot orchestrator agent for migrating .NET test frameworks and platforms: MSTest and xUnit version upgrades, xUnit-to-MSTest conversion, and VSTest to Microsoft.Testing.Platform. |
| dotnet-aspnetcore | ASP.NET Core web development skills including middleware, endpoints, real-time communication, and API patterns. |
| dotnet-blazor | Skills for Blazor development: component authoring, interactivity, and web application patterns. |
| dotnet-winforms | Skills for Windows Forms development: project setup, UI design, data binding, accessibility, and modern .NET practices. |
| dotnet11 | Skills for new .NET 11 APIs and language features. |
Reusable GitHub Agentic Workflows are published under agentic-workflows/. Install the complete collection with gh aw add-wizard dotnet/skills/agentic-workflows@main, or install an individual package using the command in its README.
From README.md in dotnet/skills · a snapshot from Nov 24, 2026, so it may be a little out of date
Try it
- 1Add csharp-refactoring to your AI
- 2Ask for something like this
Split this class into smaller ones
Rename this method everywhere it's used
Remove the duplicated code in these two files
Example prompts written from the skill's instructions.
Safety
SafeDetails
All three scanners ran and found nothing that could steal your data or hijack your AI.
What it can do- Runs commands on your computer
- Scanners
- SkillSpector 2.12.0 · HoneyBadger 0.8.1 · agentscan 1.2.2
- Scanned on
- Nov 22, 2026
- Raw reports
- full report skillspector honeybadger agentscan
- Secret scanPassed
- Dangerous commandsNoticed
SkillSpector: Report recommendation is CAUTION. SkillSpector analysis was partial (reference_missing). - Network callsPassed
- PermissionsPassed
- Prompt injectionPassed
- LicenseNot runGitHub API did not return the repository.
- MaintenanceNot runGitHub API did not return the repository.
No person has signed this one off yet.
Three open-source scanners (SkillSpector, HoneyBadger, agentscan) check this exact version. Heads up means it could steal your data or hijack your AI. What it can do is listed, not warned about. Scanners miss things.
How we check: only harm earns a Heads up, meaning prompt injection (OWASP LLM01) or data leaks (LLM02), in files the skill ships. Abilities like running commands (LLM06) are listed, not warned about. No AI is used for this step. OWASP
Details
- Stars
- 6.3kon GitHub
- Last updated
- Nov 24, 2026on GitHub
GitHub numbers are a snapshot from Nov 24, 2026, not live.
Community
Comments
How to add csharp-refactoring to Claude
Press Add to your AI at the top of this page and pick Claude, or do it yourself:
- Download the skill. Keep the .zip as it is.
- On Claude's skills page, click +, then Create skill, then Upload a skill.
- Pick the file you downloaded and switch the skill on.
Works on every Claude plan, Free included. Code execution and file creation need to be on in Claude's settings. How to add a skill to Claude, step by step.
In ChatGPT
Skills are on ChatGPT Business, Enterprise, Healthcare and Edu plans. Download the skill. Keep the .zip as it is. In ChatGPT, open Plugins in the sidebar, then the Skills tab, then Create, then Upload from your computer. Pick the file you downloaded. ChatGPT checks it, then it's ready. More on ChatGPT.
For AI apps and agents: the skill's instructions as plain text, at the version we scanned.