fsharp-csharp-bridge

Community

Seamless F# ↔ C# type conversion, eliminate boundary errors.

Authord-kishi
Version1.0.0
Installs0

System Documentation

What problem does it solves? Bridging F# functional types (Result, Option, Discriminated Union, Record) with C# imperative code often leads to type conversion errors, null references, and complex boilerplate. This Skill automates the application of proven conversion patterns, ensuring type safety and reducing development time.

Core Features & Use Cases

  • F# Result ↔ C# Integration: Safely handle F# Result types in C# with IsOk/ResultValue patterns, preventing runtime exceptions.
  • F# Option ↔ C# Integration: Convert F# Option types to and from C# nullables, eliminating null reference exceptions and improving code robustness.
  • F# Discriminated Union ↔ C# Integration: Use C# switch expressions for robust pattern matching on F# DUs, avoiding Enum misinterpretations and ensuring correct logic.
  • F# Record ↔ C# Integration: Correctly initialize immutable F# Record types from C# using constructor-based patterns, bypassing read-only property errors.
  • Use Case: When integrating a new F# domain service into a C# Blazor UI, use this Skill to automatically generate the correct type conversion logic for commands, queries, and results, ensuring a smooth and error-free data flow across language boundaries.

Quick Start

Generate the C# code to convert an F# Result<Project, ProjectError> type into a C# ProjectDto or display the ProjectError message.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: fsharp-csharp-bridge
Download link: https://github.com/d-kishi/ubiquitous-lang-mng/archive/main.zip#fsharp-csharp-bridge

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.