snippet-eval

snippet-eval is a skill for Claude Code from darylmcd/Roslyn-Backed-MCP. It costs 39 tokens per session (747 once invoked), scanned A, original, MIT.

A quick evaluator for checking or running a small piece of C# code without opening the whole solution. A solution is a collection of related C# projects.

In plain words
What is it for?
Use it to check syntax and meaning, test an expression or short script, or get feedback on a code fragment.
Why use it?
It gives feedback on isolated code when loading the full project is unnecessary or not possible.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the roslyn-mcp plugin — 44 skills, 5 agents, 2 hooks, 2 MCP servers shipped together

Good fit Use it to check syntax and meaning, test an expression or short script, or get feedback on a code fragment.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darylmcd/roslyn-backed-mcp/snippet-eval
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 darylmcd/Roslyn-Backed-MCP --skill snippet-eval
Clone the repo
git clone --depth 1 https://github.com/darylmcd/Roslyn-Backed-MCP

Made for: Claude Code.

Or install roslyn-mcp, the plugin that ships this one along with the rest of its 44 skills, 5 agents, 2 hooks, 2 MCP servers.

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 snippet-eval

README.md
[![agentmods](https://agentmods.dev/badge/skills/darylmcd/roslyn-backed-mcp/snippet-eval/github.svg)](https://agentmods.dev/skills/darylmcd/roslyn-backed-mcp/snippet-eval)
Your own site
<a href="https://agentmods.dev/skills/darylmcd/roslyn-backed-mcp/snippet-eval"><img src="https://agentmods.dev/badge/skills/darylmcd/roslyn-backed-mcp/snippet-eval/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 snippet-eval

Your own site · 80×15
<a href="https://agentmods.dev/skills/darylmcd/roslyn-backed-mcp/snippet-eval"><img src="https://agentmods.dev/badge/skills/darylmcd/roslyn-backed-mcp/snippet-eval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 747 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.
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.00039 $0.00747
Opus 5 $0.00019 $0.00374
Sonnet 5 $0.00008 $0.00149
Haiku 4.5 $0.00004 $0.00075

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

Security

Grade A, and why

snippet-eval 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 10d 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.

skills/snippet-eval/SKILL.md · 57 lines

How it starts

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

Snippet and Script Evaluation

You use analyze_snippet and evaluate_csharp for fast feedback when loading a full .sln is unnecessary or impossible.

Input

$ARGUMENTS should indicate either:

  • A short C# fragment to analyze or run, or
  • A file path to read and treat as snippet/script (if the user points at a scratch file)

Server discovery

Full solution workflows live in roslyn://server/catalog. This skill is for ephemeral analysis only.

When to use which tool

Goal Tool
Parse, bind, diagnostics on a fragment analyze_snippet
Run a script / evaluate an expression (side effects, output) evaluate_csharp
Production refactor / cross-file impact Load workspace with workspace_load and use symbol tools

Workflow

  1. For compile/bind questions: call analyze_snippet with the code and appropriate options (as exposed by the tool schema).
  2. For execution: call evaluate_csharp; warn the user that scripts run in a killable child process but remain inside the host's security trust boundary.
  3. If results imply real-project dependencies, recommend workspace_load on the actual solution.

Explain mode — semantic walk-through for teaching or learning

Invoke with --explain or ask "explain this snippet" / "what does this do?". The skill produces a step-by-step semantic walkthrough instead of a pass/fail result:

  1. Call analyze_snippet to bind the snippet and gather diagnostics.
  2. Call get_operations (if available) on the snippet to walk the IOperation tree — this yields the full semantic tree: local declarations, invocations, branches, loops, lambdas, await points.
  3. For each top-level construct (declaration, expression, statement):
    • Name the operation kind (e.g., LocalReference, InvocationOperation, ConditionalAccessOperation)
    • State the inferred type and (for numeric/string literals) the value
    • Explain data-flow implications: what variables are read, what gets assigned, what captures (for lambdas/closures)
  4. If the snippet uses await, show the async flow: where the state machine suspends, what continuation happens on completion vs exception.
  5. If the snippet uses LINQ, explain deferred vs immediate execution and what the query translates to.
  6. Conclude with a single-sentence summary: "This snippet X, producing Y, with no/these side effects."

Read the full file on GitHub · 57 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. 10d ago First seen · 57 lines · 39 tokens per session scan A 6d83f3ad567c

Subscribe to this mod's changes

snippet-eval is a skill published in the GitHub repository darylmcd/Roslyn-Backed-MCP (1 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 747 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

dotnet-reverse

A guide for analyzing compiled .NET and C# programs, including managed Windows executables and libraries. Reverse engineering means studying compiled software to understand how it works, and decompiling turns it back into readable approximate source code.

zhaoxuya520/reverse-skill · 144 tokens

check-bin-obj-clash

Detects MSBuild projects with conflicting OutputPath or IntermediateOutputPath. USE FOR: builds failing with 'Cannot create a file when that file already exists', 'The process cannot access the file because it is being used by another process', intermittent build failures that succeed on retry, or missing/overwritten…

dotnet/skills · 160 tokens

build-perf-diagnostics

Diagnose MSBuild build performance bottlenecks using binary log analysis. USE FOR: identifying why builds are slow by analyzing binlog performance summaries, detecting ResolveAssemblyReference (RAR) taking >5s, Roslyn analyzers consuming >30% of Csc time, single targets dominating >50% of build time, node utilization…

dotnet/skills · 160 tokens

dump-collect

Configure and collect crash dumps for modern .NET applications. USE FOR: enabling automatic crash dumps for CoreCLR or NativeAOT, capturing dumps from running .NET processes, setting up dump collection in Docker or Kubernetes, using dotnet-dump collect or createdump. DO NOT USE FOR: analyzing or debugging dumps…

dotnet/skills · 96 tokens

binlog-generation

Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. USE FOR: adding /bl:{} to any dotnet build, test, pack, publish, or restore command to capture a full build execution trace, prerequisite for binlog-failure-analysis and build-perf-diagnostics skills, enabling post-build investigation of errors…

dotnet/skills · 133 tokens

binlog-failure-analysis

Analyze MSBuild binary logs to diagnose build failures. USE FOR: build errors that are unclear from console output, diagnosing cascading failures across multi-project builds, tracing MSBuild target execution order, and generally any MSBuild build issues. Requires an existing .binlog file. DO NOT USE FOR: generating…

dotnet/skills · 79 tokens