Valgo
cohesivestack/valgo
Add, refactor, debug, review, explain, or migrate type-safe validation in consumer Go applications using github.com/cohesivestack/valgo.
Functional helpers for Go using samber/lo — 500+ type-safe generics for slices, maps, strings, concurrency (Map, Filter, Reduce); concurrent (lo/parallel), in-place (lo/mutable), lazy iterators…
$ npx skills add context-labs/whip --skill golang-samber-lo -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install context-labs/whip golang-samber-lo --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/golang-samber-lo .claude/skills/golang-samber-lo && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "golang-samber-lo" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-samber-lo into .claude/skills/golang-samber-lo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-samber-lo", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/context-labs/whip/tree/main/.agents/skills/golang-samber-loType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add context-labs/whip --skill golang-samber-lo -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install context-labs/whip golang-samber-lo --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/golang-samber-lo .agents/skills/golang-samber-lo && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "golang-samber-lo" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-samber-lo into .agents/skills/golang-samber-lo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-samber-lo", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add context-labs/whip --skill golang-samber-lo -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install context-labs/whip golang-samber-lo --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/golang-samber-lo .cursor/skills/golang-samber-lo && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "golang-samber-lo" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-samber-lo into .cursor/skills/golang-samber-lo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-samber-lo", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/context-labs/whip.git --path .agents/skills/golang-samber-lo--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add context-labs/whip --skill golang-samber-lo -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install context-labs/whip golang-samber-lo --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/golang-samber-lo .gemini/skills/golang-samber-lo && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "golang-samber-lo" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-samber-lo into .gemini/skills/golang-samber-lo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-samber-lo", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install context-labs/whip golang-samber-loInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add context-labs/whip --skill golang-samber-lo -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/golang-samber-lo .github/skills/golang-samber-lo && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "golang-samber-lo" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-samber-lo into .github/skills/golang-samber-lo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-samber-lo", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add context-labs/whip --skill golang-samber-lo -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install context-labs/whip golang-samber-lo --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/golang-samber-lo .opencode/skills/golang-samber-lo && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "golang-samber-lo" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-samber-lo into .opencode/skills/golang-samber-lo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-samber-lo", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
golang-samber-loFunctional helpers for Go using samber/lo — 500+ type-safe generics for slices, maps, strings, concurrency (Map, Filter, Reduce); concurrent (lo/parallel), in-place (lo/mutable), lazy iterators…
Golang Samber Lo is an agent skill from context-labs/whip. Functional helpers for Go using samber/lo — 500+ type-safe generics for slices, maps, strings, concurrency (Map, Filter, Reduce); concurrent (lo/parallel), in-place (lo/mutable), lazy iterators (lo/it). Apply when using/importing github.com/samber/lo. Not for streaming (→ golang-ro).
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `evals/evals.json`, `references/advanced-patterns.md` and `references/api-reference.md`). Compatibility notes: Designed for Claude Code, Codex or similar harness, and for projects using Golang.
It sits in Development, covering Type safety. It works with Go and GitHub. The repository describes itself as: A fast coding-agent harness in Go. Tool-use loop, bubbletea TUI, provider-routable models with live catalog discovery, MCP support, background subagents. One binary, no runtime… The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 8876467. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadEditWriteGlobGrepBash(go:*)Bash(golangci-lint:*)Bash(git:*)mcp__context7__resolve-library-idmcp__context7__query-docs…and 5 more on the same allowed-tools line.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
goFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comlo.samber.devpkg.go.devFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code, Codex or similar harness, and for projects using Golang.
From compatibility in the SKILL.md frontmatter.
Golang Samber Lo loads about 2.3k tokens when it runs, and up to ~9.6k if it reads all its reference files. Until then it costs about 75 tokens; SKILL.md has 880 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from context-labs/whip at commit 8876467, republished under its MIT licence (© context-labs). 880 words, ~2,343 tokens.
.claude/skills/golang-samber-lo/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Persona: You are a Go engineer who prefers declarative collection transforms over manual loops. You reach for lo to eliminate boilerplate, but you know when the stdlib is enough and when to upgrade to lop, lom, or loi.
Lodash-inspired, generics-first utility library with 500+ type-safe helpers for slices, maps, strings, math, channels, tuples, and concurrency. Zero external dependencies. Immutable by default.
Official Resources:
This skill is not exhaustive. Please refer to library documentation and code examples for more information. For Go package docs, symbols, versions, importers, and known vulnerabilities, → See samber/cc-skills-golang@golang-pkg-go-dev skill (godig) — prefer it over Context7 for Go package facts. To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See samber/cc-skills-golang@golang-gopls skill (gopls). Context7 remains a fallback for docs not indexed on pkg.go.dev.
Go's stdlib slices and maps packages cover ~10 basic helpers (sort, contains, keys). Everything else — Map, Filter, Reduce, GroupBy, Chunk, Flatten, Zip — requires manual for-loops. lo fills this gap:
interface{} casts, no reflection, compile-time checking, no interface boxing overheadlo, upgrade to lop/lom/loi only when profiling demands itErr suffixes (MapErr, FilterErr, ReduceErr) that stop on first errorgo get github.com/samber/lo| Package | Import | Alias | Go version |
|---|---|---|---|
| Core (immutable) | github.com/samber/lo | lo | 1.18+ |
| Parallel | github.com/samber/lo/parallel | lop | 1.18+ |
| Mutable | github.com/samber/lo/mutable | lom | 1.18+ |
| Iterator | github.com/samber/lo/it | loi | 1.23+ |
| SIMD (experimental) | github.com/samber/lo/exp/simd | — | 1.25+ (amd64 only) |
Start with lo. Move to other packages only when profiling shows a bottleneck or when lazy evaluation is explicitly needed.
| Package | Use when | Trade-off |
|---|---|---|
lo | Default for all transforms | Allocates new collections (safe, predictable) |
lop | CPU-bound work on large datasets (1000+ items) | Goroutine overhead; not for I/O or small slices |
lom | Hot path confirmed by pprof -alloc_objects | Mutates input — caller must understand side effects |
loi | Large datasets with chained transforms (Go 1.23+) | Lazy evaluation saves memory but adds iterator complexity |
simd | Numeric bulk ops after benchmarking (experimental) | Unstable API, may break between versions |
Key rules:
lop is for CPU parallelism, not I/O concurrency — for I/O fan-out, use errgroup insteadlom breaks immutability — only use when allocation pressure is measured, never assumedloi eliminates intermediate allocations in chains like Map → Filter → Take by evaluating lazilysamber/cc-skills-golang@golang-samber-ro skill + samber/ro packageFor detailed package comparison and decision flowchart, see Package Guide.
// ✓ lo — declarative, type-safe
names := lo.Map(users, func(u User, _ int) string {
return u.Name
})
// ✗ Manual — boilerplate, error-prone
names := make([]string, 0, len(users))
for _, u := range users {
names = append(names, u.Name)
}total := lo.Reduce(
lo.Filter(orders, func(o Order, _ int) bool {
return o.Status == "paid"
}),
func(sum float64, o Order, _ int) float64 {
return sum + o.Amount
},
0,
)byStatus := lo.GroupBy(tasks, func(t Task, _ int) string {
return t.Status
})
// map[string][]Task{"open": [...], "closed": [...]}results, err := lo.MapErr(urls, func(url string, _ int) (Response, error) {
return http.Get(url)
})| Mistake | Why it fails | Fix |
|---|---|---|
Using lo.Contains when slices.Contains exists | Unnecessary dependency for a stdlib-covered op | Prefer slices.Contains/slices.Sort since Go 1.21+ and slices.Collect(maps.Keys(m)) since Go 1.23+ when a key slice is needed |
Using lop.Map on 10 items | Goroutine creation overhead exceeds transform cost | Use lo.Map — lop benefits start at ~1000+ items for CPU-bound work |
Assuming lo.Filter modifies the input | lo is immutable by default — it returns a new slice | Use lom.Filter if you explicitly need in-place mutation |
Using lo.Must in production code paths | Must panics on error — fine in tests and init, dangerous in request handlers | Use the non-Must variant and handle the error |
| Chaining many eager transforms on large data | Each step allocates an intermediate slice | Use loi (lazy iterators) to avoid intermediate allocations |
slices.Contains and slices.Sort (Go 1.21+) carry no dependency; maps.Keys is Go 1.23+ and returns an iterator, so use slices.Collect(maps.Keys(m)) when you need a slice. Use lo for transforms the stdlib doesn't offer (Map, Filter, Reduce, GroupBy, Chunk, Flatten)lo.Filter → lo.Map → lo.GroupBy instead of writing nested loops. Each function is a building blocklo to lom/lop only after go tool pprof confirms allocation or CPU as the bottlenecklo.MapErr over lo.Map + manual error collection. Error variants stop early and propagate cleanlylo.Must only in tests and init — in production, handle errors explicitly| Function | What it does |
|---|---|
lo.Map | Transform each element |
lo.Filter / lo.Reject | Keep / remove elements matching predicate |
lo.Reduce | Fold elements into a single value |
lo.ForEach | Side-effect iteration |
lo.GroupBy | Group elements by key |
lo.Chunk | Split into fixed-size batches |
lo.Flatten | Flatten nested slices one level |
lo.Uniq / lo.UniqBy | Remove duplicates |
lo.Find / lo.FindOrElse | First match or default |
lo.Contains / lo.Every / lo.Some | Membership tests |
lo.Keys / lo.Values | Extract map keys or values |
lo.PickBy / lo.OmitBy | Filter map entries |
lo.Zip2 / lo.Unzip2 | Pair/unpair two slices |
lo.Range / lo.RangeFrom | Generate number sequences |
lo.Ternary / lo.If | Inline conditionals |
lo.ToPtr / lo.FromPtr | Pointer helpers |
lo.Must / lo.Try | Panic-on-error / recover-as-bool |
lo.Async / lo.Attempt | Async execution / retry with backoff |
lo.Debounce / lo.Throttle | Rate limiting |
lo.ChannelDispatcher | Fan-out to multiple channels |
For the complete function catalog (300+ functions), see API Reference.
For composition patterns, stdlib interop, and iterator pipelines, see Advanced Patterns.
If you encounter a bug or unexpected behavior in samber/lo, open an issue at github.com/samber/lo/issues.
samber/cc-skills-golang@golang-samber-ro skill for reactive/streaming pipelines over infinite event streams (samber/ro package)samber/cc-skills-golang@golang-samber-mo skill for monadic types (Option, Result, Either) that compose with lo transformssamber/cc-skills-golang@golang-data-structures skill for choosing the right underlying data structuresamber/cc-skills-golang@golang-performance skill for profiling methodology before switching to lom/lop© context-labs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (references) in .agents/skills/golang-samber-lo of context-labs/whip.
Open the folder on GitHubat commit 8876467
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in context-labs/whip, which our catalogue first saw on October 7, 2026.
Golang Samber Lo next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Golang Samber Lo this skillcontext-labs/whip | 1.1k | 2 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Valgocohesivestack/valgo | 508 | — | ~2.4k | Automated safety check: Pass | MIT | |
| Golang Samber Mosamber/cc-skills-golang | 3.4k | — | ~2.9k | Automated safety check: Pass | MIT | |
| Go-Redis Release Preparationredis/go-redis | 22k | — | ~1.1k | Automated safety check: Pass | BSD-2-Clause | |
| Machinistowainlewis/machinist | 496 | 1 repos | ~761 | Automated safety check: Pass | MIT | |
| Releaseyoanbernabeu/grepai | 1.9k | — | ~918 | Automated safety check: Pass | MIT |
cohesivestack/valgo
Add, refactor, debug, review, explain, or migrate type-safe validation in consumer Go applications using github.com/cohesivestack/valgo.
samber/cc-skills-golang
Monadic types for Golang using samber/mo — Option, Result, Either, Future, IO, Task, and State types for type-safe nullable values, error handling, and functional composition with pipeline…
redis/go-redis
Prepares a go-redis release locally: picks the next semver, gathers merged PRs, writes the RELEASE-NOTES entry and bumps versions, without publishing.
owainlewis/machinist
Use Machinist to create, assign, and monitor software tasks.
yoanbernabeu/grepai
Create a new release for grepai. An agent skill from yoanbernabeu/grepai.
IBM/fp-go
Teaches an agent to write fp-go v2 services with the Effect type, carrying dependencies in its type parameter instead of in context.Context or parameters.
context-labs/whip
Linting best practices and golangci-lint configuration for Go — running linters, configuring .golangci.yml, nolint suppressions, selecting linters.
context-labs/whip
Golang project layouts and workspaces. An agent skill from context-labs/whip.
context-labs/whip
Golang package/module docs via godig, a pkg.go.dev API client (CLI + MCP) — APIs, symbols, versions, importers, licenses, vulnerabilities.
context-labs/whip
Golang testing with stretchr/testify — assert, require, mock, suite: assertions, mock expectations, argument matchers, suite lifecycle, Eventually, JSONEq.
context-labs/whip
CI/CD with GitHub Actions for Golang — testing, linting, SAST, security scanning, coverage, Dependabot, Renovate, GoReleaser, release pipelines.
context-labs/whip
Golang data structures — slices/maps internals (capacity growth, preallocation, hash buckets), slices/maps packages, container/list/heap/ring, strings.Builder vs bytes.Buffer, generic collections…
Categories
Functional helpers for Go using samber/lo — 500+ type-safe generics for slices, maps, strings, concurrency (Map, Filter, Reduce); concurrent (lo/parallel), in-place (lo/mutable), lazy iterators…. Golang Samber Lo is an agent skill from context-labs/whip. Functional helpers for Go using samber/lo — 500+ type-safe generics for slices, maps, strings, concurrency (Map, Filter, Reduce); concurrent (lo/parallel), in-place (lo/mutable), lazy iterators (lo/it).
Golang Samber Lo fits situations like: tasks that involve Type safety.
Run `npx skills add context-labs/whip --skill golang-samber-lo -a claude-code`. Or copy the skill folder (.agents/skills/golang-samber-lo in context-labs/whip) into .claude/skills/golang-samber-lo in your project. Claude Code loads it when a task matches its description.
Run `npx skills add context-labs/whip --skill golang-samber-lo -a codex`. Or copy the skill folder (.agents/skills/golang-samber-lo in context-labs/whip) into .agents/skills/golang-samber-lo in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add context-labs/whip --skill golang-samber-lo -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/golang-samber-lo, .gemini/skills/golang-samber-lo, .github/skills/golang-samber-lo and .opencode/skills/golang-samber-lo in your project.
Going by SKILL.md and its folder, Golang Samber Lo needs the command-line tools its instructions call (go). Its frontmatter pre-approves these tools: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(golangci-lint:*), Bash(git:*), mcp__context7__resolve-library-id, mcp__context7__query-docs, AskUserQuestion, Bash(godig:*), Bash(gopls:*), LSP, mcp__gopls__*. Compatibility (from SKILL.md): Designed for Claude Code, Codex or similar harness, and for projects using Golang..
SKILL.md names 3 domains. As links in the text: github.com, lo.samber.dev and pkg.go.dev. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Golang Samber Lo is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.3k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Golang Samber Lo: Valgo (cohesivestack/valgo, 508 stars), Golang Samber Mo (samber/cc-skills-golang, 3.4k stars), Go-Redis Release Preparation (redis/go-redis, 22k stars) and Machinist (owainlewis/machinist, 496 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
context-labs (a GitHub organization) maintains it in context-labs/whip, which has 1,083 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on October 5, 2026.
Source: context-labs/whip on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.