| name | foxctl HTML Edit |
| description | Precise DOM-aware HTML editing using CSS selectors for targeted modifications. |
HTML Edit
Edit HTML precisely using CSS selectors. DOM-aware for reliable modifications.
Operations
foxctl run html/edit --input '{"path": "index.html", "operations": [{"type": "select", "selector": ".feature-card"}]}'
foxctl run html/edit --input '{"path": "index.html", "operations": [{"type": "insert", "selector": "#content", "position": "append", "html": "<section>New</section>"}]}'
foxctl run html/edit --input '{"path": "index.html", "operations": [{"type": "replace", "selector": ".hero h1", "html": "<h1>New Title</h1>", "inner": false}]}'
foxctl run html/edit --input '{"path": "index.html", "operations": [{"type": "update_attr", "selector": "a[href^=\"http\"]", "attributes": {"target": "_blank", "onclick": null}}]}'
foxctl run html/edit --input '{"path": "index.html", "operations": [{"type": "delete", "selector": ".deprecated"}]}'
foxctl run html/edit --input '{"path": "index.html", "operations": [{"type": "wrap", "selector": "img", "html": "<figure></figure>"}]}'
foxctl run html/edit --input '{"path": "index.html", "operations": [{"type": "unwrap", "selector": ".wrapper"}]}'
foxctl run html/edit --input '{"path": "index.html", "operations": [{"type": "structure"}]}'
foxctl run html/edit --input '{"path": "index.html", "operations": [{"type": "extract", "selector": ".hero"}]}'
Options
dry_run: true - Preview changes without writing
nth: 1 - Target nth match only (1-indexed)
limit: 5 - Max elements to affect
Multiple Operations
foxctl run html/edit --input '{
"path": "index.html",
"dry_run": true,
"operations": [
{"type": "delete", "selector": ".deprecated"},
{"type": "update_attr", "selector": "img", "attributes": {"loading": "lazy"}}
]
}'
Full docs: ~/.foxctl/share/configs/skills/foxctl-html-edit/Skill.md