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.
npx skills add softspark/ai-toolkit --skill csharp-rulesgit clone --depth 1 https://github.com/softspark/ai-toolkitWrote 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.
[](https://agentmods.dev/skills/softspark/ai-toolkit/csharp-rules)<a href="https://agentmods.dev/skills/softspark/ai-toolkit/csharp-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/csharp-rules/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.
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/csharp-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/csharp-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Privilege Escalation · line 195 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00055 | $0.03160 |
| Opus 5 | $0.00028 | $0.01580 |
| Sonnet 5 | $0.00011 | $0.00632 |
| Haiku 4.5 | $0.00006 | $0.00316 |
Grade A, and why
csharp-rules 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 283 lines — stays where its author put it; the contents beside it link to each section on GitHub.
C#/.NET Rules
These rules come from app/rules/csharp/ in ai-toolkit. They cover
the project's standards for coding style, frameworks, patterns,
security, and testing in C#/.NET. Apply them when writing or
reviewing C#/.NET code.
C# Coding Style
Naming
- PascalCase: classes, structs, enums, interfaces, methods, properties, events.
- camelCase: local variables, parameters, private fields.
- Prefix interfaces with
I:IUserRepository,IDisposable. - Prefix private fields with
_:private readonly ILogger _logger;. - UPPER_SNAKE: not conventional in C#. Use PascalCase for constants.
Nullable Reference Types
- Enable
<Nullable>enable</Nullable>in all projects. - Use
string?only when null is semantically meaningful. - Use
!(null-forgiving) operator sparingly -- only when compiler cannot infer. - Use
??(null-coalescing) and?.(null-conditional) for safe navigation. - Use
requiredmodifier (C# 11) on properties that must be set at initialization.
Records and Types
- Use
recordfor immutable value objects and DTOs. - Use
record structfor small, stack-allocated value types. - Use
initproperties for immutable-after-construction objects. - Use
withexpressions for non-destructive mutation of records. - Use primary constructors (C# 12) for concise class definitions.
Pattern Matching
- Use
ispattern for type checks:if (obj is string s). - Use
switchexpressions for exhaustive matching over enums/types. - Use property patterns:
user is { Age: > 18, Role: "admin" }. - Use relational patterns:
size is > 0 and < 100. - Use list patterns (C# 11):
numbers is [1, 2, .., var last].
Async/Await
- Suffix async methods with
Async:GetUserAsync(). - Return
Task<T>orValueTask<T>, nevervoid(except event handlers). - Use
awaitwithConfigureAwait(false)in library code. - Use
CancellationTokenparameters in all async public APIs. - Prefer
ValueTask<T>when synchronous completion is common.
File Organization
- One type per file. File name matches type name.
- Use file-scoped namespaces (C# 10):
namespace MyApp.Services;. - Order members: fields, constructors, properties, public methods, private methods.
- Use
global usingdirectives in a singleGlobalUsings.csfile.
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.
- 6d ago First seen · 283 lines · 55 tokens per session scan A 8c2c5838061d
csharp-rules is a skill published in the GitHub repository softspark/ai-toolkit (170 stars, last pushed 2d ago), licensed Apache-2.0. It adds 55 tokens to every session and 3,160 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
qa-testing-nunit
Designs NUnit-based C# test suites for API, component, and integration coverage. Use when creating fixtures, wiring Testcontainers, or reducing flaky CI behavior.
unit-test
A Go testing workflow for writing unit tests: small tests that check individual functions or components. It supports table-driven cases, where many inputs and expected results are organised in one test, and subtests.
fuzzing-test
A Go testing guide for generating fuzz tests, which repeatedly try varied inputs to find crashes and unexpected behavior. It first checks whether the code is suitable for fuzzing.
go-test-review
Review Go test code for quality including table-driven tests, t.Helper usage, assertion completeness, boundary cases, benchmarks, fuzz tests, and coverage targets. Trigger when PR contains test.go files, test helpers, httptest usage, testing.B, testing.F, or testdata directories. Use for test-quality focused review.
tdd-workflow
Enforce practical Test-Driven Development for code changes in Go services. Use for new features, bug fixes, refactors, API changes, and new modules. Requires Red-Green-Refactor evidence, defect-hypothesis-driven tests, killer cases, and coverage gates (line + risk-path).
dotnet-csharp-advisor
Développement .NET/C# avec ASP.NET Core, EF Core et patterns modernes. Se déclenche avec ".NET", "C#", "ASP.NET", "EF Core", "Entity Framework", "Minimal API", "Blazor", "LINQ", "NuGet", "dotnet". Also triggers on "C# best practices", "EF Core query".