Dynamo Dotnet Expert
DynamoDS/Dynamo
Write and review C/.NET code in Dynamo following Dynamo coding standards, modern C patterns, and repo conventions.
Refactors C# and .NET code without changing behavior, using binding-aware edits plus a build and tests, and separating out or declining anything that alters behavior.
$ npx skills add dotnet/skills --skill csharp-refactoring -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install dotnet/skills csharp-refactoring --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/dotnet/skills/csharp-refactoring .claude/skills/csharp-refactoring && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "csharp-refactoring" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet/skills/csharp-refactoring into .claude/skills/csharp-refactoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "csharp-refactoring", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/dotnet/skills/tree/main/plugins/dotnet/skills/csharp-refactoringType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add dotnet/skills --skill csharp-refactoring -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install dotnet/skills csharp-refactoring --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/dotnet/skills/csharp-refactoring .agents/skills/csharp-refactoring && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "csharp-refactoring" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet/skills/csharp-refactoring into .agents/skills/csharp-refactoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "csharp-refactoring", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dotnet/skills --skill csharp-refactoring -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install dotnet/skills csharp-refactoring --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/dotnet/skills/csharp-refactoring .cursor/skills/csharp-refactoring && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "csharp-refactoring" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet/skills/csharp-refactoring into .cursor/skills/csharp-refactoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "csharp-refactoring", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/dotnet/skills.git --path plugins/dotnet/skills/csharp-refactoring--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add dotnet/skills --skill csharp-refactoring -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install dotnet/skills csharp-refactoring --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/dotnet/skills/csharp-refactoring .gemini/skills/csharp-refactoring && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "csharp-refactoring" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet/skills/csharp-refactoring into .gemini/skills/csharp-refactoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "csharp-refactoring", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install dotnet/skills csharp-refactoringInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add dotnet/skills --skill csharp-refactoring -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/dotnet/skills/csharp-refactoring .github/skills/csharp-refactoring && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "csharp-refactoring" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet/skills/csharp-refactoring into .github/skills/csharp-refactoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "csharp-refactoring", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dotnet/skills --skill csharp-refactoring -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install dotnet/skills csharp-refactoring --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/dotnet/skills/csharp-refactoring .opencode/skills/csharp-refactoring && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "csharp-refactoring" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet/skills/csharp-refactoring into .opencode/skills/csharp-refactoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "csharp-refactoring", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
csharp-refactoringRefactors C# and .NET code without changing behavior, using binding-aware edits plus a build and tests, and separating out or declining anything that alters behavior.
A refactor changes structure and never observable behavior. Before restoring, building or editing, the agent classifies each requested operation. If at least one operation is a separable structural change, it does that work and explicitly defers the rest. If the structural and behavior-changing parts cannot be separated, or every operation falls outside refactoring, it gives a fixed three-line stop response stating the reason, that no files changed and which workflow comes next, and then stops without offering alternatives.
Requests dressed up as refactors are sorted out: a framework or NuGet version change is an upgrade handed to `dotnet-upgrade`, a new capability is a feature, a change to a threshold, rate or output is a behavior change, and tightening a shipped nullable annotation is a source-contract change. The covered operations include rename, move, extract, inline, merge, deduplicate, split and modernize, with care for partial and generated declarations, public APIs, serialization and reflection names, friend assemblies, conditional compilation and multi-targeted projects. `references/operation-catalog.md` is bundled, and effort scales with the size of the change.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 8d670fa. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
dotnetgitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
C# Behavior-Preserving Refactoring loads about 3.1k tokens when it runs, and up to ~3.8k if it reads all its reference files. Until then it costs about 186 tokens; SKILL.md has 1,561 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from dotnet/skills at commit 8d670fa, republished under its MIT licence (© dotnet). 1,561 words, ~3,097 tokens.
.claude/skills/csharp-refactoring/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.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.
Read only enough repository context to classify each requested operation. Do this before restoring, building, or making an edit. Classification precedence is:
For a whole request that is outside behavior-preserving refactoring:
Not a behavior-preserving refactor: <specific reason>.No files changed.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.| Requested as a "refactor" | Classification and action |
|---|---|
| Framework or NuGet version change | Upgrade. Do not edit or validate the upgrade here; hand off to dotnet-upgrade. |
| New capability, flag, endpoint, tier, or behavior | Feature. Do not implement it here; hand off to the repository's feature workflow. |
| Threshold, rate, output, or bug-result change | Behavior change. Defer it and hand off to the repository's bug-fix or behavior-change workflow; still complete any clearly separable structural operation. |
| Tighten or loosen a shipped/public nullable annotation | Source-contract change. Leave the declaration and API record unchanged; hand off to the repository's API-contract workflow. |
For a mixed request, never stop after classification. Perform the separable structural operation,
explicitly defer the behavior/contract change, and never state No files changed. after completing
structural work. Never modify tests to make an unauthorized behavior change appear preserved.
Use the current agent workspace as the boundary. If it is a Git checkout, resolve its repository root
(git rev-parse --show-toplevel) and stay inside it. If Git metadata is absent, treat the current working
directory and its subdirectories as the boundary, and use a solution or project named in the request
inside it; Git is not a prerequisite for a refactor. Resolve prompt-provided relative paths inside that
boundary.
Search and edit only that workspace. Never use filesystem-wide search or select a similarly named clone, another worktree, build output, or unrelated temporary directory because a file also exists there. If a named path is absent, stop and report the mismatch instead of guessing another workspace. If a tool rejects an in-workspace path for a mechanical reason such as path form or unsupported tool root, retry through another in-workspace mechanism. If the rejection is a permission or policy denial, report it instead of working around it. Never search outside the boundary.
The #1 way a "rename" silently corrupts code is editing textual matches (comments, strings, unrelated
overloads) instead of real bindings. Find every binding reference first, then edit semantically. Use
the strongest tool available: an IDE/Roslyn workspace refactoring, then the C# LSP the
dotnet plugin declares
(findReferences, goToDefinition, incomingCalls, rename code action), then analyzer code-fixes /
Roslynator, then compiler-validated edits (edit the true bindings, rebuild, let the compiler flag misses).
Plain find/replace only when scope is provably tiny and every hit is verified. Include every partial
declaration, and edit the generator input, never generated (*.g.cs) output.
For the operation → Roslyn-provider mapping and representative PRs, see references/operation-catalog.md.
When de-duplicating, preserve the ownership direction stated by the code or request. If B duplicates
an implementation already owned by A, keep A canonical and make B delegate to it; do not invert
the dependency merely because either direction compiles. Preserve public compatibility wrappers when
the duplicate surface is shipped, and migrate only in-repo callers that are safe to move.
Use the first matching row instead of applying the requested operation mechanically:
| Situation | Do | Never |
|---|---|---|
| Inline an internal, unshipped pass-through wrapper | Migrate every binding reference to the target, remove the wrapper, then compile to catch misses. | Keep dead indirection "for compatibility" when no compatibility boundary exists. |
| Inline or remove a shipped/public wrapper | Migrate ordinary in-repo callers, but retain an [Obsolete] forwarding entry point unless the request explicitly authorizes a breaking change. | Delete a shipped API merely because all current source callers were migrated. |
| Rename a member reached by a string, reflection, DI, or configuration | Rename binding-based callers; preserve the observed external name with a forwarding shim or metadata, and exercise the old-name path. | Rewrite an external/configured name just to make the new source name consistent. |
| Extract duplicated logic whose callers pass different values | Extract the algorithm and pass each caller's existing inputs through unchanged. | Collapse distinct inputs, evaluation order, rounding, or side effects into one caller's version. |
Rename code compiled under #if or multiple TFMs | Update every source branch and validate each target framework explicitly. | Treat a green default-target build as evidence for unbuilt branches. |
| Merge near-identical types | Parameterize only the values that differ, migrate every construction site, and preserve each old value exactly. If the old types are internal/unshipped and the request says to merge into one type, delete their declarations. | Retain unnecessary aliases, static holders, factories, or wrapper types that leave the requested merge incomplete; introduce a new hierarchy or behavior. |
Compilation proves binding compatibility, not every external contract. Before renaming or moving a
type/member, check whether its name or metadata is observed by serialization, reflection, dependency
injection, configuration binding, source generators, P/Invoke, or dynamic.
| Boundary | Required decision |
|---|---|
| Serialized/configuration name | Preserve the external name with the repository's existing mechanism (for example, JsonPropertyName) while migrating C# callers; run a focused round-trip or payload test. |
| Public nullable annotation | The mandatory classification gate applies: leave it unchanged and hand off as a source-contract change. |
| Uncovered reflection or runtime lookup | Do not guess that a compile-clean rename is safe. Preserve the observed name or stop and report the unverified runtime boundary. |
Confirm behavior is preserved after the edit — scaled to blast radius, not a fixed ceremony:
private member, one file, single target framework, no public
surface, no partial/generated/#if): skip a separate baseline unless the tree is already suspect.
Make the edit, then run the narrowest build and relevant tests once. Let the compiler catch missed
references.#if/platform branches, or
partial/generated code): establish a baseline, then run an explicit build and the relevant tests for
each target framework after the edit (a test command's implicit build is not separate build evidence;
a green default build can hide a break on another TFM), and run the hazards check below.Use the repo's own build/test workflow when it documents one (README/CONTRIBUTING, build.*, eng/,
global.json, .github/workflows); its instructions win over any generic command.
findReferences/goToDefinition/rename) and include all partial declarations.Otherwise:
dotnet build # 0 errors
dotnet test # stays green; same pass count as beforeOne operation per step; never mix a refactor and a behavior change in the same step. On red, stop and report the failure; repair only your edit without discarding unrelated worktree changes.
Keep the handoff concise and evidence-based:
If — and only if — the change touches a public symbol, a multi-targeted project, or
partial/generated code, some breaks won't show up as a failing test. Search the repo for the surface
that governs the symbol (don't assume): the public-API gate (PublicAPI.Shipped/Unshipped.txt for
PublicApiAnalyzers, and/or ApiCompat/<EnablePackageValidation> — not interchangeable),
<TargetFrameworks>/#if branches, and InternalsVisibleTo. Moving a public type to another assembly
needs [TypeForwardedTo] in the original assembly; a move within one assembly does not. A public
rename needs an [Obsolete] shim, not a forwarder. For a provably local/private change, skip these
checks.
Deferred: line instead. Do not ask to make
the breaking change.dynamic,
P/Invoke) — report the unverified boundary instead of claiming behavior was preserved.© dotnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in plugins/dotnet/skills/csharp-refactoring of dotnet/skills.
Open the folder on GitHubat commit 8d670fa
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in dotnet/skills, which our catalogue first saw on October 7, 2026.
C# Behavior-Preserving Refactoring next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| C# Behavior-Preserving Refactoring this skilldotnet/skills | 5.6k | 1 repos | ~3.1k | Automated safety check: Pass | MIT | |
| Dynamo Dotnet ExpertDynamoDS/Dynamo | 2k | — | ~909 | Automated safety check: Pass | Apache-2.0 | |
| Add Refactoringdotnet/roslynator | 3.5k | — | ~946 | Automated safety check: Pass | Custom licence | |
| Deprecate Analyzer Or Refactoringdotnet/roslynator | 3.5k | — | ~511 | Automated safety check: Pass | Custom licence | |
| Okojo Test262akeit0/okojo | 160 | — | ~742 | Automated safety check: Pass | MIT | |
| Dotnet10 Featuresrunceel/ReactiveProperty | 944 | — | ~2.7k | Automated safety check: Pass | MIT |
DynamoDS/Dynamo
Write and review C/.NET code in Dynamo following Dynamo coding standards, modern C patterns, and repo conventions.
dotnet/roslynator
A skill your agent uses when adding a new RR refactoring in roslynator, editing Refactorings.xml, registering in RefactoringContext, or when refactorings-testing.md shows XunitRefactoringVerifier —…
dotnet/roslynator
A skill your agent uses when obsoleting or retiring RCS, RR, or RCF in roslynator, replacing an analyzer with another id, or when tempted to use IsObsolete on an Analyzer entry — analyzers use…
akeit0/okojo
Run and continue Okojo Test262 compliance work. An agent skill from akeit0/okojo.
runceel/ReactiveProperty
Reference for the .NET 10 / C 14 features that are relevant to the ReactiveProperty repository.
Samsung/TizenFX
Automatically scans the TizenFX codebase on a rotating schedule to discover .NET 8 / C 12+ refactoring targets and register them as GitHub Issues.
dotnet/skills
Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.
dotnet/skills
Resolves native crash frames from .NET Android tombstones to function names, source files and line numbers using BuildIds, Microsoft's symbol server and llvm-symbolizer.
dotnet/skills
Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.
dotnet/skills
Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.
dotnet/skills
Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks.
dotnet/skills
Makes .NET projects compatible with Native AOT and trimming by resolving IL trim and AOT analyzer warnings through annotations rather than suppressions.
Categories
Refactors C# and .NET code without changing behavior, using binding-aware edits plus a build and tests, and separating out or declining anything that alters behavior. A refactor changes structure and never observable behavior. Before restoring, building or editing, the agent classifies each requested operation.
C# Behavior-Preserving Refactoring fits situations like: renaming or moving C# types and members without changing behavior; extracting or inlining methods in a multi-targeted project; sorting out a request that mixes a refactor with a bug fix or upgrade; consolidating duplicated code behind a public API.
Run `npx skills add dotnet/skills --skill csharp-refactoring -a claude-code`. Or copy the skill folder (plugins/dotnet/skills/csharp-refactoring in dotnet/skills) into .claude/skills/csharp-refactoring in your project. Claude Code loads it when a task matches its description.
Run `npx skills add dotnet/skills --skill csharp-refactoring -a codex`. Or copy the skill folder (plugins/dotnet/skills/csharp-refactoring in dotnet/skills) into .agents/skills/csharp-refactoring in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/skills --skill csharp-refactoring -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/csharp-refactoring, .gemini/skills/csharp-refactoring, .github/skills/csharp-refactoring and .opencode/skills/csharp-refactoring in your project.
Going by SKILL.md and its folder, C# Behavior-Preserving Refactoring needs the command-line tools its instructions call (dotnet and git). Our summary lists: A buildable C# solution with relevant tests.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
C# Behavior-Preserving Refactoring is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 719 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with C# Behavior-Preserving Refactoring: Dynamo Dotnet Expert (DynamoDS/Dynamo, 2k stars), Add Refactoring (dotnet/roslynator, 3.5k stars), Deprecate Analyzer Or Refactoring (dotnet/roslynator, 3.5k stars) and Okojo Test262 (akeit0/okojo, 160 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
dotnet (a GitHub organization, an official publisher) maintains it in dotnet/skills, which has 5,568 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 7, 2026.
Source: dotnet/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.