rust-configlisted
Install: claude install-skill Dankosik/rust-service-template-rest
# Rust Config
**One owner per key.** A configuration key is declared, defaulted, and validated in one section file of the config crate, and nowhere else. Trace the key from that file through the loader to the value the runtime reads. Honor supplied requirements and preserve settled choices outside the requested change; resolve only what the task leaves open.
Precedence is fixed: code defaults, then the base file, then overlay files in order, then the APP-prefixed environment with double underscores between path segments. Every section type denies unknown fields and derives its defaults, which is what makes an undeclared key fail startup and a missing key take its default; there is no second registry to maintain. Values keep their human forms in files and environment alike: durations such as eight seconds, sizes such as one mebibyte, booleans, and enums by their documented spelling. An empty environment value is an explicit override that flows into validation; it never falls back.
To add a key, declare the field with the serde attribute its type needs, set the default with the reason for the value beside it, add the range or cross-field rule to the section's validate function with a message that names the dotted key, and add a loader test that sets the key through the environment plus a validation test for a rejected value. A rule spanning two sections belongs to the section that depends on the other and takes it as a parameter; a rule that needs process structure, such as