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 agentmods add rules/linuxchata/ai-playbook/csharp-testing-standardsgit clone --depth 1 https://github.com/linuxchata/ai-playbookWhat 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 | $0.00046 | $0.02195 |
| Opus 5 | $0.00023 | $0.01097 |
| Sonnet 5 | $0.00009 | $0.00439 |
| Haiku 4.5 | $0.00005 | $0.00219 |
Grade A, and why
csharp-testing-standards 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 yesterday.
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 — 317 lines — stays where its author put it; the contents beside it link to each section on GitHub.
C# Testing Standards
Description
Defines the testing standards, patterns, and conventions for all C# unit and integration test projects. Rules cover test framework usage, naming, structure, mocking, assertions, and parameterization. Apply these rules uniformly across all test projects.
1. Framework & Tooling
- Test framework: NUnit 3
- Mocking: Moq
- Coverage: coverlet.collector
- Test runner:
Microsoft.NET.Test.Sdk+NUnit3TestAdapter
Core NUnit attributes in use:
| Attribute | Purpose |
|---|---|
[TestFixture] |
Marks the test class |
[Test] |
Marks a single test method |
[SetUp] |
Runs before each test |
[TearDown] |
Runs after each test |
[OneTimeSetUp] |
Runs once before all tests in the fixture |
[TestCase] |
Parameterized test inline values |
2. Test Class Structure
2.1 Visibility
Test classes are internal. They do not need to be public – NUnit discovers them via the test runner regardless.
[TestFixture]
internal class OrderServiceTests { }
2.2 System Under Test Field
Name the field under test _sut (system under test) and initialize it in [SetUp]:
private OrderService _sut = null!;
2.3 Mock Fields
Declare all mocks as class-level fields initialized in [SetUp]:
private Mock<IOrderRepository> _orderRepositoryMock = null!;
private Mock<ILogger<OrderService>> _loggerMock = null!;
2.4 SetUp Method
- Initialize all mocks and the SUT in the
[SetUp]method. - Configure happy-path default behaviors here so individual tests only override what they specifically need.
- Keep
[SetUp]focused – it should not contain assertions or complex logic.
[SetUp]
public void Setup()
{
_orderRepositoryMock = new Mock<IOrderRepository>();
_orderRepositoryMock
.Setup(r => r.GetByIdAsync(It.IsAny<Guid>(), It.IsAny<CancellationToken>()))
.ReturnsAsync((Order?)null);
_sut = new OrderService(
_orderRepositoryMock.Object,
NullLogger<OrderService>.Instance);
}
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.
- yesterday First seen · 317 lines · 46 tokens per session scan A 0387da228961
csharp-testing-standards is a cursor rule published in the GitHub repository linuxchata/ai-playbook (6 stars, last pushed 3mo ago), licensed MIT. It adds 46 tokens to every session and 2,195 once invoked, about $0.0002 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.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.