cratis-specifications-isolate-behavior

cratis-specifications-isolate-behavior is a skill for Claude Code, Codex from Cratis/AI. It costs 46 tokens per session (697 once invoked), scanned A, original, MIT.

A guide for testing a small .NET decision handler in isolation with Cratis Specifications and xUnit, a .NET testing framework. It focuses on the value returned by the handler without starting the application or its event storage.

In plain words
What is it for?
Use it to create a behavior specification for a pure handler, share setup between related cases, and check that a returned event has the expected name and values.
Why use it?
It avoids slow, complicated tests when the code only needs a direct input-and-result check. It also gives the test a consistent structure for setup, execution, and assertion.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create a behavior specification for a pure handler, share setup between related cases, and check that a returned event has the expected name and values.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cratis/ai/cratis-specifications-isolate-behavior
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 Cratis/AI --skill cratis-specifications-isolate-behavior
Clone the repo
git clone --depth 1 https://github.com/Cratis/AI

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 cratis-specifications-isolate-behavior

README.md
[![agentmods](https://agentmods.dev/badge/skills/cratis/ai/cratis-specifications-isolate-behavior/github.svg)](https://agentmods.dev/skills/cratis/ai/cratis-specifications-isolate-behavior)
Your own site
<a href="https://agentmods.dev/skills/cratis/ai/cratis-specifications-isolate-behavior"><img src="https://agentmods.dev/badge/skills/cratis/ai/cratis-specifications-isolate-behavior/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 cratis-specifications-isolate-behavior

Your own site · 80×15
<a href="https://agentmods.dev/skills/cratis/ai/cratis-specifications-isolate-behavior"><img src="https://agentmods.dev/badge/skills/cratis/ai/cratis-specifications-isolate-behavior.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 697 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.00046 $0.00697
Opus 5.5 $0.00018 $0.00279
Sonnet 5.5 $0.00009 $0.00139
Haiku 4.5 $0.00005 $0.00070

Measured today against content hash 8e174998d743, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cratis-specifications-isolate-behavior 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 today.

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.

.cratis/ai/skills/cratis-specifications-isolate-behavior/SKILL.md · 53 lines

How it starts

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

Check a computed loan due date

Choose a direct spec when the handler decides something without the pipeline. For example, a library grants seven days for a short loan and 21 days otherwise, measured from the supplied borrowing date:

public record BorrowBook(DateOnly BorrowedOn, bool ShortLoan)
{
    public BookBorrowed Handle() => new(BorrowedOn.AddDays(ShortLoan ? 7 : 21));
}

Here BookBorrowed carries a DateOnly DueOn. Use the actual rule in the feature; don't introduce a rule just to test a handler. If Handle only copies input into the event, write no direct spec. If binding or commitment is itself a consequential promise, one pipeline spec (cratis-specifications-exercise-backend skill in cratis/application) covers it.

Commit the spec at the decision

  1. Use the repository's spec project with its application reference, Cratis.Specifications.XUnit.v3 and xUnit v3 setup. The Cratis adapter brings Cratis.Specifications.
  2. Arrange a fixed input in Establish; invoke Handle once in Because. Add a given context only for shared setup.
  3. Assert the calculated date, not how the handler calculated it. For the seven-day rule, use for_BorrowBook/when_borrowing_on_a_short_loan.cs:
using System;
using Cratis.Specifications;
using Library.Features.Books.Borrowing;
using Xunit;

namespace Library.Specs.for_BorrowBook;

public class when_borrowing_on_a_short_loan : Specification
{
    BorrowBook _command = null!;
    BookBorrowed _event = null!;

    void Establish() => _command = new(new DateOnly(2026, 1, 29), ShortLoan: true);
    void Because() => _event = _command.Handle();

    [Fact] public void should_be_due_in_seven_days() => _event.DueOn.ShouldEqual(new DateOnly(2026, 2, 5));
}

Facts observe the arranged instance and the result of Because; don't run a second action in a fact. If the decision depends on a pipeline-supplied value, configure it in a pipeline scenario instead. Don't duplicate the rule at both layers.

Read the full file on GitHub · 53 lines

Files

What ships with it

1 file 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. today Changed · +1 lines · -8 tokens per session 8e174998d743
  2. 2d ago First seen · 52 lines · 54 tokens per session scan A d4c1f11997b5

Subscribe to this mod's changes

cratis-specifications-isolate-behavior is a skill published in the GitHub repository Cratis/AI (4 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 697 once invoked, about $0.0002 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-11-27.

Related

cratis-specifications-isolate-behavior compared with skills from other repositories

cratis-specifications-isolate-behavior next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cratis-specifications-isolate-behaviorCratis/AISkill4todayMITA46Claude Code, Codex
author-testAzure/azure-sdk-for-netSkill6.1kyesterdayMITA68Claude Code, Codex
migrate-xunit-to-xunit-v3managedcode/dotnet-skillsSkill52716d agoMITA149Claude Code, Codex
dotnet-testing-bogus-fake-datakevintsengtw/dotnet-testing-agent-skillsSkill301mo agoMITA131Claude Code, Codex
dotnet-testing-autofixture-bogus-integrationkevintsengtw/dotnet-testing-agent-skillsSkill301mo agoMITA153Claude Code, Codex
dotnet-testing-complex-object-comparisonkevintsengtw/dotnet-testing-agent-skillsSkill301mo agoMITA157Claude Code, Codex
dotnet-testing-test-output-loggingkevintsengtw/dotnet-testing-agent-skillsSkill301mo agoMITA163Claude Code, Codex