# Managedcode Orleans Graph

Integrate ManagedCode.Orleans.Graph into an Orleans-based .NET application for...

- Repository: https://github.com/managedcode/dotnet-skills (500 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add managedcode/dotnet-skills --skill managedcode-orleans-graph -g -a claude-code -y`
Codex: `npx skills add managedcode/dotnet-skills --skill managedcode-orleans-graph -g -a codex -y`
Cursor: `npx skills add managedcode/dotnet-skills --skill managedcode-orleans-graph -g -a cursor -y`
Gemini CLI: `npx skills add managedcode/dotnet-skills --skill managedcode-orleans-graph -g -a gemini-cli -y`

## Description

Integrate ManagedCode.Orleans.Graph into an Orleans-based .NET application for grain-call policy enforcement, deadlock detection, live-call telemetry, and Mermaid graph diagnostics. USE FOR: ManagedCode.Orleans.Graph integration; allowed grain transitions; Orleans call filters; live policy graphs; reviewing Orleans call-cycle risk. DO NOT USE FOR: generic graph data modeling or traversal unrelated to Orleans calls. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# ManagedCode.Orleans.Graph

## Trigger On

- integrating `ManagedCode.Orleans.Graph` into an Orleans-based system
- enforcing which grain interfaces may call other grain interfaces and methods
- detecting unsafe runtime grain call cycles or intentional self-reentrancy
- generating configured-policy or live-call Mermaid diagrams
- running observe mode to discover real traffic before locking down a policy

## Install

Current upstream release reviewed: `v10.0.3`.

```bash
dotnet add package ManagedCode.Orleans.Graph
```

The upstream package targets the current .NET 10 / Orleans 10 stack. Do not add it to older Orleans applications without first checking target frameworks and Orleans package compatibility.

## Workflow

1. Confirm the application needs grain-call policy enforcement or live-call diagnostics. If the task is generic graph data traversal, use normal Orleans grain modeling instead.
2. Register Orleans.Graph filters in the silo with `AddOrleansGraph(...)`.
3. Model the policy from source grain to target grain and method. Start with explicit allow rules for client entry points and grain-to-grain transitions.
4. Use `AllowAll()` observe mode only to discover traffic before enforcement. Keep a follow-up step to convert observed edges into reviewed policy.
5. Register the client-side outgoing filter with `clientBuilder.AddOrleansGraph()` only when Orleans clients should participate in call-history tracking.
6. Use attributes when colocating policy with grain contracts is clearer than central fluent setup.
7. Generate Mermaid diagrams and inspect policy edges for review artifacts.
8. Validate with real Orleans runtime tests, including timer, reminder, hosted-service, and stateless-worker call origins when those are part of the topology.

The rest: https://github.com/managedcode/dotnet-skills/blob/HEAD/catalog/Libraries/ManagedCode-Orleans-Graph/skills/managedcode-orleans-graph/SKILL.md
