Notre avis
Définit une variable d'environnement spécifiée avec une valeur donnée dans l'environnement du nanobot.
Points forts
- Interface simple et explicite en entrée JSON.
- Gestion des erreurs claire (JSON invalide, champs manquants, types incorrects).
- Confirmation immédiate de la modification.
Limites
- Ne persiste pas au-delà de la session du nanobot.
- N'affecte que l'environnement du nanobot, pas le système hôte.
Utilisez cette compétence lorsque vous avez besoin de configurer temporairement des variables d'environnement pour les exécutions ultérieures du bot.
Évitez de l'utiliser pour des modifications d'environnement persistantes ou globales.
Analyse de sécurité
PrudenceThe 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.
Exemples
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'."
}
Architecte Docker Compose
DevOps
Concoit des configurations Docker Compose optimisees.
Rapport de Post-Mortem
DevOps
Rédige des rapports post-mortem d'incidents structurés et blameless.
Créateur de Runbooks
DevOps
Crée des runbooks opérationnels clairs pour les procédures DevOps courantes.