Our review
Sets a specified environment variable to a given value in the nanobot's own environment.
Strengths
- Simple and explicit input using JSON.
- Clear error handling for invalid JSON, missing fields, and wrong types.
- Immediate confirmation of the change.
Limitations
- Does not persist beyond the nanobot session.
- Only affects the nanobot's environment, not the host system.
Use this skill when you need to temporarily configure environment variables for subsequent bot executions.
Avoid using it for permanent or system-wide environment changes.
Security analysis
CautionThe skill allows arbitrary environment variable setting, which can alter system behavior and potentially be exploited if input is user-controlled or malicious. It does not directly execute harmful commands, but the impact depends on how the environment is used by subsequent processes.
- •No restrictions on which environment variables can be set; could overwrite critical variables like PATH, HOME, or inject malicious values if input is not trusted.
Examples
Set the environment variable MY_API_KEY to value abc123Set environment variable DATABASE_URL to postgresql://localhost:5432/mydb---
name: environment-variable-set
description: Sets a specified environment variable to a given value.
metadata:
nanobot:
emoji: ⚙️
category: system
tags:
- environment
- configuration
- system
dependencies: []
---
## Instructions
This skill allows you to set environment variables. Environment variables are key-value pairs that provide configuration information to running processes. This skill modifies the environment of the nanobot itself.
**Input:**
The input to this skill is a JSON object with the following structure:
```json
{
"variable_name": "string",
"variable_value": "string"
}
variable_name: The name of the environment variable to set. This must be a string.variable_value: The value to assign to the environment variable. This must be a string.
Process:
- Parse the input JSON object.
- Extract the
variable_nameandvariable_valuefrom the parsed JSON. - Set the environment variable with the specified name to the specified value. This will affect subsequent skill executions and any internal processes the nanobot uses.
- Confirm the setting of the environment variable.
Output:
The output of this skill is a simple confirmation message:
{
"status": "success",
"message": "Environment variable '{variable_name}' set to '{variable_value}'."
}
Error Handling:
-
If the input is not valid JSON, return an error:
{ "status": "error", "message": "Invalid JSON input." } -
If
variable_nameorvariable_valueare missing from the JSON, return an error:{ "status": "error", "message": "Missing 'variable_name' or 'variable_value' in input." } -
If
variable_nameorvariable_valueare not strings, return an error:{ "status": "error", "message": "'variable_name' and 'variable_value' must be strings." }
Example:
Input:
{
"variable_name": "MY_API_KEY",
"variable_value": "abcdef123456"
}
Output:
{
"status": "success",
"message": "Environment variable 'MY_API_KEY' set to 'abcdef123456'."
}
Docker Compose Architect
DevOps
Designs optimized Docker Compose configurations.
Incident Postmortem Writer
DevOps
Writes structured and blameless incident postmortem reports.
Runbook Creator
DevOps
Creates clear operational runbooks for common DevOps procedures.