Agent skill

Csharp Conventions

by Goldziher in Goldziher/ai-rulez

C code conventions covering .NET 8+/C 12, nullable reference types, Roslyn analyzers, xUnit, record types, async/await discipline, and dependency security.

MITAuto-check passedTesting & QA

Install Csharp Conventions

skills CLI
$ npx skills add Goldziher/ai-rulez --skill csharp-conventions -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Goldziher/ai-rulez csharp-conventions --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Goldziher/ai-rulez.git skills-src && mkdir -p .claude/skills && cp -r skills-src/internal/builtins/languages/csharp/skills/csharp-conventions .claude/skills/csharp-conventions && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
csharp-conventions
GitHub stars
158
Token cost
~363 tokens
SKILL.md length
127 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

C code conventions covering .NET 8+/C 12, nullable reference types, Roslyn analyzers, xUnit, record types, async/await discipline, and dependency security.

  • Tasks that involve Async programming
  • Calls dotnet
  • Tasks that involve Unit testing

What it does

Csharp Conventions is an agent skill from Goldziher/ai-rulez. C code conventions covering .NET 8+/C 12, nullable reference types, Roslyn analyzers, xUnit, record types, async/await discipline, and dependency security. Load when writing or reviewing C code.

Its SKILL.md is about 360 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Async programming and Unit testing. It works with C# and .NET. The repository describes itself as: One source of truth for AI assistant configs: 14 built-in presets (Claude, Cursor, Copilot, Codex, Gemini, Xum, …), full-parity custom presets, and distributable plugin bundles… The licence is MIT.

When your agent uses it

  • Tasks that involve Async programming
  • Tasks that involve Unit testing

Example prompts

  • “/csharp-conventions”

What it can do on your machine

Read from SKILL.md and the folder at commit 01417cf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Csharp Conventions loads about 363 tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 127 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~363

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Goldziher/ai-rulez at commit 01417cf, republished under its MIT licence (© Goldziher). 127 words, ~363 tokens.

