1---2name: li-lance-android-seraphim-framework-golang-configuration3description: Golang Configuration4---56# Golang Configuration78## **Priority: P1 (STANDARD)**910## Principles1112- **12-Factor App**: Store config in environment variables.13- **Typed Config**: Load config into a struct, validate immediately.14- **Secrets**: Never commit secrets. Use env vars or secret managers.15- **No Globals**: Return a Config struct and inject it.1617## Implementation Workflow18191. **Define Config struct** — Create a typed struct with all required fields.202. **Load defaults** — Set sensible defaults for non-secret values.213. **Override from file** — Optionally load from YAML/JSON config file.224. **Override from env** — Environment variables take highest priority.235. **Validate at startup** — Crash immediately on missing required config.246. **Inject via constructor** — Pass Config to services; never use global config vars.2526See [config struct and usage examples](references/config-patterns.md)2728## Libraries2930- **Standard Lib**: `os.Getenv` for simple apps.31- **Viper**: Industry standard for complex configs (env, files, remote).32- **Koanf**: Lighter, cleaner alternative to Viper.33- **Caarlos0/env**: Strict struct tagging approach.3435## Anti-Patterns3637- **No hardcoded secrets**: Load all secrets from env vars or a secret manager.38- **No global config vars**: Return a typed Config struct and inject via constructors.39- **No silent startup**: Crash immediately on missing required env vars.4041## References4243- [Config Pattern](references/config-patterns.md)4445---46> Source: [li-lance/android-seraphim-framework](https://github.com/li-lance/android-seraphim-framework) — distributed by [TomeVault](https://tomevault.io).47<!-- tomevault:4.0:skill_md:2026-06-16 -->
Run npx skillmds@latest add tomevault-io/li-lance-android-seraphim-framework-golang-configuration in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Golang Configuration It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.