Skills for Real Engineers. Straight from my .agents directory.
golang-spf13-viper
Agent skill fromsamber/cc-skills-golang
Golang configuration library using spf13/viper — layered precedence (flag > env > file > KV > default), BindPFlag/BindPFlags, SetEnvPrefix + SetEnvKeyReplacer + AutomaticEnv, ReadInConfig + ConfigFileNotFoundError, Unmarshal + mapstructure struct tags, Sub for sub-trees, WatchConfig + OnConfigChange for hot reload, viper.New() for test isolation, and remote KV integration. Apply when using or adopting spf13/viper, or when the codebase imports `github.com/spf13/viper`. For CLI command structure alongside viper, see the `samber/cc-skills-golang@golang-spf13-cobra` skill. For general CLI architecture, see `samber/cc-skills-golang@golang-cli`.
How to install golang-spf13-viper
npx skills add samber/cc-skills-golang# or add only this skill to Claude Code: copy the folder
skills/golang-spf13-viper/
# into
~/.claude/skills/golang-spf13-viper/ (all projects)
.claude/skills/golang-spf13-viper/ (one project)
1**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.23# Using spf13/viper for layered configuration in Go45Viper 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.67**Official Resources:**89- [pkg.go.dev/github.com/spf13/viper](https://pkg.go.dev/github.com/spf13/viper)10- [github.com/spf13/viper](https://github.com/spf13/viper)1112This skill is not exhaustive — refer to library documentation and code examples for more information:1314- For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `samber/cc-skills-golang@golang-pkg-go-dev` skill (`godig`), preferred over Context7 for Go package facts.15- To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `samber/cc-skills-golang@golang-gopls` skill (`gopls`).16- Context7 remains a fallback for docs not indexed on pkg.go.dev.1718```bash19go get github.com/spf13/viper@latest20```2122## Viper vs. cobra23…
Excerpt shown under the repository's MIT license.
More skills in cc-skills-golang
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
