Preset Cli Mutations

作者 preset-io73d26746350d無授權條款收錄於 2026年10月8日更新於 2026年10月8日

State-changing Preset `sup` CLI workflows: chart/dashboard/dataset push, user push/invite, destructive flags, and cross-workspace sync. Use only for CLI mutation workflows. Do not use for MCP-only work. Do not use for direct HTTP/SDK mutations.

僅含說明DevOps & Cloud
AI 產生的概覽

指導安全的 Preset sup CLI 變更操作,如 push、sync 與使用者邀請,包含預覽與鍵入確認。

功能
此技能提供執行會改變狀態的 Preset sup CLI 工作流程說明:單一工作區寫入(如圖表、儀表板與資料集 push、使用者 push 與邀請),以及透過 sync 進行的跨工作區推廣。它定義了工作流程順序:確定來源與目標工作區、驗證設定、預覽或比對變更、彙總資產數量與回復預期,並在執行前要求包含字面破壞性旗標字串的鍵入確認。內容也涵蓋破壞性旗標、dry-run 處理、sync 範本與回復風險,以及憑證遮蔽。
適用情境
當操作人員需要執行或審查會改變狀態的 Preset CLI 操作時使用,包括帶 force 或 overwrite 旗標的 push 以及跨工作區 sync。它不適用於僅使用 MCP 的工作,也不適用於直接的 HTTP 或 SDK 變更。在執行前預覽變更並確認破壞性操作時同樣適用。
執行需求
需要已驗證且可存取相關工作區的 Preset sup CLI(preset-cli),以及可進行鍵入確認的互動式操作人員。僅為說明文件,不附帶指令碼。使用 CLI 意味著需要連線至 Preset 的網路。

preset-cli-mutations

Use for state-changing CLI operations: single-workspace writes (push, --force, --overwrite) and cross-workspace promotion (sync).

Always

  • Use preset-cli first to establish auth, workspace, and output context.
  • CLI mutation surface only; route HTTP mutations to preset-api-skills.
  • Preview before execution: native --dry-run for sup sync run, sup user push, and sup user invite; pull-and-diff for sup chart push / sup dashboard push / sup dataset push (no native --dry-run).
  • Identify source AND target workspace explicitly before any cross-workspace operation.
  • Require explicit typed user confirmation that contains the literal --force / --overwrite flag string when applicable.
  • Redact tokens and credential-bearing output in transcripts.

Decision Rules

  • Distinguish single-workspace writes (sup chart/dashboard/dataset push) from cross-workspace sync (sup sync run).
  • Treat --force and --overwrite as destructive flags; never invoke without explicit per-flag confirmation.
  • For mutating command groups not named on this card, load command coverage and stop unless it explicitly marks the command as mutation-gated.
  • Do not let CI / automation context bypass the confirmation step; refuse if no interactive operator is available.
  • Route HTTP mutations to the API plugin; route MCP-driven workflows to the MCP plugin.

Workflow Order

  1. Resolve source and (if cross-workspace) target workspace.
  2. Validate configuration where the command supports it (e.g. sup sync validate) before previewing.
  3. Preview / diff to surface what will change.
  4. Summarize asset counts, target effects, rollback expectations, and any destructive flags.
  5. Ask for typed confirmation containing the literal destructive flag string.
  6. Stop before execution and wait for the typed confirmation.
  7. Execute only after confirmation.

Retrieve

  • Single-workspace writes (push, --overwrite, --force, dependency handling): references/write-operations.md [blocked]
  • Cross-workspace promotion (sync, source/target, Jinja2, --dry-run): references/cross-workspace-sync.md [blocked]
  • Sync templating, rollback, and multi-target risk: references/sync-templating-and-rollback.md [blocked]
  • Preview and dry-run handling: references/preview-and-dry-run.md [blocked]
  • Confirmation template and abort triggers: references/confirmation-template.md [blocked]
  • Confirmation overview and audit expectations: references/confirmation-and-dry-run.md [blocked]
  • Registered command coverage and uncovered mutation routing: load preset-cli and then references/command-coverage.md.
  • Approval gates, redaction, abort triggers: load preset-cli and then references/safety-policy.md.

來源與署名

來源:preset-io/agent-skills位於plugins/preset-cli-skills/skills/preset-cli-mutations提交73d2674

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架