dotnet-write

A controlled procedure for editing C# and .NET code, including changing methods, types, signatures, and symbols. It validates edits against an in-memory compilation before writing approved changes to disk.

In plain words
What is it for?
Use it to add, modify, refactor, rename, or delete C# code, and to fix compile errors or analyzer warnings while validating each edit.
Why use it?
It catches compilation problems before an edit is saved and keeps a clear record of how C# changes were made. It also provides a separate rename operation for safely changing symbol names.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/attemainio/dotnet-toolkit/dotnet-write
Any agent
npx skills add Attemainio/dotnet-toolkit --skill dotnet-write
Clone the repo
git clone --depth 1 https://github.com/Attemainio/dotnet-toolkit

Made for: Claude Code, Codex.

Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,713 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00107 $0.05713
Opus 5 $0.00053 $0.02857
Sonnet 5 $0.00021 $0.01143
Haiku 4.5 $0.00011 $0.00571

Measured 2d ago against content hash a09c9a3230d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dotnet-write 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 2d 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/dotnet-write/SKILL.md · 339 lines

How it starts

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

Changing C# with dotnet-toolkit

validate_patch is the only way to change a .cs file, and rename_symbol is the only way to rename one. Both apply your edit to a forked in-memory solution, compile it, and write to disk only if the result is genuinely sufficient. Disk is never touched otherwise.

An edit that bypasses them is a change whose reasoning is gone when the conversation ends — search_log cannot recover it, and the next session re-derives or silently contradicts it.

Edit/Write are for non-C# files (.csproj, .json, .md, .cmd) and for creating a new .cs file — after which that file goes through validate_patch like any other.

Tool names are prefixed mcp__plugin_dotnet-toolkit_dotnet__.

Step 0 — workspace_status before any edit

Call it first, every session, and again before editing after any git operation. It is free and takes no arguments. Three things depend on it:

  1. A patch built on a degraded or stale workspace is built on the wrong content. If workspace reports failed projects, fix the build and reload_workspace before patching — validation results from a degraded workspace may be silently wrong, not merely thin.

    validate_patch and rename_symbol now say so themselves, under limitedBy: "degraded", and a failure there points at workspace_status rather than at your patch. Believe it over the diagnostics: a half-loaded compilation reports errors your change never introduced, and "revise the patch" would send you to rewrite code that was already correct.

  2. pluginRoot, which is how you reach the coding standards below and any tool manual. Join it yourself: <pluginRoot>/standards/index.md, <pluginRoot>/docs/tools/validate_patch.md. Never write ${CLAUDE_PLUGIN_ROOT} into a path — it is not expanded inside a rule or an agent definition, so it stays literal and the read fails.

  3. Confirmation the index is ready, so get_references can tell you the blast radius rather than returning workspace_loading.

Read the full file on GitHub · 339 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. 2d ago First seen · 339 lines · 107 tokens per session scan A a09c9a3230d7

Subscribe to this mod's changes

dotnet-write is a skill published in the GitHub repository Attemainio/dotnet-toolkit (2 stars, last pushed 6d ago), licensed MIT. It adds 107 tokens to every session and 5,713 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-31.

Related

Other skills, from other repositories

vela

Compiler-exact code search for .NET solutions - find where a symbol is defined, every reference to it, who calls it, and what a change would break. Covers C#, VB, Razor Pages, MVC views and Blazor components, which grep and every other code-intelligence tool miss. Deterministic, built on Roslyn, never modifies the…

dbhq-uk/vela-skill · 164 tokens

codemeridian-refactor

Plan safer refactors with CodeMeridian by checking graph freshness, exact symbols, impact, tests, duplication, and architecture risk before editing.

Driftya/code-meridian · 34 tokens

codemeridian-test-planning

Plan focused tests with CodeMeridian by finding relevant test shields, coverage gaps, impacted behavior, and the smallest useful test set before implementation.

Driftya/code-meridian · 35 tokens

human-cognitive-seed

Preserve and strengthen the user's independent reasoning during design, strategy, learning, interpretation, hypothesis work, and consequential decisions, and preserve justified durable context with explicit provenance when supported. Use when a task benefits from human-led judgment, model-building, productive…

Driftya/code-meridian · 99 tokens

codemeridian-context

Gather minimal, graph-grounded CodeMeridian context before implementation, refactoring, deletion, debugging, or test planning.

Driftya/code-meridian · 29 tokens

codemeridian-frontend

Route frontend HTML/CSS/SCSS work through CodeMeridian's generic frontend-aware tools first, then use cascade and style-duplicate analysis only when the question is truly frontend-specific.

Driftya/code-meridian · 43 tokens