Add Redis Command to go-redis
redis/go-redis
Walks through adding a new Redis or Redis module command to the go-redis client, from fetching the spec and docs to the type, interface wiring, parsing and tests.
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…
$ npx skills add context-labs/whip --skill golang-data-structures -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install context-labs/whip golang-data-structures --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-data-structures .claude/skills/golang-data-structures && 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-data-structures" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-data-structures into .claude/skills/golang-data-structures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-data-structures", 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-data-structuresType 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-data-structures -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install context-labs/whip golang-data-structures --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-data-structures .agents/skills/golang-data-structures && 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-data-structures" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-data-structures into .agents/skills/golang-data-structures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-data-structures", 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-data-structures -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install context-labs/whip golang-data-structures --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-data-structures .cursor/skills/golang-data-structures && 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-data-structures" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-data-structures into .cursor/skills/golang-data-structures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-data-structures", 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-data-structures--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-data-structures -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install context-labs/whip golang-data-structures --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-data-structures .gemini/skills/golang-data-structures && 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-data-structures" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-data-structures into .gemini/skills/golang-data-structures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-data-structures", 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-data-structuresInstalls 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-data-structures -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-data-structures .github/skills/golang-data-structures && 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-data-structures" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-data-structures into .github/skills/golang-data-structures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-data-structures", 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-data-structures -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-data-structures --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-data-structures .opencode/skills/golang-data-structures && 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-data-structures" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-data-structures into .opencode/skills/golang-data-structures/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-data-structures", 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-data-structuresGolang data structures — slices/maps internals (capacity growth, preallocation, hash buckets), slices/maps packages, container/list/heap/ring, strings.Builder vs bytes.Buffer, generic collections…
Golang Data Structures is an agent skill from 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, unsafe/weak pointers. Use when choosing or optimizing Go data structures or slice/map internals.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `evals/evals.json`, `references/containers.md` and `references/generics.md`). Compatibility notes: Designed for Claude Code, Codex or similar harness, and for projects using Golang.
It sits in Development. It works with Go. 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.
8 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:*)AgentBash(godig:*)…and 5 more on the same allowed-tools line.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are go).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
go.devresearch.swtch.comFrom 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 Data Structures loads about 2.6k tokens when it runs, and up to ~6.3k if it reads all its reference files. Until then it costs about 79 tokens; SKILL.md has 988 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). 988 words, ~2,557 tokens.
.claude/skills/golang-data-structures/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.Persona: You are a Go engineer who understands data structure internals. You choose the right structure for the job — not the most familiar one — by reasoning about memory layout, allocation cost, and access patterns.
Built-in and standard library data structures: internals, correct usage, and selection guidance. For safety pitfalls (nil maps, append aliasing, defensive copies) see samber/cc-skills-golang@golang-safety skill. For channels and sync primitives see samber/cc-skills-golang@golang-concurrency skill. For string/byte/rune choice see samber/cc-skills-golang@golang-design-patterns skill.
make(T, 0, n) / make(map[K]V, n) when size is known or estimable — avoids repeated growth copies and rehashingcontainer/heap for priority queues, container/list only when frequent middle insertions are needed, container/ring for fixed-size circular buffersstrings.Builder MUST be preferred for building strings; bytes.Buffer MUST be preferred for bidirectional I/O (implements both io.Reader and io.Writer)comparable for keys, custom interfaces for orderingunsafe.Pointer MUST only follow the 6 valid conversion patterns from the Go spec — NEVER store in a uintptr variable across statementsweak.Pointer[T] (Go 1.24+) SHOULD be used for caches and canonicalization maps to allow GC to reclaim entriesA slice is a 3-word header: pointer, length, capacity. Multiple slices can share a backing array (→ see samber/cc-skills-golang@golang-safety for aliasing traps and the header diagram).
= 256 elements: grows by ~25% (
newcap += (newcap + 3*256) / 4)
// Exact size known
users := make([]User, 0, len(ids))
// Approximate size known
results := make([]Result, 0, estimatedCount)
// Pre-grow before bulk append (Go 1.21+)
s = slices.Grow(s, additionalNeeded)slices Package (Go 1.21+)Key functions: Sort/SortFunc, BinarySearch, Contains, Compact, Grow. For Clone, Equal, DeleteFunc → see samber/cc-skills-golang@golang-safety skill.
Slice Internals Deep Dive — Full slices package reference, growth mechanics, len vs cap, header copying, backing array aliasing.
Maps are hash tables with 8-entry buckets and overflow chains. They are reference types — assigning a map copies the pointer, not the data.
m := make(map[string]*User, len(users)) // avoids rehashing during populationmaps Package Quick Reference (Go 1.21+)| Function | Purpose |
|---|---|
Collect (1.23+) | Build map from iterator |
Insert (1.23+) | Insert entries from iterator |
All (1.23+) | Iterator over all entries |
Keys, Values | Iterators over keys/values |
For Clone, Equal, sorted iteration → see samber/cc-skills-golang@golang-safety skill.
Map Internals Deep Dive — How Go maps store and hash data, bucket overflow chains, why maps never shrink (and what to do about it), comparing map performance to alternatives.
Fixed-size, value types. Copied entirely on assignment. Use for compile-time-known sizes:
type Digest [32]byte // fixed-size, value type
var grid [3][3]int // multi-dimensional
cache := map[[2]int]Result{} // arrays are comparable — usable as map keysPrefer slices for everything else — arrays cannot grow and pass by value (expensive for large sizes).
| Package | Data Structure | Best For |
|---|---|---|
container/list | Doubly-linked list | LRU caches, frequent middle insertion/removal |
container/heap | Min-heap (priority queue) | Top-K, scheduling, Dijkstra |
container/ring | Circular buffer | Rolling windows, round-robin |
bufio | Buffered reader/writer/scanner | Efficient I/O with small reads/writes |
Container types use any (no type safety) — consider generic wrappers. Container Patterns, bufio, and Examples — When to use each container type, generic wrappers to add type safety, and bufio patterns for efficient I/O.
Use strings.Builder for pure string concatenation (avoids copy on String()), bytes.Buffer when you need io.Reader or byte manipulation. Both support Grow(n). Details and comparison
Use the tightest constraint possible. comparable for map keys, cmp.Ordered for sorting, custom interfaces for domain-specific ordering.
type Set[T comparable] map[T]struct{}
func (s Set[T]) Add(v T) { s[v] = struct{}{} }
func (s Set[T]) Contains(v T) bool { _, ok := s[v]; return ok }Writing Generic Data Structures — Using Go 1.18+ generics for type-safe containers, understanding constraint satisfaction, and building domain-specific generic types.
| Type | Use Case | Zero Value |
|---|---|---|
*T | Normal indirection, mutation, optional values | nil |
unsafe.Pointer | FFI, low-level memory layout (6 spec patterns only) | nil |
weak.Pointer[T] (1.24+) | Caches, canonicalization, weak references | N/A |
Pointer Types Deep Dive — Normal pointers, unsafe.Pointer (the 6 valid spec patterns), and weak.Pointer[T] for GC-safe caches that don't prevent cleanup.
| Type | Copy Behavior | Independence |
|---|---|---|
int, float, bool, string | Value (deep copy) | Fully independent |
array, struct | Value (deep copy) | Fully independent |
slice | Header copied, backing array shared | Use slices.Clone |
map | Reference copied | Use maps.Clone |
channel | Reference copied | Same channel |
*T (pointer) | Address copied | Same underlying value |
interface | Value copied (type + value pair) | Depends on held type |
For advanced data structures (trees, sets, queues, stacks) beyond the standard library:
emirpasic/gods — comprehensive collection library (trees, sets, lists, stacks, maps, queues)deckarep/golang-set — thread-safe and non-thread-safe set implementationsgammazero/deque — fast double-ended queueWhen using third-party libraries, refer to their official documentation and code examples for current API signatures. 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.
samber/cc-skills-golang@golang-performance skill for struct field alignment, memory layout optimization, and cache localitysamber/cc-skills-golang@golang-safety skill for nil map/slice pitfalls, append aliasing, defensive copying, slices.Clone/Equalsamber/cc-skills-golang@golang-concurrency skill for channels, sync.Map, sync.Pool, and all sync primitivessamber/cc-skills-golang@golang-design-patterns skill for string vs []byte vs []rune, iterators, streamingsamber/cc-skills-golang@golang-structs-interfaces skill for struct composition, embedding, and generics vs anysamber/cc-skills-golang@golang-code-style skill for slice/map initialization style| Mistake | Fix |
|---|---|
| Growing a slice in a loop without preallocation | Each growth copies the entire backing array — O(n) per growth. Use make([]T, 0, n) or slices.Grow |
Using container/list when a slice would suffice | Linked lists have poor cache locality (each node is a separate heap allocation). Benchmark first |
bytes.Buffer for pure string building | Buffer's String() copies the underlying bytes. strings.Builder avoids this copy |
unsafe.Pointer stored as uintptr across statements | GC can move the object between statements — the uintptr becomes a dangling reference |
| Large struct values in maps (copying overhead) | Map access copies the entire value. Use map[K]*V for large value types to avoid the copy |
© 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 6 other files (references) in .agents/skills/golang-data-structures of context-labs/whip.
Open the folder on GitHubat commit 8876467
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in context-labs/whip, which our catalogue first saw on October 7, 2026.
Golang Data Structures 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 Data Structures this skillcontext-labs/whip | 1.1k | 1 repos | ~2.6k | Automated safety check: Pass | MIT | |
| Add Redis Command to go-redisredis/go-redis | 22k | — | ~1.4k | Automated safety check: Pass | BSD-2-Clause | |
| Go Pedantrychromedp/chromedp | 13k | — | ~3.7k | Automated safety check: Pass | MIT | |
| AO Desktop App LauncherOrchestratorInc/agent-orchestrator | 13k | — | ~2.4k | Automated safety check: Pass | Apache-2.0 | |
| Go-Redis Release Preparationredis/go-redis | 22k | — | ~1.1k | Automated safety check: Pass | BSD-2-Clause | |
| Run Dozzle Dev Instanceamir20/dozzle | 15k | — | ~747 | Automated safety check: Pass | MIT |
redis/go-redis
Walks through adding a new Redis or Redis module command to the go-redis client, from fetching the spec and docs to the type, interface wiring, parsing and tests.
chromedp/chromedp
This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…
OrchestratorInc/agent-orchestrator
Launches, restarts and troubleshoots the real AO Electron desktop app from a checkout, with isolated or real local data and checks for stale processes.
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.
amir20/dozzle
Starts a Dozzle dev server on a port derived from the current worktree so you can test by hand in a browser, without disturbing instances started elsewhere.
yaklang/yakit
对 Yakit 仓库的代码改动做规范化 code review:按代码逻辑、TS 定义、UI 引用与 Props、CSS 样式、依赖版本、配置项六个维度审查,检查测试用例缺失,强制执行 tsc 类型检查与 vitest 测试验证,输出「结果汇总 / 明细解释 / 合并结论」三块报告,经用户确认后写入文件。当用户要求 review、审查、评审代码改动,或在提交、合并、提 PR…
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
gRPC usage, protobuf organization, and production patterns for Go microservices.
Works with
Categories
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…. Golang Data Structures is an agent skill from context-labs/whip.Buffer, generic collections, unsafe/weak pointers.
Golang Data Structures fits situations like: optimizing Go data structures; slice/map internals.
Run `npx skills add context-labs/whip --skill golang-data-structures -a claude-code`. Or copy the skill folder (.agents/skills/golang-data-structures in context-labs/whip) into .claude/skills/golang-data-structures in your project. Claude Code loads it when a task matches its description.
Run `npx skills add context-labs/whip --skill golang-data-structures -a codex`. Or copy the skill folder (.agents/skills/golang-data-structures in context-labs/whip) into .agents/skills/golang-data-structures 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-data-structures -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-data-structures, .gemini/skills/golang-data-structures, .github/skills/golang-data-structures and .opencode/skills/golang-data-structures in your project.
SKILL.md names no scripts, command-line tools or credentials: Golang Data Structures is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(golangci-lint:*), Bash(git:*), Agent, Bash(godig:*), Bash(gopls:*), LSP, mcp__gopls__*, mcp__context7__resolve-library-id, mcp__context7__query-docs. Compatibility (from SKILL.md): Designed for Claude Code, Codex or similar harness, and for projects using Golang..
SKILL.md names 2 domains. As links in the text: go.dev and research.swtch.com. 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 Data Structures 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.6k tokens (SKILL.md is roughly 10k 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 3.7k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Golang Data Structures: Add Redis Command to go-redis (redis/go-redis, 22k stars), Go Pedantry (chromedp/chromedp, 13k stars), AO Desktop App Launcher (OrchestratorInc/agent-orchestrator, 13k stars) and Go-Redis Release Preparation (redis/go-redis, 22k 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,081 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.