Go-Redis Release Preparation
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.
Golang configuration library using spf13/viper — layered precedence (flag env file KV default), AutomaticEnv, ReadInConfig, Unmarshal + mapstructure, WatchConfig hot reload.
$ npx skills add context-labs/whip --skill golang-spf13-viper -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install context-labs/whip golang-spf13-viper --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-spf13-viper .claude/skills/golang-spf13-viper && 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-spf13-viper" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-spf13-viper into .claude/skills/golang-spf13-viper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-spf13-viper", 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-spf13-viperType 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-spf13-viper -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install context-labs/whip golang-spf13-viper --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-spf13-viper .agents/skills/golang-spf13-viper && 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-spf13-viper" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-spf13-viper into .agents/skills/golang-spf13-viper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-spf13-viper", 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-spf13-viper -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install context-labs/whip golang-spf13-viper --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-spf13-viper .cursor/skills/golang-spf13-viper && 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-spf13-viper" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-spf13-viper into .cursor/skills/golang-spf13-viper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-spf13-viper", 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-spf13-viper--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-spf13-viper -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install context-labs/whip golang-spf13-viper --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-spf13-viper .gemini/skills/golang-spf13-viper && 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-spf13-viper" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-spf13-viper into .gemini/skills/golang-spf13-viper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-spf13-viper", 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-spf13-viperInstalls 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-spf13-viper -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-spf13-viper .github/skills/golang-spf13-viper && 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-spf13-viper" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-spf13-viper into .github/skills/golang-spf13-viper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-spf13-viper", 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-spf13-viper -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-spf13-viper --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-spf13-viper .opencode/skills/golang-spf13-viper && 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-spf13-viper" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-spf13-viper into .opencode/skills/golang-spf13-viper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-spf13-viper", 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-spf13-viperGolang configuration library using spf13/viper — layered precedence (flag env file KV default), AutomaticEnv, ReadInConfig, Unmarshal + mapstructure, WatchConfig hot reload.
Golang Spf13 Viper is an agent skill from context-labs/whip. Golang configuration library using spf13/viper — layered precedence (flag env file KV default), AutomaticEnv, ReadInConfig, Unmarshal + mapstructure, WatchConfig hot reload. Apply when using/adopting viper or the codebase imports github.com/spf13/viper. CLI commands: golang-spf13-cobra.
Its SKILL.md is about 2.5k 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/binding-and-env.md` and `references/sources-and-formats.md`). Compatibility notes: Designed for Claude Code, Codex or similar harness, and for projects using Golang.
It sits in Development. 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:*)AgentWebFetch…and 6 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.compkg.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 Spf13 Viper loads about 2.5k tokens when it runs, and up to ~7k if it reads all its reference files. Until then it costs about 79 tokens; SKILL.md has 844 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). 844 words, ~2,454 tokens.
.claude/skills/golang-spf13-viper/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 treats configuration as a layered system. Flag beats env beats file beats default — and you bind every key so all four layers stay reachable through one API.
Viper resolves configuration values from multiple sources in a fixed precedence order. It has no user-facing surface — it doesn't define commands or flags. Its job is to answer "what is the value of key X right now?" by walking its source layers from highest to lowest priority.
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 get github.com/spf13/viper@latestCobra owns the command tree — subcommands, flags, arg validation, completions. Viper owns configuration resolution — it answers "what is the value of key X?" by walking its source layers. Viper has no user-facing surface; it is purely a key-value resolver. Use cobra alone for flag-only CLIs; viper alone for config-file daemons; both when you need both, binding flags at PersistentPreRunE via BindPFlag.
→ See samber/cc-skills-golang@golang-spf13-cobra for the cobra side of this integration.
Viper resolves a key by walking sources in this order (first set value wins):
1. explicit Set() — viper.Set("key", val) highest priority
2. flag — bound pflag.Flag
3. env var — BindEnv / AutomaticEnv
4. config file — ReadInConfig / MergeInConfig
5. KV remote — etcd / Consul
6. default — viper.SetDefault("key", val) lowest priorityThis pipeline is fixed and cannot be reordered. Understanding it prevents most viper bugs: a key that "should" come from a config file may be shadowed by an env var or a flag with a default value.
viper.SetConfigName("config")
viper.AddConfigPath("$HOME/.myapp")
if err := viper.ReadInConfig(); err != nil {
var notFound *viper.ConfigFileNotFoundError
if !errors.As(err, ¬Found) {
return fmt.Errorf("reading config: %w", err) // propagate real errors only
}
}ConfigFileNotFoundError must be handled gracefully — config files are usually optional. An unhandled error from a missing file crashes programs that are perfectly valid when run with only flags or env vars.
For supported formats (JSON, TOML, YAML, HCL, INI, properties), MergeInConfig, and remote KV, see sources-and-formats.md.
This is the highest-bug-density area in viper. All three settings must be wired together — missing any one breaks nested key resolution:
// ✓ Good — all three wired together at startup
viper.SetEnvPrefix("MYAPP") // prevent collisions: PORT → MYAPP_PORT
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) // database.host → MYAPP_DATABASE_HOST
viper.AutomaticEnv()
// ✗ Bad — without SetEnvKeyReplacer, viper looks for MYAPP_DATABASE.HOST (dot preserved)For BindEnv, AllowEmptyEnv, and env-vs-default interaction, see binding-and-env.md.
Bind cobra flags to viper in init() or PersistentPreRunE — never in RunE (config loading in PersistentPreRunE already ran before RunE, so bindings set in RunE are missed):
func init() {
rootCmd.PersistentFlags().Int("port", 8080, "listen port")
viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port"))
// viper.BindPFlags(cmd.Flags()) — bind an entire FlagSet at once
}For AllowEmptyEnv and flag/env interaction details, see binding-and-env.md.
viper.Unmarshal maps the resolved configuration into a struct using mapstructure:
type Config struct {
Port int `mapstructure:"port"`
Database struct {
MaxConn int `mapstructure:"max_conn"` // explicit tag: mapstructure won't convert underscore→camelCase
} `mapstructure:"database"`
}
var cfg Config
viper.Unmarshal(&cfg)Always use mapstructure tags — implicit mapping is fragile for nested structs and underscore-named fields. Prefer UnmarshalKey("database", &dbCfg) over Sub("database").Unmarshal — it avoids the nil-check Sub requires when the key is missing.
For time.Duration / net.IP / slice decoders and custom DecodeHook registration, see unmarshal.md.
viper.Sub("database") returns a new *viper.Viper scoped to the prefix, or nil if the key does not exist — always nil-check before calling methods on the result. Prefer UnmarshalKey("database", &dbCfg) which avoids the nil risk entirely.
viper.WatchConfig()
viper.OnConfigChange(func(e fsnotify.Event) { /* re-apply changed values */ })WatchConfig uses fsnotify and watches inodes. Editors that write atomically via rename (vim, neovim) replace the inode — the callback may not fire. Test hot-reload with echo >> config.yaml, not editor saves. For race-safe reload patterns, see watch-and-reload.md.
Never use the global viper in tests — state leaks across test cases. Use viper.New() per test so each instance is isolated:
v := viper.New()
v.SetConfigFile("testdata/config.yaml")
require.NoError(t, v.ReadInConfig())For t.Setenv interactions and Reset() limitations, see testing-and-isolation.md.
database.host → DATABASE.HOST instead of DATABASE_HOST).ConfigFileNotFoundError gracefully — a missing config file should not crash a service that runs with only flags and env vars.mapstructure tags on config structs — implicit mapping silently misses nested and underscore-named fields.viper.New() in tests, never the global — the global accumulates state across test runs; per-test instances are isolated.Execute() — binding in RunE is too late; cobra parses flags before RunE runs.| Mistake | Why it fails | Fix |
|---|---|---|
AutomaticEnv without SetEnvKeyReplacer | database.host looks for MYAPP_DATABASE.HOST (dot preserved) — never matches | Add SetEnvKeyReplacer(strings.NewReplacer(".", "_")) before AutomaticEnv |
No mapstructure tags on struct fields | Silently misses nested and underscore-named fields | Add mapstructure:"key_name" to every field |
| Using global viper in tests | State from one test contaminates the next, causing flaky ordering | Create viper.New() per test |
Missing ConfigFileNotFoundError check | Missing config file crashes a service that should run on flags/env alone | errors.As(err, ¬Found) — only propagate non-not-found errors |
samber/cc-skills-golang@golang-cli skill for general CLI architecture — project layout, exit codes, signal handling, cobra+viper integrationsamber/cc-skills-golang@golang-spf13-cobra skill for the cobra side of this integration (flag definition and binding)samber/cc-skills-golang@golang-testing skill for general Go testing patternsIf you encounter a bug or unexpected behavior in spf13/viper, open an issue at https://github.com/spf13/viper/issues.
© 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-spf13-viper of context-labs/whip.
Open the folder on GitHubat commit 8876467
Golang Spf13 Viper 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 Spf13 Viper this skillcontext-labs/whip | 1.1k | — | ~2.5k | 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 | |
| Valgocohesivestack/valgo | 508 | — | ~2.4k | Automated safety check: Pass | MIT | |
| Releaseyoanbernabeu/grepai | 1.9k | — | ~918 | Automated safety check: Pass | MIT | |
| Fix Gh Issuebeatlabs/harvester | 135 | — | ~783 | Automated safety check: Pass | Apache-2.0 |
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.
cohesivestack/valgo
Add, refactor, debug, review, explain, or migrate type-safe validation in consumer Go applications using github.com/cohesivestack/valgo.
yoanbernabeu/grepai
Create a new release for grepai. An agent skill from yoanbernabeu/grepai.
beatlabs/harvester
Fix a single GitHub issue end-to-end using wt. An agent skill from beatlabs/harvester.
ggwhite/go-masker
Release a new version of go-masker: update CHANGELOG.md from git log, create GitHub release.
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
Golang configuration library using spf13/viper — layered precedence (flag env file KV default), AutomaticEnv, ReadInConfig, Unmarshal + mapstructure, WatchConfig hot reload. Golang Spf13 Viper is an agent skill from context-labs/whip. Golang configuration library using spf13/viper — layered precedence (flag env file KV default), AutomaticEnv, ReadInConfig, Unmarshal + mapstructure, WatchConfig hot reload.
Golang Spf13 Viper fits situations like: development work in your project.
Run `npx skills add context-labs/whip --skill golang-spf13-viper -a claude-code`. Or copy the skill folder (.agents/skills/golang-spf13-viper in context-labs/whip) into .claude/skills/golang-spf13-viper in your project. Claude Code loads it when a task matches its description.
Run `npx skills add context-labs/whip --skill golang-spf13-viper -a codex`. Or copy the skill folder (.agents/skills/golang-spf13-viper in context-labs/whip) into .agents/skills/golang-spf13-viper 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-spf13-viper -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-spf13-viper, .gemini/skills/golang-spf13-viper, .github/skills/golang-spf13-viper and .opencode/skills/golang-spf13-viper in your project.
Going by SKILL.md and its folder, Golang Spf13 Viper 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:*), Agent, WebFetch, mcp__context7__resolve-library-id, mcp__context7__query-docs, 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 2 domains. As links in the text: github.com 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 Spf13 Viper 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.5k tokens (SKILL.md is roughly 9.8k 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 4.6k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Golang Spf13 Viper: Go-Redis Release Preparation (redis/go-redis, 22k stars), Machinist (owainlewis/machinist, 496 stars), Valgo (cohesivestack/valgo, 508 stars) and Release (yoanbernabeu/grepai, 1.9k 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.