AGENT SKILL

safe-edit

Make a reviewable change to an existing page or article - snapshot first, edit, preview, report the diff. Use for any edit request on existing content, including re-filing an article under other categories or tags.

License 许可
Apache-2.0
最近更新
2026-11-15
Stars
★ 1
Forks
0

01 前言 Front Matter

name
safe-edit
license
Apache-2.0
metadata
{ "cloudhal.scopes": "site:read,content:read,content:write,preview:create", "cloudhal.approval": "", "cloudhal.schemaVersion": "1", "cloudhal.requiresCapabilities": "content" }
description
Make a reviewable change to an existing page or article - snapshot first, edit, preview, report the diff. Use for any edit request on existing content, including re-filing an article under other categories or tags.
compatibility
Requires the Cloudhal MCP server (get_page/get_entry, update_page/update_entry, list_terms, resolve_terms, create_snapshot, diff_snapshots, preview_page).

02 资源文件 2

03 SKILL.md 正文

Safe edit

The loop every change goes through: snapshot → edit → preview → diff → report. Never skip the preview, never publish.

Steps

  1. Read the current node (get_page or get_entry). Keep its rev; the server rejects stale revisions with a conflict — reload and retry once, then stop and report.
  2. create_snapshot labelled "Before: <short description>".
  3. Apply the smallest change that satisfies the request. Preserve section ids; add new sections with new ids only when asked. For categories and tags send only the delta — terms: {"tag": {"add": [...], "remove": [...]}} or {"category": {"primary": "…"}} — as described in references/retagging.md.
  4. preview_page (for articles, preview the page that lists them or the article path) and read the HTML back.
  5. diff_snapshots between the "Before" snapshot and a new create_snapshot labelled "After: <short description>"; include added/changed/removed counts in the report.
  6. Report: what changed (for terms: which were added or removed, and the primary), the preview URL, and the two snapshot ids so a human can roll back.

Rules

  • Do not change status; moving to review or published is publish-article.
  • Do not touch content in locales other than the one requested.
  • Do not create terms while editing. If a needed tag does not exist, say so (or propose_term when the user asked for it). Renaming, merging or retiring a term is not an edit: it changes every article that uses it and waits for a person.
  • Do not change the slug of a published article unless asked; say that it leaves a redirect.

04 同仓库更多 Skills

cloudhal-dev
cloudhal-dev/cloudhal

stale-review

Review a few published articles that have not been updated for a long time, make small safe fixes in drafts, and leave them as one proposed release for a person to schedule - never publishing anything. Built for a weekly scheduled agent task (begin_run, then end_run) that does not read visitor text. Use for a periodic content review or when asked which old articles need attention.

★ 1
cloudhal-dev
cloudhal-dev/cloudhal

site-design

Design or redesign Cloudhal pages that look modern and follow the site's own design rules (DESIGN.md). Use when asked to build, design, restyle or improve a page, a landing page or a home page, or to write the site's design rules.

★ 1
cloudhal-dev
cloudhal-dev/cloudhal

site-bootstrap

Set up a new Cloudhal site's first pages and navigation from a short brief. Use when a site is empty or the user asks to "set up", "scaffold" or "bootstrap" a site.

★ 1
cloudhal-dev
cloudhal-dev/cloudhal

rollback

Restore a site to an earlier snapshot after confirming the target with the user. Use when something published is wrong and the user asks to revert, undo or roll back.

★ 1
cloudhal-dev
cloudhal-dev/cloudhal

publish-article

Check a draft article, file it under the site's categories and tags, produce a preview and submit it for publication now or at a set time, optionally under an embargo or with an expiry. Use when the user asks to publish, release, schedule or go live with an article.

★ 1
cloudhal-dev
cloudhal-dev/cloudhal

comment-triage

Sort a site's reader-comment queue - label pending and reported comments, mark obvious spam and hide clear abuse - without ever approving or replying. Built for a scheduled agent task (begin_run, then end_run) that reads visitor text and so may only read, label and hide. Use for nightly or hourly comment triage, or when asked to go through the comment queue.

★ 1