
Roslyn codelens
Gives agents semantic .NET/C# code intelligence via Roslyn instead of grep or builds
Roslyn codelens is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 78
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Roslyn codelens
This skill steers an AI coding agent away from text search and full builds when working on C# solutions, and toward the roslyn-codelens MCP server's tools. It sets out a set of rules: symbol lookups, caller and reference searches, implementation discovery and compiler diagnostics all go through semantic tools rather than Grep, Glob or dotnet build.
The skill is mostly a decision guide. It maps common questions, such as who calls a method, what implements an interface, or what a stack trace points to, onto the matching MCP tool, and explains how to read tool envelopes, error codes and trust prompts for analyzer diagnostics. It also covers planning changes, refactoring through rename and signature tools, and audits for dead code, async misuse, disposable leaks and layering violations.
It expects a .NET codebase and the roslyn-codelens MCP server to be available. If those tools are missing, the skill does nothing. The skill file itself is a single SKILL.md with no bundled scripts.
When your agent uses it
Use when working with any .NET / C# code (.cs/.csproj/.sln/.slnx files), finding callers/references/implementations, checking compiler errors or warnings, running dotnet build for diagnostics, searching for a type/method/interface by name, inspecting DI registrations, detecting dead code or circular dependencies, inspecting source-generator output, or about to Grep/Glob across a C# codebase — activates when roslyn-codelens MCP tools are available.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (52 KB) on GitHub on 2 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the roslyn-codelens plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add MarcelRoozekrans/roslyn-codelens-mcp
/plugin install roslyn-codelens@roslyn-codelens-mcpOr copy only this skill to ~/.claude/skills/roslyn-codelens:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/MarcelRoozekrans/roslyn-codelens-mcp.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/roslyn-codelens &&
cp -R "$tmp/plugins/roslyn-codelens/skills/roslyn-codelens" ~/.claude/skills/roslyn-codelens &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/roslyn-codelens inside it instead.
Copy the skill folder to ~/.agents/skills/roslyn-codelens to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/MarcelRoozekrans/roslyn-codelens-mcp.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/roslyn-codelens &&
cp -R "$tmp/plugins/roslyn-codelens/skills/roslyn-codelens" ~/.agents/skills/roslyn-codelens &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/roslyn-codelens inside it instead.
Copy the skill folder to ~/.cursor/skills/roslyn-codelens to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/MarcelRoozekrans/roslyn-codelens-mcp.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/roslyn-codelens &&
cp -R "$tmp/plugins/roslyn-codelens/skills/roslyn-codelens" ~/.cursor/skills/roslyn-codelens &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/roslyn-codelens inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/MarcelRoozekrans/roslyn-codelens-mcp.git --path plugins/roslyn-codelens/skills/roslyn-codelensOr copy the folder to ~/.gemini/skills/roslyn-codelens yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/roslyn-codelens:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/MarcelRoozekrans/roslyn-codelens-mcp.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/roslyn-codelens &&
cp -R "$tmp/plugins/roslyn-codelens/skills/roslyn-codelens" ~/.copilot/skills/roslyn-codelens &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/roslyn-codelens inside it instead.
Get the folder:
git clone --depth 1 https://github.com/MarcelRoozekrans/roslyn-codelens-mcp.gitThen copy roslyn-codelens-mcp/plugins/roslyn-codelens/skills/roslyn-codelens into your agent's skills folder as roslyn-codelens. Agents that support SKILL.md read one folder per skill.
What it does
- Symbol and reference lookup
- Routes finding types, callers, implementations and usages to semantic Roslyn queries.
- Compiler diagnostics
- Replaces dotnet build runs with structured compiler and analyzer diagnostics.
- Safe refactoring tools
- Covers solution-wide rename and parameter signature changes with preview and conflict checks.
- Code quality audits
- Points to tools for dead code, complexity, async misuse, and disposable leaks.
- Exception analysis
- Traces what exceptions a method can throw and where they are caught.
- Analyzer trust handling
- Explains when to ask the user before trusting a solution for analyzer execution.
Good for
- Find every implementation of an interface across the solution
- Show all compiler errors without running dotnet build
- Rename a class and update every reference safely
- Find sync-over-async calls and missing awaits
- Map a pasted .NET stack trace to source lines
- Check whether a layer references a forbidden namespace
Roslyn codelens FAQ
Does Roslyn codelens require anything to be installed?
It needs the roslyn-codelens MCP tools to be available. If find_implementations is not exposed as a tool, the skill stays inactive.
Does Roslyn codelens replace dotnet build?
For finding compiler errors, warnings and analyzer results, the skill directs the agent to get_diagnostics instead. Building to produce binaries, run tests or package remains outside its scope.
Will Roslyn codelens change my code on its own?
Refactoring tools such as rename_symbol and change_signature preview changes by default and apply them only when asked, with conflict and freshness checks.
Does analyzer analysis run without asking?
Analyzer diagnostics run analyzer DLLs as in-process code, so the skill tells the agent to ask the user before trusting a solution.
How do I install Roslyn codelens in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/roslyn-codelens to use it in all your projects, or to .claude/skills/roslyn-codelens in one project. Or install the roslyn-codelens plugin, which includes it: /plugin marketplace add MarcelRoozekrans/roslyn-codelens-mcp, then /plugin install roslyn-codelens@roslyn-codelens-mcp.
Does Roslyn codelens run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Roslyn codelens?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Roslyn codelens?
The closest alternatives to Roslyn codelens are Roslynk, Roslyn analyzers, Go semantic tools, Entroly context control and Semantic kernel.
Where this comes from
- Description: from the skill's own SKILL.md.





