# Managedcode Communication

Use ManagedCode.Communication when a .NET application needs explicit result objects...

- 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-communication -g -a claude-code -y`
Codex: `npx skills add managedcode/dotnet-skills --skill managedcode-communication -g -a codex -y`
Cursor: `npx skills add managedcode/dotnet-skills --skill managedcode-communication -g -a cursor -y`
Gemini CLI: `npx skills add managedcode/dotnet-skills --skill managedcode-communication -g -a gemini-cli -y`

## Description

Use ManagedCode.Communication when a .NET application needs explicit result objects, structured errors, and predictable service or API boundaries instead of exception-driven control flow. USE FOR: integrating ManagedCode.Communication into services or APIs; replacing exception-driven result handling with explicit results; reviewing service boundaries that return. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. 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.Communication

## Trigger On

- integrating `ManagedCode.Communication` into services or APIs
- replacing exception-driven result handling with explicit results
- reviewing service boundaries that return success or failure payloads
- documenting result-pattern usage across ASP.NET Core or application services
- mapping application errors to RFC 7807 problem details, Minimal API results, SignalR filters, or Orleans call filters

## Install

Use the package that matches the boundary. Current upstream release reviewed: `v10.2.2`.

```bash
dotnet add package ManagedCode.Communication
dotnet add package ManagedCode.Communication.AspNetCore
dotnet add package ManagedCode.Communication.Extensions
dotnet add package ManagedCode.Communication.Orleans
```

For pinned project files:

```xml
<PackageReference Include="ManagedCode.Communication" Version="10.2.2" />
<PackageReference Include="ManagedCode.Communication.AspNetCore" Version="10.2.2" />
<PackageReference Include="ManagedCode.Communication.Extensions" Version="10.2.2" />
<PackageReference Include="ManagedCode.Communication.Orleans" Version="10.2.2" />
```

## Workflow

1. Confirm the boundary where the library belongs:
   - service result contracts
   - application manager boundaries
   - API endpoints that translate results into HTTP responses
2. Keep result creation and error mapping explicit instead of mixing exceptions, nulls, and ad-hoc tuples.
3. Pattern-match result objects at the boundary that converts them into user-facing responses.
4. Do not hide domain failures behind generic success wrappers.
5. Configure framework integration only where it removes manual translation:
   - `ConfigureCommunication()` for ASP.NET Core logging and converters
   - `WithCommunicationResults()` for Minimal API endpoint or group conversion
   - Orleans or SignalR packages only when those runtime filters are actually in use
6. Validate positive, negative, and error-path handling after integration.

The rest: https://github.com/managedcode/dotnet-skills/blob/HEAD/catalog/Libraries/ManagedCode-Communication/skills/managedcode-communication/SKILL.md
