Agent skill

Roslynk

by mrpmorris in mrpmorris/Roslynk

How to use the Roslynk MCP tools (mcproslynk) effectively for .NET work.

MITAuto-check passedDevelopment

Install Roslynk

skills CLI
$ npx skills add mrpmorris/Roslynk --skill roslynk -a claude-code

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

GitHub CLI
$ gh skill install mrpmorris/Roslynk roslynk --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/mrpmorris/Roslynk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/roslynk .claude/skills/roslynk && 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
roslynk
GitHub stars
132
Token cost
~3.3k tokens
SKILL.md length
1,746 words
Files
2 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

How to use the Roslynk MCP tools (mcproslynk) effectively for .NET work.

  • Works in 4 steps: Call open_solution with the absolute… → While loading, other tools return… → open_solution is idempotent and the… → …
  • Tasks that involve Refactoring
  • SKILL.md covers Solution setup, Choose semantic tools over…, Combine tools, don't chain calls and Preview broad edits before…, plus 3 more sections
  • Calls dotnet

What it does

Roslynk is an agent skill from mrpmorris/Roslynk. How to use the Roslynk MCP tools (mcproslynk) effectively for .NET work. Use this whenever a Roslynk server is connected and the task touches .cs, .cshtml or .razor files in a solution — checking for compile errors or warnings, finding a symbol's definition, references, callers, or implementations, renaming symbols, applying code fixes or refactorings, finding dead code, or editing those files — even if the user never says "Roslynk". Consult it before reaching for grep, file reads, hand-written edits, or dotnet…

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

It sits in Development, covering Refactoring and MCP servers. It works with .NET and Model Context Protocol. The licence is MIT.

When your agent uses it

  • Tasks that involve Refactoring
  • Tasks that involve MCP servers

Example prompts

  • “Roslynk”
  • “/roslynk”

Workflow steps

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

  1. Call open_solution with the absolute path to the .sln/.slnx. It returns immediately and loads in the background; the returned solutionId…
  2. While loading, other tools return error=Indexing — retry the call shortly, or poll get_solution_status (~1s) and report progress. Do not…
  3. open_solution is idempotent and the daemon keeps solutions warm across sessions — calling it again is cheap and safe.
  4. Never call reload_solution on your own initiative: the file watcher picks up all changes, including your own edits, and a generator…

What it can do on your machine

Read from SKILL.md and the folder at commit ec7e8cb. 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:

    • dotnet

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

  • Network

    No URLs in SKILL.md.

    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

Roslynk loads about 3.3k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 158 tokens; SKILL.md has 1,746 words of instructions outside code blocks.

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

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

The full file from mrpmorris/Roslynk at commit ec7e8cb, republished under its MIT licence (© mrpmorris). 1,746 words, ~3,334 tokens.

Download SKILL.mdSave it as .claude/skills/roslynk/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
roslynk
description
How to use the Roslynk MCP tools (mcp__roslynk__*) effectively for .NET work. Use this whenever a Roslynk server is connected and the task touches *.cs, *.cshtml or *.razor files in a solution — checking for compile errors or warnings, finding a symbol's definition, references, callers, or implementations, renaming symbols, applying code fixes or refactorings, finding dead code, or editing those files — even if the user never says "Roslynk". Consult it before reaching for grep, file reads, hand-written edits, or `dotnet build` on such files: Roslynk's semantic tools are faster and more correct for all of those jobs.

Using Roslynk

Roslynk is an MCP server holding a live Roslyn compilation of a .NET solution. The questions you'd normally answer with grep, file reads, or dotnet build — "where is this used?", "does it compile?", "rename this safely" — it answers from the compiler's symbol model instead. Text search lies: it hits comments, strings and unrelated same-named members, and misses partial classes, generated code and #if branches. Roslynk doesn't.

Default to Roslynk for all semantic work on *.cs, *.cshtml and *.razor files in the loaded solution. Plain file tools remain only for what Roslynk doesn't cover: files outside the solution folder, file creation/deletion, and non-compiled files (.csproj, .json, .md — still editable safely via apply_patch).

