Environment Variables

Configure secrets and environment variables for your SkillReg skills. Manage sensitive data securely across development and production.

Overview

Skills can declare environment variables in their SKILL.md frontmatter. Environment variables are stored locally per organization, so one variable value can satisfy every installed skill that declares the same variable.

Values are never uploaded to the registry. The desktop app uses the OS secure store when available; the CLI currently uses the local org-level fallback file until secure-store CLI support is implemented.

Set Variables

Use skillreg env set to define one or more org-level variables in KEY=value format.

skillreg env set<pairs...>

Set one or more org-level environment variables in KEY=value format.

FlagDescriptionDefault
--org <slug>Target organization slug
Terminal
$ skillreg env set OPENAI_API_KEY=<value> DATABASE_URL=<value>

  Variables stored once for @acme

Local storage

The primary CLI fallback path is ~/.skillreg/env/<org>/variables.env, with metadata in ~/.skillreg/env/<org>/index.json. Legacy per-skill files at ~/.skillreg/env/<org>/<skill>.env remain readable for compatibility.

List Variables

View configured org-level variables. Output shows names and storage metadata only; it does not reveal values.

skillreg env list

List org-level environment variable metadata.

FlagDescriptionDefault
--org <slug>Target organization slug
--jsonEmit structured metadata without values
Terminal
$ skillreg env list

  Env vars stored once for @acme:
    OPENAI_API_KEY=**** (fallback_file)
    DATABASE_URL=**** (fallback_file)

Delete Variables

Remove one or more org-level variables. Legacy per-skill files are not modified by this command.

skillreg env delete<keys...>

Remove one or more org-level environment variables.

FlagDescriptionDefault
--org <slug>Target organization slug
Terminal
$ skillreg env delete DATABASE_URL

  Removed 1 org-level variable for @acme

Legacy Compatibility

Older CLI versions wrote values to per-skill files. Current CLI builds still read those files for compatibility, but new writes are org-level by default.

skillreg env legacy

Show legacy per-skill env files without values.

FlagDescriptionDefault
--org <slug>Target organization slug
--jsonEmit structured metadata
skillreg env migrate

Migrate non-conflicting legacy values into org-level storage.

FlagDescriptionDefault
--org <slug>Target organization slug
--jsonEmit migration summary
skillreg env cleanup-legacy

Preview or confirm cleanup of migrated legacy keys.

FlagDescriptionDefault
--org <slug>Target organization slug
--confirmApply cleanup changes
--jsonEmit cleanup summary
Terminal
$ skillreg env migrate
$ skillreg env cleanup-legacy --confirm

Pull Readiness

When you run skillreg pull, the CLI checks org-level variables first. It prompts only for missing required variables, then stores any new values once for the organization.

If a legacy per-skill value exists and there is no conflict for that variable, the CLI treats it as configured. If legacy values conflict, the CLI reports the conflict and will not overwrite or choose a value automatically.