Config Manager
/install legend-config-manager
Config Manager
Handles configuration files through safe, validated operations that preserve syntax and formatting.
Core Workflows
Format Detection
Identify config format by extension:
.json→ JSON.yaml,.yml→ YAML.toml→ TOML.env→ Environment variables.ini→ INI format.xml→ XML.cfg,.conf→ Generic config
Safe Editing Rules
Golden Rule: Never manually edit structured configs unless trivial. Use tools:
- JSON:
jqfor CLI, JSON.parse/stringify for code - YAML:
yqfor CLI, yaml libraries for code - TOML:
tomllibraries (no standard CLI tool)
Common Operations
Read Values
# 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'])"
Update Values
# 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
Add New Keys
# JSON
jq '.newKey = "value"' config.json > tmp && mv tmp config.json
# YAML
yq -i '.newKey = "value"' config.yaml
Remove Keys
# JSON
jq 'del(.unwantedKey)' config.json > tmp && mv tmp config.json
# YAML
yq -i 'del(.unwantedKey)' config.yaml
Validation Before Save
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')"
Formatting Preservation
- Use
yq -ifor in-place YAML edits (preserves comments) - Use
jqwith--indentto control JSON spacing - Never mix tabs/spaces in YAML
- Preserve trailing newlines
Creating New Configs
Use templates or generate programmatically:
# JSON
echo '{"key": "value"}' | jq '.' > new-config.json
# YAML
cat > new-config.yaml \x3C\x3C EOF
key: value
nested:
key2: value2
EOF
Safety Rules
- Validate syntax before saving any changes
- Backup first - Copy original before destructive edits
- Use tools, not manual edits -
jq/yqfor JSON/YAML - Test after changes - Load config in application context
- Respect workspace boundaries - Only touch ~/openclaw configs
- Never commit secrets - Use .env for sensitive values, gitignore them
When to Read references/formats.md
Load when:
- Need detailed format specifications (JSON schema, YAML anchors)
- Complex merge/conflict resolution needed
- Format conversion required (JSON↔YAML↔TOML)
- Validation schemas or type checking needed
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install legend-config-manager - 安装完成后,直接呼叫该 Skill 的名称或使用
/legend-config-manager触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Config Manager 是什么?
Safe configuration file editing for JSON, YAML, TOML, and other config formats. Use when working with configuration files for: (1) Reading config values, (2)... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 119 次。
如何安装 Config Manager?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install legend-config-manager」即可一键安装,无需额外配置。
Config Manager 是免费的吗?
是的,Config Manager 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Config Manager 支持哪些平台?
Config Manager 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Config Manager?
由 dougchambers(@dougchambes)开发并维护,当前版本 v1.0.0。