Inspired by ReSharper. A Roslyn-based refactorer for C# solutions and multi-solution monorepos, packaged as an agent skill with bundled .NET 10 source and optional prebuilt CLI binaries.
macOS / Linux:
curl -fsSL https://github.com/CodeAlive-AI/ai-driven-development/releases/download/refactoring-csharp-v0.1.0/install-refactoring-csharp.sh | bashWindows PowerShell:
irm https://github.com/CodeAlive-AI/ai-driven-development/releases/download/refactoring-csharp-v0.1.0/install-refactoring-csharp.ps1 | iexDefault install targets Codex, Claude Code, and OpenCode. Install to a specific agent:
curl -fsSL https://github.com/CodeAlive-AI/ai-driven-development/releases/download/refactoring-csharp-v0.1.0/install-refactoring-csharp.sh | bash -s -- --agent cursoriex "& { $(irm https://github.com/CodeAlive-AI/ai-driven-development/releases/download/refactoring-csharp-v0.1.0/install-refactoring-csharp.ps1) } -Agent cursor"Install to all supported global agent skill directories:
curl -fsSL https://github.com/CodeAlive-AI/ai-driven-development/releases/download/refactoring-csharp-v0.1.0/install-refactoring-csharp.sh | bash -s -- --all-agentsiex "& { $(irm https://github.com/CodeAlive-AI/ai-driven-development/releases/download/refactoring-csharp-v0.1.0/install-refactoring-csharp.ps1) } -AllAgents"Pin a release:
REFACTORING_CSHARP_VERSION=refactoring-csharp-v0.1.0 \
curl -fsSL https://github.com/CodeAlive-AI/ai-driven-development/releases/download/refactoring-csharp-v0.1.0/install-refactoring-csharp.sh | bash$env:REFACTORING_CSHARP_VERSION = "refactoring-csharp-v0.1.0"
irm https://github.com/CodeAlive-AI/ai-driven-development/releases/download/refactoring-csharp-v0.1.0/install-refactoring-csharp.ps1 | iex- Renames C# symbols across a whole solution using Roslyn.
- Supports
.slnand.slnx. - Supports multi-solution monorepos by accepting a directory, merging discovered solutions/projects into a temporary aggregate
.slnx, refactoring through Roslyn, and deleting the temporary solution afterward. - Resolves targets from
file_path, 1-basedline_number, and requiredold_name. - Applies by default; dry-run is opt-in.
- Renames comments by default.
- Safely moves matching type files by default so git can detect a rename.
- Uses the target solution's normal MSBuild/Roslyn cache instead of creating a second project cache.
- Ships source with the skill so agents can build, inspect, patch, and test it locally.
The installer follows the global skill directories from the Skills CLI ecosystem and supports:
adal, amp, antigravity, augment, claude-code, cline, codebuddy,
codex, command-code, continue, crush, cursor, droid, gemini-cli,
github-copilot, goose, iflow-cli, junie, kilo, kimi-cli, kiro-cli,
kode, mcpjam, mistral-vibe, mux, neovate, openclaw, opencode,
openhands, pi, pochi, qoder, qwen-code, replit, roo, trae,
trae-cn, windsurf, and zencoder.
Useful flags:
--agent <id>/-Agent <id>installs to one agent. Repeatable in bash.--all-agents/-AllAgentsinstalls to every supported global skill directory.--detected/-Detectedinstalls only to agents whose global config directory exists.--no-binary/-NoBinaryinstalls only the skill source.
Preferred, if installed from release with a prebuilt binary:
~/.codex/skills/refactoring-csharp/bin/csharp-refactor rename-symbol \
/repo/src/App.slnx \
/repo/src/Foo.cs \
42 \
OldName \
NewNameFor multi-solution monorepos, pass the repository directory instead of a solution file:
~/.codex/skills/refactoring-csharp/bin/csharp-refactor rename-symbol \
/repo \
/repo/src/Foo.cs \
42 \
OldName \
NewNameSource fallback:
dotnet run --project ~/.codex/skills/refactoring-csharp/src/CSharpRefactoring.Cli -- \
rename-symbol /repo/src/App.slnx /repo/src/Foo.cs 42 OldName NewNameline_number is 1-based and can be copied directly from rg -n.
rename-symbol <sln|slnx|directory> <file> <line> <oldName> <newName> [dryRun=false|true]
Defaults:
dryRun=falserename_file=truerename_in_comments=truerename_in_strings=falserename_overloads=false
cd skills/refactoring-csharp
dotnet build src/CSharpRefactoring.slnx
dotnet test src/CSharpRefactoring.slnxcd skills/refactoring-csharp
./release.sh refactoring-csharp-v0.1.0The release script creates:
dist/refactoring-csharp-skill.tar.gzdist/csharp-refactor-darwin-arm64.tar.gzdist/csharp-refactor-darwin-x64.tar.gzdist/csharp-refactor-linux-arm64.tar.gzdist/csharp-refactor-linux-x64.tar.gzdist/csharp-refactor-win-x64.zipdist/SHA256SUMS
MIT.