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 skills/cratis/ai/cratis-specs-csharpnpx skills add Cratis/AI --skill cratis-specs-csharpgit clone --depth 1 https://github.com/Cratis/AIWhat 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.00101 | $0.01952 |
| Opus 5 | $0.00051 | $0.00976 |
| Sonnet 5 | $0.00020 | $0.00390 |
| Haiku 4.5 | $0.00010 | $0.00195 |
Grade A, and why
cratis-specs-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 2d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- cratis-specs-csharp — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 207 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Core philosophy
Specs are executable documentation — the folder tree reads like a spec sheet. Favor readability over DRY. Each spec file has:
- One action under test (
Because) - One setup (
Establish) - One or more focused assertions (
should_*)
Step 1 — Choose the spec type
Lead with the in-process scenario family (fast, infrastructure-free — the default for slice behavior); reserve out-of-process Chronicle integration specs for host/transport boundaries they can't reach. Every spec file is wrapped in #if DEBUG … #endif. Full reference: the universal base in specs.csharp.md and the application *Scenario family in specs.scenarios.csharp.md.
| Scenario | Spec type |
|---|---|
| State Change slice (command → events) | CommandScenario<TCommand> — runs validators + Provide() + Handle() + appended events |
| State View slice (projection / reducer) | ReadModelScenario<TReadModel> |
| Constraints / raw append & concurrency semantics | EventScenario |
| Automation / Translation (reactor) | ReactorScenario<TReactor> |
| Isolated unit logic (no I/O) | Unit spec in for_<ClassName>/ |
| Host / transport / real-infra boundary (advanced) | out-of-process Chronicle integration spec |
| Complex setup shared across many specs | Reusable context in given/ |
Step 2 — Create the folder structure
for_<ClassName>/
├── given/
│ ├── all_dependencies.cs ← mocks all deps, inherits Specification
│ └── a_<system_under_test>.cs ← creates SUT, inherits all_dependencies
├── when_<behavior>/ ← behavior with multiple outcomes
│ ├── and_<condition>.cs
│ └── with_<state>.cs
└── when_<simple_behavior>.cs ← single outcome = single file
Folder/file names read as English sentences:
for_Changeset / when_adding_changes / and_there_are_differencesfor_AuthorService / when_registering / and_name_already_exists
Step 3 — Write a spec
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.
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.
- 2d ago First seen · 207 lines · 101 tokens per session scan A fbde383f9b9f
cratis-specs-csharp is a skill published in the GitHub repository Cratis/AI (2 stars, last pushed 5d ago), licensed MIT. It adds 101 tokens to every session and 1,952 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-31.
Other skills, from other repositories
cratis-specs-csharp
Step-by-step guidance for writing C# specs in Cratis with BDD Specification by Example — the Establish/Because/should pattern, for/when/and folder hierarchy, reusable given/ contexts, NSubstitute mocking, and the in-process scenario family. Use when writing C# unit or integration specs or structuring the for/when/and…
add-concept
Use this skill when asked to create a strongly-typed domain identifier or value (such as ProjectId, AuthorName, InvoiceNumber) in a Cratis-based project. Produces a ConceptAs record with the correct conversions and sentinel values.
cratis-specs-typescript
Step-by-step guidance for writing TypeScript specs in Cratis using BDD-style Specification by Example — the given()/describe/it pattern, for/when/ folder hierarchy, reusable context classes, Sinon mocking, and Chai assertions. Use whenever writing TypeScript specs or tests, creating spec files/folders, using the…
cratis-csharp-standards
Reference for Cratis C# coding conventions — formatting, naming, records, nullable handling, exceptions, logging, and DI. Use whenever writing C# in a Cratis project, deciding between record vs class, checking naming rules, applying formatting conventions, handling null safety, creating exception types, or asking "how…
write-specs-events
Use this skill when asked to write tests or specs for event appending, event log behavior, constraint violations, or concurrency violations using EventScenario in a Cratis-based project. Produces infrastructure-free in-process specs using EventScenario and AppendResult Should extensions.
write-specs-readmodels
Use this skill when asked to write tests or specs for read model projections, reducers, or model-bound projections using ReadModelScenario in a Cratis-based project. Produces infrastructure-free in-process specs using ReadModelScenario .