Tools that take a documentPath accept .razor and .cshtml files as well as .cs: give positions in the Razor file itself, inside its C# (@code/@functions, @{ }, expressions). Edits are written back to the Razor source in the file's own indentation; renames and other edits that reach a @bind-X="Expr" attribute's generated lambdas update the Razor source once at the attribute itself. Analyzer (IDE*/CA*) fixes are not available in Razor files, and _Imports.razor/_ViewImports.cshtml usings are never removed. get_diagnostics also reports the Razor compiler's own RZ* errors against the Razor file. In a .cshtml view where a new method cannot be added, extract_method suggests asLocalFunction=true.

Each tool's exact contract — parameters, output format, limits, error codes — lives in that tool's own MCP description. This skill covers when to use the tools and how to combine them; references/tools.md holds the deeper reference (exact output envelopes, #if projection mechanics) for when a tool's behavior surprises you.

Solution setup

  1. Call open_solution with the absolute path to the .sln/.slnx. It returns immediately and loads in the background; the returned solutionId is the handle every other tool needs.
  2. While loading, other tools return error=Indexing — retry the call shortly, or poll get_solution_status (~1s) and report progress. Do not fall back to reading or editing files directly; loading finishes within seconds to a minute. If open_solution reports loadDiagnostics above 0, call get_solution_status to read the messages (skipped analyzers, failed project loads): they often explain confusing compiler errors. A missing generator DLL names the project to build: once built (in the configuration its path names, normally Debug), the next call compiles with its generated code, no reload needed.
  3. open_solution is idempotent and the daemon keeps solutions warm across sessions — calling it again is cheap and safe.
  4. Never call reload_solution on your own initiative: the file watcher picks up all changes, including your own edits, and a generator project built or rebuilt after load is picked up on the next call. If results look stale (branch switch, dotnet restore, SDK/props change, a rebuilt analyzer from a NuGet package or outside the solution), suggest it to the user.
You want to...UseWhy not grep / reading files
Check it compiles / see warningsget_diagnostics, once after the task's editsfar faster than dotnet build, but still costly per call
Find where a symbol is used, or who calls itfind_references / get_callerstext search finds false hits and misses partial classes, generated code, #if branches
See what a member calls (its callees)get_calleesreading the body and tracing each call by eye misses overloads and extension-method bindings
Find where a field, property or parameter is read or written (assign, +=, ++, ref/out, initialisers)find_reads / find_writestext search cannot tell a read from a write; compound/increment/ref appear in both results, so do not add the counts
Jump from a usage to its declarationfind_definitioncompiler binding; correct through overloads and shadowing
Know what an expression means before editing it (type, overload chosen, nullability, constant, conversion)get_expression_infovar, overloads, implicit conversions and nullable flow are invisible in the text
Find implementations of an interface/abstract memberfind_implementationscompiler's type graph
See a type's members (and their local functions) / what a name refers toget_members / get_symbolcompiler's view; correct across partial classes
Read a member's implementation (incl. a partial method's implementation part)get_symbol_bodyreturns the declaration verbatim; a path marked generated=Y is virtual - read it with this tool, not from disk
Explore base/derived typesget_type_hierarchyincludes referenced-assembly base types
Find a symbol by partial namesearch_symbolscompiler-declared symbols
Rename a symbol everywhere (incl. .razor/.cshtml)rename_symbolfind-and-replace misses markup and same-named text
Rename one parameter of a method/constructor/indexerrename_parameteralso fixes named arguments, <paramref> docs and the override/interface family
Fix a diagnostic get_diagnostics reported (incl. .razor/.cshtml)apply_code_fix with that entry's id, line and column; on error=Conflict, ask the user which candidate, unless the request names one, then apply_code_action with its actionIdhand-editing
Apply a refactoring, or choose among fixes at a positionget_code_actions + apply_code_actionhand-editing
Add a parameter to a method and its callers (incl. .razor/.cshtml)change_signaturehand-editing misses call sites in markup
Extract statements or an expression into a new method (incl. @code/@functions)extract_methodhand-cutting code misses parameters, ref/out and return values
Edit source or text filesapply_patchkeeps the in-memory model in sync; stale-guarded
Remove unused usings / find dead coderemove_unused_usings, find_dead_code, find_dead_conditionalseyeballing

A fix must keep the code's declared intent: never hand-edit or apply_patch to make a diagnostic go away, and don't remove an interface, base type, member, attribute or other declaration to silence an error unless the user asks for that.

