Skip to content
C

csharp-refactoring

Safely refactors C#/.NET code without changing behavior

by dotnetFree

#4301in AI Skills
0In stores

Description

csharp-refactoring is an agent skill for C# and .NET code that changes the structure of a program without changing what it does. It covers r…

Highlights

  • Renames, moves, extracts, inlines and merges C# code
  • Classifies each request before editing so behavior changes are held back
  • Confirms behavior with a build and the relevant tests
  • Scales the checks to the size of the change

Ratings & Reviews

No ratings yet

Be the first to rate csharp-refactoring.

People also visit

R

refactoring-patterns

Apply named refactoring transformations

AI Skills
Get
S

safe-refactor

Restructure code while preserving behavior

AI Skills
Get
A

agent-lsp

Semantic code intelligence skills for refactor, rename, impact analysis

AI Skills
Get
D

dotnet-best-practices

Validate .NET/C# code against comprehensive best practices for your solution

AI Skills
Get
C

code-simplify

Simplifying recently changed code: clean up, refactor for clarity

AI Skills
Get
R

refactor-plan

Detailed multi-file refactor planning with safety checks and rollback guidance

AI Skills
Get

csharp-refactoring FAQ

What does this skill do?

It guides an AI coding agent through behavior-preserving refactoring of C# and .NET code. It handles renaming, moving, extracting, inlining, merging, consolidating and deduplicating, then checks that the code still builds and the tests still pass.

Can it change how my code behaves?

The goal is no change in behavior. If a request mixes structural work with behavior or contract changes, the skill completes the structural part and defers the rest. If the two cannot be separated, it stops and says why.

Is a small rename handled differently from a large change?

Yes. The skill says a one-line local rename needs far less ceremony than a public, multi-targeted change, so the effort stays proportional to the edit.

How do I install it?

Run npx skills add https://github.com/dotnet/skills --skill csharp-refactoring in your project, then ask your agent to refactor C# code.

What security audits has it passed?

Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.

What are the best csharp-refactoring alternatives?

Popular alternatives to csharp-refactoring include refactoring-patterns, safe-refactor and agent-lsp. See all csharp-refactoring alternatives

Developer Stuff

Badges