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 从公开仓库中收录这些内容。

举报或申请下架