All name arguments are fully-qualified (Namespace.Type or Namespace.Type.Member, with an optional parameter-type list to target one overload). A local function is a member of the method declaring it: Namespace.Type.Method.local, or Namespace.Type.Method.outer.inner when nested; put a parameter list on any segment to pick an overload (Namespace.Type.Method(int).local). On error=Ambiguous or error=NotFound the response lists candidate= lines that are exact names the same tool accepts — copy one back verbatim rather than guessing.

Show full SKILL.md (802 more words)Show less

Combine tools, don't chain calls

When you need several facts before making a change, send them as one multi_query call instead of sequential calls: every operation runs against a single snapshot, so the facts can never disagree with each other. multi_query accepts only the read-only query tools, and each operation uses exactly that tool's own parameter names — a wrong key is error=Invalid naming the key, never silently ignored. Over 25 operations or the output budget, remaining slots return error=Truncated with truncatedSlots=<n>: re-send exactly those operations, passing the response's snapshot= value as expectSnapshot, so a continuation that would straddle a solution change is refused with error=Stale instead of mixing states. The envelope format is in the multi_query section of references/tools.md.

Impact analysis — before renaming a symbol or changing a signature, and whenever someone asks "what uses X", "who calls X", "what breaks if I change X": batch get_symbol + find_references + get_callers + get_callees + find_implementations + get_type_hierarchy in one call, pointing each at the member or type you're changing (get_callers takes methodName, get_callees takes memberName, get_type_hierarchy takes typeName, the others symbolName). get_callers and get_callees are inverses — who calls this member, what does this member call — so alternating them walks a call chain one hop per query. Then follow each reference with get_symbol_body to read the calling convention before editing. Answer with Roslynk, never with grep over *.cs/*.cshtml/*.razor — text search both misses real usages and wrongly matches identically-named symbols.

Understand before editing — when an edit depends on what an expression is (the type behind var, which overload a call picks, whether a value can be null at that point, whether a conversion is implicit or user-defined), call get_expression_info on its position instead of inferring from text; on a declared name (e.g. the x of var x = ...) it reports the declared symbol and its type, like an editor hover. It distinguishes the expression's type from the symbol it binds to — both can matter — and reports a missing fact as none rather than guessing; symbol=none with candidateReason/candidates means the call does not resolve. Batch several positions in one multi_query.

Results are snapshots of a solution that is edited live: re-query after any write rather than reusing an earlier response.

Preview broad edits before writing

Every write tool takes checkOnly=true, which returns the changed-file list without writing anything. Use it whenever a change might be broad — a rename of a widely-used symbol, a whole-solution cleanup — and confirm the scope before applying. Write tools are atomic and stale-guarded: if a target file changed on disk since Roslynk read it, the whole operation is rejected with error=Stale and nothing is written — recompute from current state and retry. Writes go straight to disk and advance the in-memory model immediately, so no reload or rebuild is ever needed afterwards.

Rename parameters with Roslyn

To rename a parameter, call rename_parameter with the declaring member's methodId (add the parameter-type list when overloaded; a constructor is Namespace.Type.Type(int)), the current parameterName and newName. It updates named arguments at call sites and <paramref> docs, and renames the same parameter across overrides, interface members and implementations that use the same old name - check renamedMembers and unchangedRelated in the response to see what was and wasn't cascaded. On error=Conflict pick a name not already used inside the member. Prefer it over rename_symbol for parameters, which cannot target a parameter by name.

Extract methods with Roslyn

To pull code into its own method, call extract_method with the selection (1-based; end column exclusive - endLine+1, column 1 takes whole lines) and a methodName; add asLocalFunction=true for a local function. Preview with checkOnly=true to see the signature and call Roslyn chose. It writes nothing when the selection cannot be extracted safely or the result would not compile - read the NotSupported reason and adjust the selection (whole statements from one block, or one complete expression) rather than extracting by hand.

Check diagnostics once a task's edits are done

