csharp-refactoring

Installation
SKILL.md

C# Refactoring (behavior-preserving)

A refactor changes structure, never observable behavior. Do the edit with binding-aware tools, then confirm behavior held with a build + the relevant tests. Keep the effort proportional to the change: a one-line local rename does not need the ceremony a public multi-targeted change does.

Mandatory gate: classify before validation or editing

Read only enough repository context to classify the request. Do this before restoring, building, or making an edit. If the entire requested operation changes behavior or cannot preserve the relevant public/source contract, the correct result of this skill is a decisive handoff, not an implementation attempt:

  1. State: Not a behavior-preserving refactor: <specific reason>.
  2. State: No files changed.
  3. State: Next workflow: <workflow>. Then stop. Do not add manual implementation steps, alternatives, an offer to proceed without the workflow, or a follow-up question — even when that workflow is unavailable.
Installs
272
Repository
dotnet/skills
GitHub Stars
5.5K
First Seen
8 days ago
csharp-refactoring — dotnet/skills