golem-add-secret-moonbit

Adds secret configuration to MoonBit Golem agents using typed config structs and CLI commands.

1.5k|212|Updated Nov 24, 2023
One-click install
npx skills add https://github.com/golemcloud/golem --skill golem-add-secret-moonbit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-add-secret-moonbit
Source: https://github.com/golemcloud/golem/tree/main/golem-skills/skills/moonbit/golem-add-secret-moonbit
Command: npx skills add https://github.com/golemcloud/golem --skill golem-add-secret-moonbit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing sensitive values like API keys, passwords, and tokens in MoonBit Golem agents requires a secure mechanism that keeps secrets out of source-controlled files while making them accessible at runtime. This Skill guides you through declaring, wiring, reading, and managing secrets in MoonBit agents on the Golem platform.

Core Features & Use Cases

  • Typed Secret Declaration: Declare secret fields with @config.Secret[T] inside #derive.config structs and inject them via @config.Config[T] in the agent constructor.
  • Runtime Secret Access: Reveal secret values lazily with .get!(), which pins the resolved revision for deterministic retries and can observe updates without restarting the agent.
  • CLI Secret Management: Create, list, update, and delete environment-scoped secrets with golem secret commands, plus secretDefaults in golem.yaml for local development.
  • Use Case: You are building a MoonBit agent that calls an external API. Declare an api_key : @config.Secret[String] field, create the secret with golem secret create apiKey --secret-type String --secret-value "sk-abc123", and read it at runtime with .get!().

Quick Start

Add a secret API key field to my MoonBit Golem agent's config struct and show me how to set its value with the golem CLI.

Frequently Asked Questions about golem-add-secret-moonbit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add secrets to a MoonBit Golem agent?

Declare secret fields with @config.Secret[T] inside a #derive.config struct, receive the config via @config.Config[T] in the agent constructor, and call .get!() on the secret field at runtime to reveal its value.

How do I create and update secrets with the golem CLI?

Use golem secret create <path> --secret-type String --secret-value "value" to create a secret, and golem secret update-value <path> --secret-value "new" to change it. You can also list and delete secrets, using --id <uuid> as an alternative to the positional path.

Are Golem secrets stored in golem.yaml or source control?

No, secrets are not stored in golem.yaml and are never checked into source control. They are managed per-environment via the CLI, though secretDefaults in golem.yaml can provide values for local development only.

Why does my MoonBit snake_case secret field appear as camelCase in the CLI?

The Golem platform normalizes secret paths to camelCase, so a MoonBit field like api_key becomes apiKey in the CLI and manifest. Use the camelCase form when running commands such as golem secret create apiKey.

Can a running Golem agent see updated secret values?

Yes, secrets are lazily loaded, so a fresh .get!() call can observe updated values without restarting the agent. Each reveal pins the resolved secret revision for deterministic retries and replay.