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 (API keys, database URLs, configuration values) in their SKILL.md frontmatter. The CLI manages these securely on your local machine, injecting them into skills at install time.
Set Variables
Use skillreg env set to define one or more environment variables for a skill. Values are provided in KEY=value format.
skillreg env set<skill> <pairs...>Set one or more environment variables for a skill in KEY=value format.
| Flag | Description | Default |
|---|---|---|
| --org <slug> | Target organization slug | — |
$ skillreg env set my-skill API_KEY=sk-123 DB_URL=postgres://localhost:5432/app
Set 2 variable(s) for my-skillStorage location
Values are stored locally in ~/.skillregrc.env/<org>/<skill>.env. They are never uploaded to the registry.
List Variables
View configured environment variables. Without a skill name, you get a summary of all skills with env var counts. With a skill name, you see each variable with its value partially masked.
skillreg env list[skill]List environment variables. Omit the skill name to see a summary of all skills.
| Flag | Description | Default |
|---|---|---|
| --org <slug> | Target organization slug | — |
$ skillreg env list
SKILL VARIABLES
my-skill 2
deploy-k8s 3
code-review 1
$ skillreg env list my-skill
KEY VALUE
API_KEY sk-1****
DB_URL post****Delete Variables
Remove specific environment variables from a skill. Pass one or more key names to delete.
skillreg env delete<skill> <keys...>Remove one or more environment variables from a skill.
| Flag | Description | Default |
|---|---|---|
| --org <slug> | Target organization slug | — |
$ skillreg env delete my-skill DB_URL
Deleted 1 variable(s) from my-skillHow Env Injection Works
When you run skillreg pull, the CLI handles environment variables automatically through the following process:
- Reads the
envdeclarations from the skill'sSKILL.mdfrontmatter - Prompts you interactively for any missing values (interactive wizard)
- Injects the values into the installed
SKILL.mdas HTML comments - Replaces
${VARIABLE}placeholders in the skill content with actual values
Values stay local
Env values are injected locally into your installed copy of the skill. They never leave your machine and are never sent to the registry.