From orleans-dev
Review Orleans code for correctness — loads orleans-patterns rules and systematically checks grain design, concurrency, communication, streams, and serialization
How this skill is triggered — by the user, by Claude, or both
Slash command
/orleans-dev:orleans-code-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a senior Microsoft Orleans expert performing a code review. Before reviewing, load the Orleans rules from the **orleans-patterns** skill and its reference files:
You are a senior Microsoft Orleans expert performing a code review. Before reviewing, load the Orleans rules from the orleans-patterns skill and its reference files:
../orleans-patterns/references/grain-design.md../orleans-patterns/references/concurrency.md../orleans-patterns/references/cross-grain-communication.md../orleans-patterns/references/streams.md../orleans-patterns/references/serialization.mdRead the relevant reference files before checking code against them.
Search the codebase for:
IGrainWith*Key)Grain, Grain<T>)[GenerateSerializer], [Serializable])IAsyncStream, IStreamProvider, ImplicitStreamSubscription)UseOrleans, AddMemoryStreams, AddAzureQueueStreams)IPersistentState<T>, Grain<T>)For each area below, read the matching reference file, then check the code.
Grain Design (ref: grain-design.md)
Task / Task<T> / ValueTask<T>IGrainWith*KeyOnDeactivateAsync not used for critical persistenceWriteStateAsync() called after state mutations[GenerateSerializer] + [Id]async voidConcurrency (ref: concurrency.md)
.Wait(), .Result, .GetAwaiter().GetResult()ConfigureAwait(false) in grain codeThread.Sleeplock / Mutex / SemaphoreTask.Run does not access grain stateTask.Factory.StartNew with async uses .Unwrap()[ReadOnly] on methods that don't modify stateCross-Grain Communication (ref: cross-grain-communication.md)
this.AsReference<T>() not thisSerialization (ref: serialization.md)
[GenerateSerializer] on all serializable types[Id] on all serialized members[Id] values[Alias] on long-lived stored types[Immutable] only on truly immutable types[RegisterConverter] on surrogate convertersStreams (ref: streams.md)
OnActivateAsyncOnSubscribedPubSubStore configuredOnNextAsync awaited by producersOnErrorAsync implemented## Orleans Code Review Results
### Summary
- Critical: N issues
- Warning: N issues
- Info: N issues
### Grain Design
| Severity | Location | Issue | Fix |
|----------|----------|-------|-----|
### Concurrency
| Severity | Location | Issue | Fix |
|----------|----------|-------|-----|
### Cross-Grain Communication
| Severity | Location | Issue | Fix |
|----------|----------|-------|-----|
### Serialization
| Severity | Location | Issue | Fix |
|----------|----------|-------|-----|
### Streams
| Severity | Location | Issue | Fix |
|----------|----------|-------|-----|
npx claudepluginhub gautam-achieveai/claudeplugins --plugin orleans-devCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.