golang-samber-mo

golang-samber-mo is a skill for Claude Code from alexastrum/skl. It costs 85 tokens per session (2,827 once invoked), scanned A, a copy of golang-samber-mo, MIT.

A guide to samber/mo, a Go library of typed containers for optional values, failures, alternative outcomes, and step-by-step operations. These containers make common cases such as a missing value or an error explicit in the type of the code.

In plain words
What is it for?
Use it when adopting samber/mo or working with its Option, Result, Either, Future, IO, Task, State, or pipeline types in Go.
Why use it?
It can make nullable values and error paths easier to compose and reason about than scattered nil checks and manual error handling.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; mentions Claude Code; installed under .agents/ (shared by several agents).

Good fit Use it when adopting samber/mo or working with its Option, Result, Either, Future, IO, Task, State, or pipeline types in Go.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alexastrum/skl/golang-samber-mo
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alexastrum/skl --skill golang-samber-mo
Clone the repo
git clone --depth 1 https://github.com/alexastrum/skl

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for golang-samber-mo

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexastrum/skl/golang-samber-mo/github.svg)](https://agentmods.dev/skills/alexastrum/skl/golang-samber-mo)
Your own site
<a href="https://agentmods.dev/skills/alexastrum/skl/golang-samber-mo"><img src="https://agentmods.dev/badge/skills/alexastrum/skl/golang-samber-mo/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for golang-samber-mo

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexastrum/skl/golang-samber-mo"><img src="https://agentmods.dev/badge/skills/alexastrum/skl/golang-samber-mo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,827 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 89% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.02827
Opus 5 $0.00043 $0.01413
Sonnet 5 $0.00017 $0.00565
Haiku 4.5 $0.00009 $0.00283

Measured 12d ago against content hash 6ab54d2d9ab0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

golang-samber-mo scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

89% identical to golang-samber-mo — 28 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/golang-samber-mo/SKILL.md · 276 lines

How it starts

The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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: Use ultrathink when designing multi-step Option/Result/Either pipelines. Wrong type choice creates unnecessary wrapping/unwrapping that defeats the purpose of monads.

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. Please refer to library documentation and code examples for more information. Context7 can help as a discoverability platform.

go get github.com/samber/mo

For an introduction to functional programming concepts and why monads are valuable in Go, see Monads Guide.

Core Types at a Glance

Type Purpose Think of it as...
Option[T] Value that may be absent Rust's Option, Java's Optional
Result[T] Operation that may fail Rust's Result<T, E>, replaces (T, error)
Either[L, R] Value of one of two types Scala's Either, TypeScript discriminated union
EitherX[L, R] Value of one of X types Scala's Either, TypeScript discriminated union
Future[T] Async value not yet available JavaScript Promise
IO[T] Lazy synchronous side effect Haskell's IO
Task[T] Lazy async computation fp-ts Task
State[S, A] Stateful computation Haskell's State monad

Option[T] — Nullable Values Without nil

Represents a value that is either present (Some) or absent (None). Eliminates nil pointer risks at the type level.

import "github.com/samber/mo"

name := mo.Some("Alice")          // Option[string] with value
empty := mo.None[string]()        // Option[string] without value
fromPtr := mo.PointerToOption(ptr) // nil pointer -> None

// Safe extraction
name.OrElse("Anonymous")  // "Alice"
empty.OrElse("Anonymous")  // "Anonymous"

// Transform if present, skip if absent
upper := name.Map(func(s string) (string, bool) {
    return strings.ToUpper(s), true
})

Read the full file on GitHub · 276 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 276 lines · 85 tokens per session scan A 6ab54d2d9ab0

Subscribe to this mod's changes

golang-samber-mo is a skill published in the GitHub repository alexastrum/skl (11 stars, last pushed 3mo ago), licensed MIT. It adds 85 tokens to every session and 2,827 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to golang-samber-mo, differing in 28 lines, and is treated as a copy.

Related

Other skills, from other repositories

gograph

Go repository intelligence for Claude Code. Use when reading, navigating, editing, reviewing, or refactoring a Go codebase. Exposes 64 query, analysis, and workflow capabilities through the local gograph MCP server, including bounded first-call exploration, AST-aware call graphs, blast-radius analysis, impact, and…

ozgurcd/gograph · 69 tokens

printing-press-polish

Polish a generated CLI to pass verification and become publish-ready. Runs diagnostics (dogfood, verify, scorecard, go vet, gosec), automatically fixes all issues (verify failures, static-analysis findings, dead code, descriptions, README, MCP tool quality), reports the before/after delta, and offers to publish. Use…

mvanhorn/cli-printing-press · 125 tokens

use-modern-go

Use the Modern Go Guidelines CLI whenever writing, modifying, fixing, or refactoring Go code. Apply its version-specific guidance to generated changes.

JetBrains/go-modern-guidelines · 32 tokens

printing-press

Set up a new integration, connector, or CLI binding for any API. Wrap or generate a ship-ready Go CLI from an OpenAPI, HAR, or Postman spec via the lean research -> generate -> build -> shipcheck loop. Use when the user says build a CLI, wrap this API, set up a new integration, add a connector, integrate with a…

mvanhorn/cli-printing-press · 86 tokens

go-127

What changed in Go 1.27 (released August 2026) and how it changes the way Go is written in pi-go. Use this skill when writing or reviewing Go that could use a 1.27 feature, when bumping the go directive in go.mod, when a build or test behaves differently after a toolchain upgrade, or when code-guidelines-go points…

dimetron/pi-go · 177 tokens

bubbletea-testing

Use this skill whenever writing tests for Bubble Tea (charmbracelet/bubbletea) TUI applications in Go. Triggers include any mention of testing Bubble Tea models, teatest, golden file testing for TUIs, testing tea.Cmd or tea.Msg, snapshot testing terminal output, or writing tests for any Go CLI/TUI that uses the Elm…

dimetron/pi-go · 139 tokens