writing-csharp

writing-csharp is a skill for Claude Code, Codex from alexei-led/cc-thingz. It costs 95 tokens per session (662 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/github.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/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 writing-csharp

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 662 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.00095 $0.00662
Opus 5.5 $0.00038 $0.00265
Sonnet 5.5 $0.00019 $0.00132
Haiku 4.5 $0.00010 $0.00066

Measured 2mo ago against content hash 6f32e08b4ac2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 2mo 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 · 35 lines

How it starts

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

C# /.NET Development

Check the nearest *.csproj, Directory.Build.props, global.json, and CI for TargetFramework(s), LangVersion, nullable context, and analyzer policy before using newer syntax. Without an explicit LangVersion, the C# version follows the TFM (net8.0 defaults to C# 12; net6.0 defaults to C# 10, which lacks primary constructors and collection expressions). Project conventions win over these defaults, and raising LangVersion or the TFM to unlock syntax is a separate decision — ask first, don't do it on your own.

Defaults

  • BCL and existing NuGet packages first. Keep the app's existing choices: controllers vs minimal APIs, DI container, ORM, test framework.
  • Nullable reference types stay on. Model absence with ?; handle a missing result explicitly (e.g. return NotFound/Problem) instead of !. Never suppress a warning; fix it at the source.
  • Async end to end: no .Result, .Wait(), or GetAwaiter().GetResult(). Pass CancellationToken through cancellable boundaries, including EF calls.
  • Never let a singleton capture a scoped service (e.g. a DbContext); use IServiceScopeFactory or IDbContextFactory when a singleton needs scoped data.
  • Validate request DTOs and message payloads at the handler before mapping to domain types; model binding alone is not validation. Return response DTOs from API boundaries, not entities.
  • Bind and validate options at startup (ValidateOnStart); inject typed options instead of reading config ad hoc.
  • Background services honor the stopping token; replace Thread.Sleep with a cancellable wait (Task.Delay with the token, or PeriodicTimer).

CLIs

  • Existing CLI stack first; the BCL is enough for small tools. Add System.CommandLine or Spectre.Console only when the command surface justifies it.
  • Keep Program.cs thin: test the command handler, or a Run(args, stdout, stderr) seam, and assert exit code and output with dotnet test --filter, including a non-zero exit and a stderr message on bad input.

Read the full file on GitHub · 35 lines

Files

What ships with it

3 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. 2mo ago Changed · -3 lines · -4 tokens per session 6f32e08b4ac2
  2. 2mo ago Changed · -29 lines fbea5f396872
  3. 3mo 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 (37 stars, last pushed yesterday), licensed MIT. It adds 95 tokens to every session and 662 once invoked, about $0.0004 per session on Opus 5.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

writing-csharp compared with skills from other repositories

writing-csharp next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
writing-csharpalexei-led/cc-thingzSkill37yesterdayMITA95Claude Code, Codex
refactoring-csharpCodeAlive-AI/ai-driven-developmentSkill1942d agoMITA60Claude Code
agent-csharp-reviewerKunanonJ/ai-skills-hubSkill52mo agoMITA45Claude Code, Codex
dotnet-backend-expertmathisk2095/jko-claude-pluginsSkill31mo agoMITA181Claude Code
analyzing-dotnet-performancedotnet/skillsSkill6.4ktodayMITA64Claude Code
coding-standardshashgraph-online/awesome-codex-pluginsSkill1.6ktodayApache-2.0A28Claude Code, Codex
code-review-csharppnp/copilot-promptsSkill913yesterdayMITA66Claude Code, Codex