writing-csharp

writing-csharp is a skill for Claude Code, Codex from alexei-led/cc-thingz. It costs 99 tokens per session (769 once invoked), scanned A, original, MIT.

A set of guidelines for writing and changing C# and .NET software, including web apps, libraries, command-line tools, background workers, and tests. It adapts to the project’s existing settings, structure, test framework, and coding style.

In plain words
What is it for?
Use it when creating, reviewing, or modifying C# files, project or solution files, ASP.NET Core applications, .NET tools, workers, and unit tests.
Why use it?
It reduces avoidable C# problems such as unchecked null values, weak boundary validation, unnecessary dependencies, and slow or unfocused testing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating, reviewing, or modifying C# files, project or solution files, ASP.NET Core applications, .NET tools, workers, and unit tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alexei-led/cc-thingz/writing-csharp
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 alexei-led/cc-thingz --skill writing-csharp
Clone the repo
git clone --depth 1 https://github.com/alexei-led/cc-thingz

Made for: Claude Code, Codex.

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 writing-csharp

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-csharp.svg)](https://agentmods.dev/skills/alexei-led/cc-thingz/writing-csharp)
Your own site
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/writing-csharp"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-csharp.svg" alt="Measured on agentmods" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 769 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.00099 $0.00769
Opus 5 $0.00049 $0.00385
Sonnet 5 $0.00020 $0.00154
Haiku 4.5 $0.00010 $0.00077

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

Security

Grade A, and why

writing-csharp 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 7d 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.

src/skills/writing-csharp/SKILL.md · 67 lines

How it starts

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

C# /.NET Development

Use only for C# and .NET code. Follow the project's SDK, target frameworks, nullable settings, analyzer config, test stack, and local conventions.

Read First

Read principles.md before writing, changing, or reviewing C# code. Read conditional references only when the change touches that area.

Conditional References

  • patterns.md — solution layout, ASP.NET Core boundaries, DI, EF access, config, and worker patterns.
  • testing.md — adding or reshaping xUnit, NUnit, or MSTest coverage; keep the local dotnet test loop fast.
  • linting.md — changing dotnet format, analyzers, warning policy, or slow verification flow.
  • cli.md — writing or changing .NET CLIs.

Project Baseline

  • Inspect the nearest *.csproj, Directory.Build.props, global.json, solution file, CI, and nearby code before using SDK- or framework-specific APIs.
  • Keep nullable reference types enabled. Fix the warning or model, not the warning level.
  • Prefer the BCL and existing NuGet packages before adding a dependency.
  • Use the existing app style: ASP.NET Core controllers vs minimal APIs, records vs classes, MediatR or no mediator, EF or raw SQL, and the configured test framework.

Comments and XML Docs

  • Use XML documentation comments for public APIs when the project emits API docs or enforces CS1591.
  • Summarize contracts, invariants, edge cases, and effects. Do not restate member names or signatures.
  • Use // for brief implementation notes; avoid long /* */ explanations.
  • Keep comments short. Move longer rationale to docs, issue links, or design notes.
  • Do not comment obvious code.
  • Keep tests readable without comments; add one only for unobvious fixtures, timing, concurrency, external services, or regression context.

Verification

Run focused dotnet checks while editing, then the project-configured build, tests, analyzers, and formatting checks before final output. Prefer the narrowest useful project or solution target for the hot loop, then the broader configured command before final output.

Read the full file on GitHub · 67 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 67 lines · 99 tokens per session scan A 2aea31005a07

Subscribe to this mod's changes

writing-csharp is a skill published in the GitHub repository alexei-led/cc-thingz (35 stars, last pushed 1mo ago), licensed MIT. It adds 99 tokens to every session and 769 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

dotnet-backend-expert

This skill should be used when the user is writing, reviewing, debugging, or architecting pure .NET backend code for Kestrel-hosted services. It provides expert critique for REST endpoints, SignalR hubs, TypeScript/React client integration shape, pragmatic Rust interop, application services, AppHost-aware project…

mathisk2095/jko-claude-plugins · 181 tokens

dotnet-analyzers

Run dotnet format to fix code style and analyzer diagnostics (IDE0005, CA, SA). Use when fixing unnecessary usings, code style violations, analyzer warnings, or verifying format compliance.

NikiforovAll/claude-code-rules · 45 tokens

dotnet-dependency

This skill should be used when investigating .NET project dependencies, understanding why packages are included, listing references, or auditing for outdated/vulnerable packages.

NikiforovAll/claude-code-rules · 35 tokens

dotnet-test

This skill should be used when running .NET tests selectively with a build-first, test-targeted workflow. Use it for running tests with xUnit focus.

NikiforovAll/claude-code-rules · 35 tokens

dotnet-inspect

Query .NET APIs across NuGet packages, platform libraries, and local files. Search for types, list API surfaces, compare and diff versions, find extension methods and implementors. Use whenever you need to answer questions about .NET library contents.

NikiforovAll/claude-code-rules · 54 tokens

dotnet-run-file

Run script-like CSharp programs using dotnet run file.cs. Use this skill when users want to execute CSharp code directly, write one-liner scripts via stdin, or learn about run file directives.

NikiforovAll/claude-code-rules · 46 tokens