Official agent skill

Add Refactoring

by dotnet in 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 —…

OfficialCustom licenceAuto-check passedDevelopment

Install Add Refactoring

skills CLI
$ npx skills add dotnet/roslynator --skill add-refactoring -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dotnet/roslynator add-refactoring --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dotnet/roslynator.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-refactoring .claude/skills/add-refactoring && rm -rf skills-src

Use ~/.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/

Facts

Skill name
add-refactoring
GitHub stars
3.5k
Token cost
~946 tokens
SKILL.md length
300 words
Files
2 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
Custom licence

At a glance

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 —…

  • Works in 2 steps: Confirm metadata parameters (hard gate… → Details and examples:…
  • Adding a new RR refactoring in roslynator
  • SKILL.md covers Overview, When to Use, Confirm metadata parameters… and Quick Reference, plus 2 more sections
  • Calls pwsh and dotnet; reaches josefpihrt.github.io

What it does

Add Refactoring is an agent skill from dotnet/roslynator, published by the product's own GitHub organization. Use when adding a new RR refactoring in roslynator, editing Refactorings.xml, registering in RefactoringContext, or when refactorings-testing.md shows XunitRefactoringVerifier — in-repo uses AbstractCSharpRefactoringVerifier and CHANGELOG.md.

Its SKILL.md is about 950 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/implementation.md`).

It sits in Development, covering Refactoring. It works with C# and .NET. The repository describes itself as: Roslynator is a set of code analysis tools for C, powered by Roslyn.

When your agent uses it

  • Adding a new RR refactoring in roslynator
  • Editing Refactorings.xml
  • Registering in RefactoringContext
  • Refactorings-testing.md shows XunitRefactoringVerifier — in-repo uses AbstractCSharpRefactoringVerifier and CHANGELOG.md

Example prompts

  • “/add-refactoring”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Confirm metadata parameters (hard gate above).
  2. Details and examples: references/implementation.md.

What it can do on your machine

Read from SKILL.md and the folder at commit 167f434. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • pwsh
    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • josefpihrt.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Refactoring loads about 946 tokens when it runs, and up to ~1.5k if it reads all its reference files. Until then it costs about 66 tokens; SKILL.md has 300 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~946
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.5k

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.

Safety

Auto-check passed

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.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 300 words (~946 tokens).

“Refactorings are metadata-driven: Refactorings.xml → codegen → register in RefactoringContext → implement → test → changelog.”

— opening of SKILL.md by dotnet, Custom licence
name
add-refactoring

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file (references) in .claude/skills/add-refactoring of dotnet/roslynator.

  • SKILL.md
  • references/implementation.md

Open the folder on GitHubat commit 167f434

Compare with similar skills

Add 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.

Add Refactoring compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Refactoring this skilldotnet/roslynator3.5k—~946Automated safety check: PassCustom licence
Dynamo Dotnet ExpertDynamoDS/Dynamo2k—~922Automated safety check: PassApache-2.0
Okojo Test262akeit0/okojo160—~742Automated safety check: PassMIT
Dotnet10 Featuresrunceel/ReactiveProperty944—~2.7kAutomated safety check: PassMIT
Refactor AnalysisSamsung/TizenFX214—~2.6kAutomated safety check: PassApache-2.0
C# Behavior-Preserving Refactoringdotnet/skills5.6k1 repos~3.1kAutomated safety check: PassMIT

Similar skills

  • Dynamo Dotnet Expert

    DynamoDS/Dynamo

    Write and review C/.NET code in Dynamo following Dynamo coding standards, modern C patterns, and repo conventions.

    2k GitHub stars~922 tokensUpdated today
    DevelopmentAuto-check passed
  • Okojo Test262

    akeit0/okojo

    Run and continue Okojo Test262 compliance work. An agent skill from akeit0/okojo.

    160 GitHub stars~742 tokensUpdated 17 days ago
    DevelopmentAuto-check passed
  • Dotnet10 Features

    runceel/ReactiveProperty

    Reference for the .NET 10 / C 14 features that are relevant to the ReactiveProperty repository.

    944 GitHub stars~2.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Refactor Analysis

    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.

    214 GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    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.

    5.6k GitHub starsUsed in 1 repo~3.1k tokens
    DevelopmentAuto-check passed
  • Msbuild

    dotnet/skills

    Official

    Use only for MSBuild failure investigation, build-performance analysis, or review of existing build XML/extension contracts.

    5.6k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed

More from dotnet/roslynator

  • Add Analyzer

    dotnet/roslynator

    Official

    A skill your agent uses when adding a new RCS diagnostic in roslynator (RCS0 formatting, RCS1 general, RCS9 code-analysis), wiring roslynator EditorConfig options, or when docs say CHANGELOG.md…

    3.5k GitHub stars~1.3k tokensUpdated 3 days ago
    Auto-check passed
  • Official

    A skill your agent uses when adding a Roslynator code fix for C compiler error CS or RCF, editing Diagnostics.xml or CodeFixes.xml, or when compiler-diagnostic-fixes-testing.md shows…

    3.5k GitHub stars~1k tokensUpdated 3 days ago
    Auto-check passed
  • Fix Analyzer Bug

    dotnet/roslynator

    Official

    A skill your agent uses when fixing a Roslynator analyzer false positive or false negative, RCS, RR, or CS/RCF regression, incorrect diagnostic reporting, or bug report citing a specific rule id —…

    3.5k GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed
  • Release Roslynator

    dotnet/roslynator

    Official

    A skill your agent uses when shipping a roslynator release, rolling CHANGELOG.md [Unreleased], updating the VS Code extension changelog, creating a GitHub v release, or optionally tagging cli-v.

    3.5k GitHub stars~1k tokensUpdated 3 days ago
    Auto-check passed
  • Official

    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…

    3.5k GitHub stars~511 tokensUpdated 3 days ago
    Auto-check passed

Works with

Categories

Questions about Add Refactoring

What does Add Refactoring do?

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 —…. Add Refactoring is an agent skill from dotnet/roslynator, published by the product's own GitHub organization.md.

When should I use Add Refactoring?

Add Refactoring fits situations like: adding a new RR refactoring in roslynator; editing Refactorings.xml; registering in RefactoringContext; refactorings-testing.md shows XunitRefactoringVerifier — in-repo uses AbstractCSharpRefactoringVerifier and CHANGELOG.md.

How do I install Add Refactoring in Claude Code?

Run `npx skills add dotnet/roslynator --skill add-refactoring -a claude-code`. Or copy the skill folder (.claude/skills/add-refactoring in dotnet/roslynator) into .claude/skills/add-refactoring in your project. Claude Code loads it when a task matches its description.

How do I install Add Refactoring in Codex?

Run `npx skills add dotnet/roslynator --skill add-refactoring -a codex`. Or copy the skill folder (.claude/skills/add-refactoring in dotnet/roslynator) into .agents/skills/add-refactoring in your project. Codex loads it when a task matches its description.

Can I use Add Refactoring in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/roslynator --skill add-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/add-refactoring, .gemini/skills/add-refactoring, .github/skills/add-refactoring and .opencode/skills/add-refactoring in your project.

What does Add Refactoring need to run?

Going by SKILL.md and its folder, Add Refactoring needs the command-line tools its instructions call (pwsh and dotnet).

Does Add Refactoring access the network?

SKILL.md names 1 domain. In commands or code: josefpihrt.github.io; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Add Refactoring safe to install?

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.

What licence does Add Refactoring use?

Add Refactoring has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Add Refactoring use?

About 946 tokens (SKILL.md is roughly 3.8k 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 553 tokens, read only when the agent opens those files.

What are the alternatives to Add Refactoring?

Skills that share tags, products or a category with Add Refactoring: Dynamo Dotnet Expert (DynamoDS/Dynamo, 2k stars), Okojo Test262 (akeit0/okojo, 160 stars), Dotnet10 Features (runceel/ReactiveProperty, 944 stars) and Refactor Analysis (Samsung/TizenFX, 214 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Refactoring?

dotnet (a GitHub organization, an official publisher) maintains it in dotnet/roslynator, which has 3,485 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 4, 2026.

Source: dotnet/roslynator on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.