agentsclimarketplace

Toml editor

Skill cbrunnkvist/agent-skills/skills/toml-editor

Install
npx -y skills add cbrunnkvist/agent-skills --skill toml-editor

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Edit TOML files programmatically using yq, tmq, or toml-cli. Use when asked to edit .toml files, modify pyproject.toml, update pihole.toml, or any TOML operation. Triggers on "edit toml", "modify .toml", "toml file", "update pyproject.toml", "pihole.toml".

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

2.7 KB, as published. Nobody here has run it

TOML Editor

Edit .toml files without shell escaping issues. Three tools available:

ToolLangIn-placeProsReference
toml-cliRustNo (prints)Format-preserving, comments intactreferences/toml-cli.md
yqPythonYes (-i)jq-like syntax, widely knownreferences/yq.md
tmqGoYesZero-dependency binary, fastreferences/tmq.md

Recommendation: Prefer toml-cli for Pi-hole configs and other human-edited files where comment preservation matters. Prefer yq -t -i for automated transformations (CI, scripts). Pull the reference doc for your chosen tool above.

Installation (one-time)

# toml-cli — Rust
cargo install toml-cli
# or no-install: npx @toml-tools/editor set config.toml key "value"

# yq — Python
pip install yq
# or no-install: uvx yq -t -i '.key = "value"' config.toml

# tmq — Go
go install github.com/tmq/tmq@latest

Workflows

Adding a custom DNS record to Pi-hole v6

yq -t -i '.dns.hosts += ["10.13.37.180 myservice.lan"]' /etc/pihole/pihole.toml
pihole restartdns

Patching pyproject.toml

# Add a dependency
yq -t -i '.project.dependencies += ["httpx>=0.27"]' pyproject.toml

# Add optional dependency group
yq -t -i '.project.optional-dependencies.dev = ["pytest>=8"]' pyproject.toml

# Set Python version requirement
yq -t -i '.project.requires-python = ">=3.11"' pyproject.toml

Array append with toml-cli

toml get /etc/pihole/pihole.toml dns.hosts \
  | python3 scripts/append-toml-array.py "10.13.37.180 radarr.lan" \
  | toml set /etc/pihole/pihole.toml dns.hosts

Validation

python3 scripts/validate-toml.py file.toml
# or inline:
python3 -c "import tomllib; tomllib.load(open('file.toml','rb'))"

Safety

  • Back up before bulk edits: cp file.toml file.toml.bak
  • Validate after every edit
  • yq strips comments and reorders keys — use toml-cli when formatting matters
  • toml-cli has no -i — pipe to temp file and rename
  • No tool does true inline editing — they rewrite the file. Use version control.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.