Download SKILL.mdSave it as .claude/skills/csharp-conventions/SKILL.md (or your agent's skills folder).
name
csharp-conventions
description
C# code conventions covering .NET 8+/C# 12, nullable reference types, Roslyn analyzers, xUnit, record types, async/await discipline, and dependency security. Load when writing or reviewing C# code.
  • .NET 8+ C# 12, file-scoped namespaces, primary constructors, <Nullable>enable</Nullable>.
  • Formatting: dotnet format + Roslyn analyzers, <TreatWarningsAsErrors>true</TreatWarningsAsErrors>.
  • Style enforcement: .editorconfig for consistent rules across team. Use an analyzer set (e.g., StyleCop.Analyzers or Roslynator).
  • Testing: xUnit with [Theory]/[InlineData], an assertion library (e.g., FluentAssertions), a coverage tool (e.g., coverlet) at 80%+.
  • Benchmarking: a benchmark harness (e.g., BenchmarkDotNet) for performance testing — never Stopwatch loops.
  • record types for immutable data, required properties, pattern matching in switch expressions.
  • Async: async/await throughout — never .Result or .Wait(), ValueTask for hot paths, avoid deadlocks.
  • Security: dotnet list package --vulnerable for CVE scanning. Zero tolerance for critical/high.
  • Dependencies: NuGet PackageReference, commit packages.lock.json, Directory.Build.props for shared config.
  • Collection expressions ([1, 2, 3]), required modifier, raw string literals for multi-line.
  • Anti-patterns: dynamic, object params, unguarded catch (Exception), #pragma warning disable.

© Goldziher, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in internal/builtins/languages/csharp/skills/csharp-conventions of Goldziher/ai-rulez.

Open the folder on GitHubat commit 01417cf

Compare with similar skills

Csharp Conventions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Csharp Conventions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Csharp Conventions this skillGoldziher/ai-rulez158—~363Automated safety check: PassMIT
Dotnet Backend Patternswshobson/agents40k8 repos~6.6kAutomated safety check: PassMIT
Csharp Rulessoftspark/ai-toolkit179—~3.5kAutomated safety check: PassApache-2.0
ScottPlot Test RunnerScottPlot/ScottPlot6.8k—~308Automated safety check: PassMIT
Verifyvaldisiljuconoks/LocalizationProvider180—~159Automated safety check: PassApache-2.0
Csharp Testingaffaan-m/ECC275k1 repos~2.2kAutomated safety check: PassMIT

Similar skills

  • Master C/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications.

    40k GitHub starsUsed in 8 repos~6.6k tokens
    Backend & APIsAuto-check passed
  • Csharp Rules

    softspark/ai-toolkit

    C/.NET coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~3.5k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • ScottPlot Test Runner

    ScottPlot/ScottPlot

    Run or add ScottPlot 5 tests. Use for unit-test and cookbook-test work; unless explicitly asked otherwise, restrict manual test execution to the Unit Tests…

    6.8k GitHub stars~308 tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Verify

    valdisiljuconoks/LocalizationProvider

    Build the solution and run unit tests to verify changes are correct.

    180 GitHub stars~159 tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Csharp Testing

    affaan-m/ECC

    C and .NET testing patterns with xUnit, FluentAssertions, mocking, integration tests, and test organization best practices.

    275k GitHub starsUsed in 1 repo~2.2k tokens
    Testing & QAAuto-check passed
  • Csharp Testing

    affaan-m/ECC

    xUnit、FluentAssertions、モッキング、統合テスト、テスト組織のベストプラクティスを使用したCと.NETのテストパターン。

    275k GitHub stars~2k tokensUpdated 3 days ago
    Testing & QAAuto-check passed

More from Goldziher/ai-rulez

All 11 skills in this repo
  • AI Rulez

    Goldziher/ai-rulez

    Manage AI assistant governance rules across 52 harnesses (Claude Code, Cursor, Codex, Copilot, Gemini CLI, OpenCode, Devin, and more) using ai-rulez.

    158 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Code Quality Standards

    Goldziher/ai-rulez

    Concrete code-quality thresholds and anti-patterns: 120-char lines, max 20 cyclomatic complexity, max 4 nesting levels, max 50 lines per function, no magic numbers, no global state, composition over…

    158 GitHub stars~486 tokensUpdated today
    Auto-check passed
  • Rust Conventions

    Goldziher/ai-rulez

    Rust code conventions covering edition 2024, cargo fmt/clippy, Result-based error handling, unsafe discipline, async with tokio, API-guideline naming, trait implementations, benchmarking, and…

    158 GitHub stars~746 tokensUpdated today
    Auto-check passed
  • Testing Conventions

    Goldziher/ai-rulez

    How to write a good test: behaviour-describing names (shouldreturnerrorwheninputisempty, givenwhenthen), exact-value assertions over truthiness, snapshot and property-based testing…

    158 GitHub stars~473 tokensUpdated today
    Auto-check passed
  • Vite Plus Conventions

    Goldziher/ai-rulez

    vite+ unified TypeScript toolchain conventions: the vp CLI for package/node management, oxlint/oxfmt, type-aware linting, vitest, rolldown/tsdown bundling, task caching, and migration.

    158 GitHub stars~567 tokensUpdated today
    Auto-check passed
  • Bindings

    Goldziher/ai-rulez

    Cross-language binding architecture rules: bindings as minimal glue, canonical API surface ordering (core, ABI, language), per-language test suites in CI, generated-code discipline, and error/async…

    158 GitHub stars~265 tokensUpdated today
    Auto-check passed

Works with

Questions about Csharp Conventions

What does Csharp Conventions do?

C code conventions covering .NET 8+/C 12, nullable reference types, Roslyn analyzers, xUnit, record types, async/await discipline, and dependency security. Csharp Conventions is an agent skill from Goldziher/ai-rulez.NET 8+/C 12, nullable reference types, Roslyn analyzers, xUnit, record types, async/await discipline, and dependency security.

When should I use Csharp Conventions?

Csharp Conventions fits situations like: tasks that involve Async programming; tasks that involve Unit testing.

How do I install Csharp Conventions in Claude Code?

Run `npx skills add Goldziher/ai-rulez --skill csharp-conventions -a claude-code`. Or copy the skill folder (internal/builtins/languages/csharp/skills/csharp-conventions in Goldziher/ai-rulez) into .claude/skills/csharp-conventions in your project. Claude Code loads it when a task matches its description.

How do I install Csharp Conventions in Codex?

Run `npx skills add Goldziher/ai-rulez --skill csharp-conventions -a codex`. Or copy the skill folder (internal/builtins/languages/csharp/skills/csharp-conventions in Goldziher/ai-rulez) into .agents/skills/csharp-conventions in your project. Codex loads it when a task matches its description.

Can I use Csharp Conventions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Goldziher/ai-rulez --skill csharp-conventions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/csharp-conventions, .gemini/skills/csharp-conventions, .github/skills/csharp-conventions and .opencode/skills/csharp-conventions in your project.

What does Csharp Conventions need to run?

Going by SKILL.md and its folder, Csharp Conventions needs the command-line tools its instructions call (dotnet).

Does Csharp Conventions access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Csharp Conventions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Csharp Conventions use?

Csharp Conventions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Csharp Conventions use?

About 363 tokens (SKILL.md is roughly 1.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Csharp Conventions?

Skills that share tags, products or a category with Csharp Conventions: Dotnet Backend Patterns (wshobson/agents, 40k stars), Csharp Rules (softspark/ai-toolkit, 179 stars), ScottPlot Test Runner (ScottPlot/ScottPlot, 6.8k stars) and Verify (valdisiljuconoks/LocalizationProvider, 180 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Csharp Conventions?

Goldziher (a GitHub user) maintains it in Goldziher/ai-rulez, which has 158 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 8, 2026.

Source: Goldziher/ai-rulez on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.