The core edit cycle: make all the changes the task needs (any write tools) → get_diagnostics once at the end (bare call; the header always reports error/warning/info/hidden counts; each call compiles and analyzes everything the edits affect, so do not run it after every edit) → if counts are non-zero, re-call with includeErrors=true to see the details → fix each entry via apply_code_fix with its id, line and column → if that returns error=Conflict with candidate= lines, the diagnostic has several fixes: pick the one whose title matches your intent and pass its actionId (the text before the first comma) to apply_code_action; do not retry apply_code_fix → repeat until clean. This replaces dotnet build during development. Pass includeAnalyzers=false for a faster compiler-only pass when style rules don't matter yet.

find_dead_code and find_dead_conditionals never delete anything — treat the results as candidates (public or reflection-used API can be a false positive), confirm intent with the user before bulk-removing, and hand each reported loc span to apply_patch.

© mrpmorris, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/roslynk of mrpmorris/Roslynk.

  • SKILL.md
  • references/tools.md

Open the folder on GitHubat commit ec7e8cb

Compare with similar skills

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

Roslynk compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Roslynk this skillmrpmorris/Roslynk132—~3.3kAutomated safety check: PassMIT
Dotnet Debuggingnovotnyllc/dotnet-artisan232—~2.1kAutomated safety check: PassMIT
Idea MCPdtprj/dongting208—~698Automated safety check: PassApache-2.0
Code Reviewsbroenne/mcp-windows110—~1.6kAutomated safety check: PassMIT
MCP Refactoringadeze/raindrop-mcp188—~972Automated safety check: PassMIT
Trace-MCP Refactoringnikolai-vysotskyi/trace-mcp189—~672Automated safety check: PassMIT

Similar skills

  • Dotnet Debugging

    novotnyllc/dotnet-artisan

    Debugs Windows and Linux/macOS applications (native, .NET/CLR, mixed-mode) with WinDbg MCP (crash dumps, !analyze, !syncblk, !dlk, !runaway, !dumpheap, !gcroot, BSOD), dotnet-dump, lldb with SOS…

    232 GitHub stars~2.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Idea MCP

    dtprj/dongting

    IntelliJ IDEA MCP for Java code analysis, testing, refactoring, and project navigation.

    208 GitHub stars~698 tokensUpdated today
    DevelopmentAuto-check passed
  • Code Review

    sbroenne/mcp-windows

    Review pull requests in mcp-windows for concrete bugs in MCP and CLI contracts, Windows UI automation, element identity, snapshots, bounded searches, and service lifetime.

    110 GitHub stars~1.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • MCP Refactoring

    adeze/raindrop-mcp

    Refactoring MCP Tools for Better LLM Integration and Usability

    188 GitHub stars~972 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Trace-MCP Refactoring

    nikolai-vysotskyi/trace-mcp

    Refactors code safely in projects indexed by trace-mcp: assess risk, find candidates, check impact and rename symbols across every file without missing a reference.

    189 GitHub stars~672 tokensUpdated today
    DevelopmentAuto-check passed
  • Memtrace Decision Memory

    syncable-dev/memtrace-public

    Use Cortex decision memory through the normal Memtrace MCP tools.

    489 GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed

Categories

Questions about Roslynk

What does Roslynk do?

How to use the Roslynk MCP tools (mcproslynk) effectively for .NET work. Roslynk is an agent skill from mrpmorris/Roslynk.NET work.

When should I use Roslynk?

Roslynk fits situations like: tasks that involve Refactoring; tasks that involve MCP servers.

How do I install Roslynk in Claude Code?

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

How do I install Roslynk in Codex?

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

Can I use Roslynk 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 mrpmorris/Roslynk --skill roslynk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/roslynk, .gemini/skills/roslynk, .github/skills/roslynk and .opencode/skills/roslynk in your project.

What does Roslynk need to run?

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

Does Roslynk access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Roslynk 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 Roslynk use?

Roslynk is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Roslynk use?

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

What are the alternatives to Roslynk?

Skills that share tags, products or a category with Roslynk: Dotnet Debugging (novotnyllc/dotnet-artisan, 232 stars), Idea MCP (dtprj/dongting, 208 stars), Code Review (sbroenne/mcp-windows, 110 stars) and MCP Refactoring (adeze/raindrop-mcp, 188 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Roslynk?

mrpmorris (a GitHub user) maintains it in mrpmorris/Roslynk, which has 132 GitHub stars. The repository was last updated on October 9, 2026.

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