roslyn-codelens

roslyn-codelens is a skill for Claude Code from MarcelRoozekrans/roslyn-codelens-mcp. It costs 104 tokens per session (11,724 once invoked), scanned A, original, MIT.

A set of tools for understanding .NET and C# code using its program structure, not only text searches. It can locate references and callers, inspect compiler diagnostics and dependency-injection registrations, and identify issues such as unused code or circular dependencies.

In plain words
What is it for?
Use it to find where types and methods are used, inspect implementations and registrations, diagnose builds, trace calls, detect unused code or dependency cycles, and review code complexity.
Why use it?
It makes it easier to understand how C# code is connected and to find problems that simple text searches can miss. It also gathers build errors, warnings, and code-quality findings in one place.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the roslyn-codelens plugin — 1 skill shipped together

Good fit Use it to find where types and methods are used, inspect implementations and registrations, diagnose builds, trace calls, detect unused code or dependency cycles, and review code complexity.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/marcelroozekrans/roslyn-codelens-mcp/roslyn-codelens
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add MarcelRoozekrans/roslyn-codelens-mcp --skill roslyn-codelens
Clone the repo
git clone --depth 1 https://github.com/MarcelRoozekrans/roslyn-codelens-mcp

Made for: Claude Code.

Or install roslyn-codelens, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for roslyn-codelens

README.md
[![agentmods](https://agentmods.dev/badge/skills/marcelroozekrans/roslyn-codelens-mcp/roslyn-codelens/github.svg)](https://agentmods.dev/skills/marcelroozekrans/roslyn-codelens-mcp/roslyn-codelens)
Your own site
<a href="https://agentmods.dev/skills/marcelroozekrans/roslyn-codelens-mcp/roslyn-codelens"><img src="https://agentmods.dev/badge/skills/marcelroozekrans/roslyn-codelens-mcp/roslyn-codelens/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for roslyn-codelens

Your own site · 80×15
<a href="https://agentmods.dev/skills/marcelroozekrans/roslyn-codelens-mcp/roslyn-codelens"><img src="https://agentmods.dev/badge/skills/marcelroozekrans/roslyn-codelens-mcp/roslyn-codelens.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 11,724 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00104 $0.11724
Opus 5 $0.00052 $0.05862
Sonnet 5 $0.00021 $0.02345
Haiku 4.5 $0.00010 $0.01172

Measured 11d ago against content hash e730340cf8b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

roslyn-codelens scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/roslyn-codelens/skills/roslyn-codelens/SKILL.md · 482 lines

How it starts

The opening of the file, as written. The whole thing — 482 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Roslyn CodeLens — Semantic .NET Intelligence

Response shape

All list-returning tools wrap their results in an envelope:

{
  "items": [...],
  "totalCount": 142,
  "truncated": false,
  "limit": 500,
  "summary": { ... }
}

When truncated is true, items are the top N by the tool's natural sort order (severity-first, worst-first, by-project, etc.) — usually that's what you want. Raise limit only if the truncated tail matters for the task.

Tools that include a summary aggregate:

  • get_diagnostics{ error, warning, info, hidden } counts
  • find_references{ byProject: { name: count }, byKind: { kind: count } }
  • find_callers, find_attribute_usages{ byProject: { name: count } }
  • search_symbols, find_reflection_usage{ byKind: {...} }
  • find_unused_symbols{ byKind: {...}, filteredOut: { testMethod, testContainer, mcpTool, generated, composition, interop } }
  • find_naming_violations{ byRule: {...} }
  • get_complexity_metrics{ max, avg, overThreshold, maxCognitive }max/avg/overThreshold describe whichever metric metric selected; maxCognitive is always the cognitive one
  • resolve_stack_trace{ byOrigin: { source, metadata, unresolved }, exceptions, skippedFrameLike }skippedFrameLike counts frame-like-but-unparseable lines (also present in items as Kind="unknown")

Single-object tools (get_type_overview, get_symbol_context, apply_code_action, etc.) are unchanged — they return their bespoke shape directly.

Error responses

When a tool can't proceed, the response is isError: true with content carrying a JSON body of { code, message, details? }. Switch on code:

Code Meaning Common source
SymbolNotFound type/method/property not resolved analyze_method, get_symbol_context, get_type_overview, get_type_hierarchy, generate_test_skeleton
SolutionNotTrusted analyzers blocked until trust_solution is called get_diagnostics (includeAnalyzers: true), get_code_fixes
AmbiguousMatch name matched multiple solutions; details.matches lists candidates set_active_solution, unload_solution
FileNotFound file path / baseline doesn't exist or isn't in solution get_file_overview, find_breaking_changes
ProjectNotFound solution name didn't match set_active_solution, unload_solution
InvalidArgument malformed / unsupported caller input various
Internal unexpected; message carries exception text fallback

Read the full file on GitHub · 482 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 482 lines · 104 tokens per session scan A e730340cf8b0

Subscribe to this mod's changes

roslyn-codelens is a skill published in the GitHub repository MarcelRoozekrans/roslyn-codelens-mcp (48 stars, last pushed today), licensed MIT. It adds 104 tokens to every session and 11,724 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

profiling

Use the free official .NET diagnostics CLI tools for profiling and runtime investigation in .NET repositories. USE FOR: the repo needs performance or runtime profiling for a .NET application; the user asks about slow code, high CPU, GC pressure, allocation growth, exception storms, lock. DO NOT USE FOR: replacing…

managedcode/dotnet-skills · 119 tokens

cs0618-hunter

Detects and fixes CS0618 obsolete API warnings in .NET builds. The compiler is the authoritative source for what your project actually triggers — it catches transitive obsoletions, overload-resolution surprises, and project-local [Obsolete] attributes that static inspection cannot see. Pair with the repository-pinned…

joslat/maf-doctor · 85 tokens

nuget-diff-analyzer

Post-processes the repository-pinned [email protected] -- diff output into a categorised report (breaking / additive / newly-obsolete) with each finding cross-referenced to the MAF obsolete-API registry.

joslat/maf-doctor · 56 tokens

dotnet-performance

Evidence-first performance engineering workflow for coding agents combining portable .NET diagnostics with platform-native profiling, BenchmarkDotNet, application benchmarking, statistical validation, deployment, container, graphics, and GPU procedures.

wieslawsoltes/Performance-Skill · 42 tokens

rider-search

Routing rules for code search in JetBrains Rider projects — use the Rider MCP symbol/reference/file tools instead of Bash grep. Use whenever searching for a symbol, definition, function, variable, type, or finding usages/references in a C#/.NET or Unreal C++ codebase open in Rider.

JSungMin/rider-mcp-enforcer · 60 tokens

dotnet-debugging

Debug .NET applications using debug-mcp MCP tools — launch processes, set breakpoints, step through code, inspect variables, evaluate expressions, and analyze exceptions. Use this skill when debugging .NET/C# applications, investigating runtime behavior, diagnosing exceptions, inspecting object state, or performing…

jkolo/debug-mcp · 70 tokens