What problem does it solve?
Rust Golem agents often need sensitive values like API keys, passwords, and tokens, but these must never be checked into source control alongside golem.yaml. This Skill shows how to declare, inject, read, and manage secrets safely per environment.
Core Features & Use Cases
- Secret Declaration: Mark fields of type Secret<T> with #[config_schema(secret)] inside a ConfigSchema struct, including nested config structs.
- Constructor Injection: Receive secrets through a Config<T> parameter annotated with #[agent_config] in the agent constructor, and reveal values at runtime with .get().
- CLI Management: Create, list, update, and delete environment-scoped secrets with golem secret commands, plus secretDefaults in golem.yaml for local development.
- Use Case: An agent connecting to a database declares host and port as regular config and the password as Secret<String>, then sets the real value per environment with golem secret create db.password.
Quick Start
Add a secret API key to my Rust Golem agent config and show me how to set its value with the golem CLI.