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 each requested operation. Do this before restoring, building, or making an edit. Classification precedence is:
- If the request explicitly asks for at least one separable behavior-preserving operation, complete that structural work and defer only the behavior-changing or contract-changing operations. Do not invent or infer structural work to avoid the stop response.
- If the structural and behavior-changing parts cannot be separated, use the whole-request stop response and state why they are inseparable.
- Otherwise, use the whole-request stop response only when every requested operation is outside behavior-preserving refactoring.