samber avatar

Golang Samber Mo

Brings Rust-style Option and Result types to Go using samber/mo, making nil checks and error handling composable at the type level. You get Option for nullable values, Result for operations that fail, Either for valid alternatives, plus Future/IO/Task for async and lazy computation. The main gotcha is Go's method limitation: direct chaining only works for same-type transforms, so you'll use sub-package pipeline functions when going from int to string or bytes to config. Works well if you're tired of nil panics and want functional composition without giving up Go idioms. The skill knows when to use Do notation versus explicit monadic chains.

skills.sh installs
39.7K
GitHub stars
3.8K
last updated
Aug 21, 2026

Install

$ npx -y skills add samber/cc-skills-golang --skill golang-samber-mo --agent claude-code

Installs into .claude/skills of the current project.

Files

Persona: You are a Go engineer bringing functional programming safety to Go. You use monads to make impossible states unrepresentable — nil checks become type constraints, error handling becomes composable pipelines.

Thinking mode: Reason as thoroughly as possible when designing multi-step Option/Result/Either pipelines — wrong type choice creates unnecessary wrapping/unwrapping that defeats the purpose of monads. On Claude Code, use ultrathink to trigger extended thinking explicitly.

samber/mo — Monads and Functional Abstractions for Go

Go 1.18+ library providing type-safe monadic types with zero dependencies. Inspired by Scala, Rust, and fp-ts.

Official Resources:

This skill is not exhaustive — refer to library documentation and code examples for more information:

Sponsors

Details

Repository
github.com/samber/cc-skills-golang
Categories
DevOps & CI/CD, Git & Pull Requests, Debugging, Automation & Workflows, Sales & Marketing, Go, Design & UI/UX
First seen
Apr 16, 2026

More from samber/cc-skills-golang

All 47
1samber avatargolang-samber-rosamber/cc-skills-golangReactive streams and event-driven programming in Golang using samber/ro — ReactiveX implementation with 150+ type-safe operators, cold/hot observables, 5 subjec39.6Kskills.sh installs
2samber avatargolang-google-wiresamber/cc-skills-golangCompile-time dependency injection in Golang using google/wire — wire.NewSet, wire.Build, wire.Bind (interface→concrete), wire.Struct, wire.Value, wire.Interface38.3Kskills.sh installs
3neondatabase avatarneon-postgres-branchesneondatabase/agent-skillsChoose and create the right Neon branch type for testing and development. Use when users ask about Neon branching, migration testing with real data, isolated te37.3Kskills.sh installs
4expo avatarexpo-native-uiexpo/skillsFramework (OSS). Build beautiful, native-feeling Expo screens. Covers Apple HIG styling, semantic colors, native controls, SF Symbols, media, animations, visual36.5Kskills.sh installs
5expo avatarexpo-uiexpo/skillsFramework (OSS). Build native UI with the @expo/ui package: real SwiftUI on iOS and Jetpack Compose on Android rendered from React in an Expo or React Native ap35.9Kskills.sh installs
6firecrawl avatarfirecrawl-website-design-clonefirecrawl/firecrawl-workflowsExtract any website's design system into an agent-ready DESIGN.md using Firecrawl scrape evidence. Use when the user wants colors, fonts, spacing, components, l33.5Kskills.sh installs