refactor

Translate refactoring intent into Roslyn-based transformations on a loaded solution.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/darylmcd/Roslyn-Backed-MCP --skill refactor-darylmcd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/darylmcd/Roslyn-Backed-MCP/tree/main/skills/refactor
Command: npx skills add https://github.com/darylmcd/Roslyn-Backed-MCP --skill refactor-darylmcd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates guided semantic refactoring of C# code by translating user intent into Roslyn-based transformations, enabling safer and faster code changes.

Core Features & Use Cases

  • Interpret natural-language refactor requests and map them to precise Roslyn actions (rename, extract interface/type, move type, split class, bulk replacements).
  • Provide previews of changes and validate compilation before applying to ensure code health.
  • Manage scope and risk with warnings when refactors touch many files, and offer safe, incremental edits across projects.

Quick Start

Describe your refactoring goal in natural language and load a solution to begin the guided refactor.

Frequently Asked Questions about refactor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely rename and move C# types across projects in a solution?

Safe C# refactoring uses Roslyn-based transformations to rename and move types across projects while enforcing safety rules. It previews changes and validates compilation afterward to prevent breaking updates.

Can I extract interfaces from existing C# classes using natural language?

Yes, you can extract interfaces from C# classes using natural language by mapping your intent to precise Roslyn actions. The process provides a preview and validates compilation before applying the interface extraction.

Does Roslyn support bulk code replacements across an entire workspace?

Roslyn supports bulk replacements across a loaded workspace by translating user intent into semantic transformations. It manages scope by warning about wide-impact changes and prompting for confirmation before applying edits.

What is the best way to preview refactoring changes before applying them?

The best way to preview refactoring changes is using a guided Roslyn-based process that generates transformations and displays them before execution. This allows you to validate compilation and confirm wide-impact edits safely.

How do I handle wide-impact refactors that touch many files?

To handle wide-impact refactors touching many files, the guided refactoring process manages scope and risk by issuing warnings. It offers safe, incremental edits across projects and prompts for confirmation before applying changes.