Sign inGet started
–

Guides Go developers in using the spf13/viper library for layered configuration with flags, environment variables, config files, and hot reload.

Lift · GLM-5.3-flash—not yet benchmarked
91
Trustsecurity · quality · license · upkeep
Scan Saferisk 0/100
LicenseMITserved via MCP

What it does

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`.

#cobra#configuration#env-vars#golang#testing#viper

Quality judgment

completeness
9.0/10
clarity
9.0/10
trigger quality
8.5/10
examples
8.5/10
structure
9.0/10
overall
9.0/10

Excellent, well-scoped skill covering precedence, env binding, flag binding, unmarshaling, hot reload, and test isolation with correct, idiomatic code and sharp gotchas (fsnotify inode trap, BindPFlag timing). Reference files are cited but not shown, slightly limiting standalone completeness; triggers are clear but could specify more edge conditions.

allowed-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__*

Files (8)

evals/evals.json · 21.0 KBLICENSE · 1.0 KBreferences/binding-and-env.md · 4.2 KBreferences/sources-and-formats.md · 3.7 KBreferences/testing-and-isolation.md · 4.1 KBreferences/unmarshal.md · 4.4 KBreferences/watch-and-reload.md · 3.5 KBSKILL.md · 10.0 KB