Install
openclaw skills install legend-config-managerSafe configuration file editing for JSON, YAML, TOML, and other config formats. Use when working with configuration files for: (1) Reading config values, (2) Updating/adding/removing keys, (3) Creating new config files, (4) Validating syntax, (5) Merging configs, (6) Converting between formats, or (7) Debugging config issues.
openclaw skills install legend-config-managerHandles configuration files through safe, validated operations that preserve syntax and formatting.
Identify config format by extension:
.json → JSON.yaml, .yml → YAML.toml → TOML.env → Environment variables.ini → INI format.xml → XML.cfg, .conf → Generic configGolden Rule: Never manually edit structured configs unless trivial. Use tools:
jq for CLI, JSON.parse/stringify for codeyq for CLI, yaml libraries for codetoml libraries (no standard CLI tool)# JSON
jq '.key' config.json
jq '.nested.key' config.json
# YAML
yq '.key' config.yaml
yq '.nested.key' config.yaml
# TOML (requires python/toml)
python -c "import toml; print(toml.load('config.toml')['key'])"
# JSON
jq '.key = "new value"' config.json > tmp && mv tmp config.json
# YAML
yq -i '.key = "new value"' config.yaml
# Always backup first
cp config.json config.json.bak
# JSON
jq '.newKey = "value"' config.json > tmp && mv tmp config.json
# YAML
yq -i '.newKey = "value"' config.yaml
# JSON
jq 'del(.unwantedKey)' config.json > tmp && mv tmp config.json
# YAML
yq -i 'del(.unwantedKey)' config.yaml
Always validate after edits:
# JSON
jq empty config.json && echo "Valid JSON"
# YAML
yamllint config.yaml || python -c "import yaml; yaml.safe_load(open('config.yaml'))"
# TOML
python -c "import toml; toml.load('config.toml')"
yq -i for in-place YAML edits (preserves comments)jq with --indent to control JSON spacingUse templates or generate programmatically:
# JSON
echo '{"key": "value"}' | jq '.' > new-config.json
# YAML
cat > new-config.yaml << EOF
key: value
nested:
key2: value2
EOF
jq/yq for JSON/YAMLLoad when: