workflows-snapshots

Clay 工作流 — 版本历史:查看快照、了解变更内容,并恢复或撤销之前的状态。当用户提到快照或要求撤销编辑时使用。

仓库最近推送
GitHub Stars
158
Forks
27
Issues / PRs
10

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "workflows-snapshots":https://skillpi.com/zh/skills/deepskill-2c134e33bdd64be017c167867c87476bf8011b0167ac34571c89ee9dc42195a2。安装前核对上游来源和版本:https://github.com/clay-run/agent-plugins。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

Clay 工作流 — 版本历史:查看快照、了解变更内容,并恢复或撤销之前的状态。当用户提到快照或要求撤销编辑时使用。

0 下载

介绍来源: third_party · clay-run · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: workflows-snapshots
description: 'Clay workflows — version history: view snapshots, see what changed, and restore or undo a previous state. Use when the user mentions snapshots or asks to undo an edit.'
allowed-tools: Bash(clay *), Bash(jq *), Read

Workflow snapshots & version history

Snapshots are immutable, point-in-time captures of the entire workflow graph — nodes, edges, prompts, scripts, tools, and positions.

Key concepts

  • Automatic creation: after every graph-mutating node edit (clay workflows nodes create|update|delete; Sculptor: edit_node) and when a run starts. data[0] is newest-by-createdAt, not necessarily the current graph. Sharing/binding a trigger onto an existing node does not snapshot — undo that create by deleting the trigger, not restore. Settings-only trigger update/delete also do not snapshot — revert or recreate the settings; do not delete the trigger and do not restore. graph format takes two snapshots when validation has no errors (pre-layout, then post-layout); details under Undo.
  • Restore does not reshuffle the list: snapshots restore rewrites the draft but does not create or reorder snapshots. Duplicate hashes reuse the existing row without updating createdAt. After a restore, data[0] can be a later history entry that is not the current graph, so the next edit's data[1] is often that stale entry rather than the pre-edit graph. Compare the latest snapshot to the current graph (or find the list row that matches) before treating data[1] as the undo target.
  • Content-addressed: Each snapshot has a SHA-256 hash of its contents. Identical workflow states deduplicate to the same hash
  • Immutable: Once created, a snapshot's graph content never changes
  • Run isolation: Runs are pegged to a specific snapshot. Editing the workflow doesn't affect in-flight runs

Draft-history vs published versions

The same snapshot table holds two roles:

Role When Purpose
Draft-history Auto on edits / run start Undo log and run pegging. No release number.
Published version User clicks Publish in the editor Numbered release (version, optional name). Becomes the live graph automation runs.

Publishing marks a snapshot of the current draft as a numbered release; it does not create a separate store. See the workflows entry-point skill's publishing.md for draft vs live.

This skill is for undo/history (list / get / restore). Publishing is a separate command (clay workflows publish); there is no CLI to list only published versions.

clay workflows snapshots list projects only id, hash, createdAt, nodeCount, and edgeCount. It does not show version / name / which snapshot is live. Treat the list as newest-first history, not a release picker — after a restore it is not a linear undo stack.

CLI reference

If clay isn't on PATH or clay whoami fails on auth, run the setup skill.

List recent snapshots

clay workflows snapshots list <workflowId>

Returns { data: [...] }, newest first, each with id, hash, createdAt, and nodeCount/edgeCount. So data[0] is the most recent snapshot by createdAt, which may not be the current graph (see restore above).

Show a snapshot (whole graph, or one node)

clay workflows snapshots get <workflowId> <snapshotId>
clay workflows snapshots get <workflowId> <snapshotId> --node-id <nodeId>

Returns the full captured graph: nodes (with types, prompts, code, tools) and edges. --node-id narrows nodes to a single node (edges are left intact).

Diff two snapshots

There is no built-in diff. Fetch both and compare with jq — but this raw diff is the underlying mechanism, not the thing you show the user:

clay workflows snapshots get <workflowId> <oldSnapshotId> | jq '.nodes' > old.json
clay workflows snapshots get <workflowId> <newSnapshotId> | jq '.nodes' > new.json
diff <(jq -S . old.json) <(jq -S . new.json)

Translate the diff into a plain-language change summary rather than pasting the raw diff output — e.g. "Node Find Email's prompt changed; the edge Research → Draft was removed; a new Score Lead agent node was added." When the change alters the graph's structure (nodes or edges added/removed/rewired), render before/after Mermaid diagrams so the user can see it, not just read it (see the workflows entry-point skill's presenting.md).

The only built-in diagram command always renders the workflow's current graph:

clay workflows diagram <workflowId> | jq -r '.diagram'   # always the current graph

There's no diagram command for an arbitrary snapshot id, so hand-write a small node/edge list from that snapshot's nodes/edges for its side. Label the diagrams by the direction of the change: "before" is the state you're changing from, "after" is the state you're ending up with — and use the command above for whichever side is the current graph. When previewing a restore (see "Restore to a snapshot" below), the restore overwrites the current graph with the snapshot, so the current graph is the "before" and the snapshot you're restoring to is the "after".

Restore to a snapshot

clay workflows snapshots restore <workflowId> <snapshotId>

Restores the workflow to the exact state captured in the snapshot. This replaces all current nodes, edges, prompts, scripts, and tools. Restore is destructive and does NOT snapshot the current graph first, and does not move the restored snapshot to the top of list — data[0] can still be a later history entry. The pre-restore state is recoverable only if a later edit or run already triggered a fresh snapshot capturing it (snapshots are taken automatically after each graph-mutating edit and at run start). If the current graph has unsnapshotted changes you might want back, run snapshots list first and note the snapshot that matches the current graph, not blindly data[0].

Restore ≠ publish. Restore rewrites the draft only. It does not change which snapshot is live, and undoing an edit does not roll back live automation. If the user wants live triggers to match the restored draft, they must Publish again in the editor (see the workflows entry-point skill's publishing.md).

Before restoring, show the user what will change. Summarize the difference between the current graph and the target snapshot in plain language, and — when the structure differs — show before/after diagrams (see "Diff two snapshots" above), so the user can confirm the revert before it destructively overwrites the current state. After restoring, render the restored graph so they can see the result.

Common workflows

Undo the last edit

Every graph-mutating write schedules a snapshot after it completes — fire-and-forget, so the new row may lag. Do not assume data[0] is the current graph or that data[1] is the pre-edit graph.

Trigger create only snapshots when it allocates a new canvas node. Sharing an existing workflowNodeId is not in the snapshot hash — undo that create with clay workflows triggers delete (Sculptor: surface delete), not restore. Settings-only trigger update/delete also are not snapshotted: revert or recreate the settings; do not delete the trigger and do not restore.

graph format is two steps when validation has no errors: a pre-layout snapshot is awaited, then a post-layout snapshot is scheduled. Restore the pre-layout id (same nodes/edges, different positions). If validation had errors, the pre-layout snapshot is skipped — .data[1] may be an older unrelated snapshot; do not restore it. If the graph had no prior snapshot, wait until the post-layout row has landed before treating .data[1] as the undo target.

Compare snapshots get vs the current graph (clay workflows graph get --mode full; Sculptor: MCP read with mode: "full") to tell current from newest-by-createdAt. If no row matches, the post-edit snapshot may still be in flight — poll or restore .data[0] (step 4); do not search for a snapshot of the unsnapshotted current graph. Only use Bash(clay *) / Bash(jq *) — poll by repeating list, not a shell for/seq/sleep loop (those are outside this skill's allowed-tools).

clay workflows snapshots list <workflowId> | jq -r '.data[0].id'   # newest — not always current
clay workflows snapshots list <workflowId> | jq -r '.data[1].id'   # next older — not always pre-edit
clay workflows snapshots restore <workflowId> <snapshotId>
  1. Find before_id before the edit: if .data[0] matches the current graph, before_id is .data[0].id. If not, walk the list until a row matches — that id is before_id. If none match, there is no restorable pre-edit snapshot; do not pass a null id to restore.
  2. With before_id (node/trigger edits): after the write, restore before_id. Do not restore .data[1] as a proxy — after a restore that id can be a later history entry.
  3. With before_id (after graph format): restore before_id only if that id matched the current graph before format. If you had no matching snapshot before format, call list until .data[0] matches the current (post-layout) graph, then restore .data[1].id only if it is the pre-layout graph (same nodes/edges, different positions). If validation had errors, that pre-layout row was never created — .data[1] can be an older unrelated snapshot; if so (or if .data[1] is missing), report no restorable pre-layout snapshot rather than rolling back more than the layout.
  4. Without before_id (late undo): compare .data[0] to the current graph. If they match, restore .data[1].id only if it exists — and only when you know .data[0] was already the current snapshot before the last edit (usual linear history). If .data[1] is missing, report no restorable pre-edit state. If they do not match, walk the list for a row that matches the current graph. If an older row matches (post-restore), restore that id — not .data[1], which can roll the workflow forward. If no row matches, the post-edit snapshot has not landed (fire-and-forget lag): poll list a few times. If .data[0] then matches, follow the match case above. If still none, restore .data[0] (still the pre-edit graph in linear history). Do not look for a snapshot of the current unsnapshotted graph — it cannot exist until that async row lands. Do not pass a null snapshot id to restore.

To undo multiple edits, pick an older snapshot id from the list instead.

Remember: this only rolls back the draft. Live automation (if already published) keeps running the previously published version until the user publishes again.

Compare current state to a previous version

List snapshots, then diff two of them with the jq recipe above.

Review what a run executed

Since runs are pegged to snapshots, inspect the exact workflow state a run used by looking up the run's snapshot id and passing it to snapshots get.

版本历史

  1. clay-cli-v1.22.0 GitHub ↗
    原版更新说明

    Standalone Clay CLI 1.22.0 binaries, consumed by the Clay agent plugin. ## What's new - `clay ad-syncs trigger <adSyncId>` starts an export of an ad sync’s audience to its destinations: a draft’s first trigger starts the sync, later triggers run it again, and a paused sync resumes. - When a command fails because of a plan limit, the agent shows the upgrade link from the error and offers a way to continue without the gated feature. - Various bug fixes and stability improvements.

  2. clay-cli-v1.21.0 GitHub ↗
    原版更新说明

    Standalone Clay CLI 1.21.0 binaries, consumed by the Clay agent plugin. ## What's new - `clay knowledge-hub skills create` saves agent skills to the workspace and resolves duplicate names without overwriting existing skills. - Various bug fixes and stability improvements.

  3. clay-cli-v1.20.0 GitHub ↗
    原版更新说明

    Standalone Clay CLI 1.20.0 binaries, consumed by the Clay agent plugin. ## What's new - `clay workflows runs bulk pause`, `resume`, and `stop` control many runs; `clay workflows triggers list` lists assignments and schedules, and `update --resume-paused-runs` resumes paused runs with a trigger. - `clay workflows groups publish-as-function` creates reusable functions; the Workflows and Enhanced Match skills guide Classify routing and hashed-email enrichment, and `clay workflows runs get` shows waterfall provider names. - `clay audiences activities` reads and summarizes record activities, retrieves Gong transcripts, and searches call content; `clay audiences records get` includes related-record references. - `clay searches query-mode reference --sections` retrieves selected reference sections. - Various bug fixes and stability improvements.

  4. clay-cli-v1.19.0 GitHub ↗
    原版更新说明

    Standalone Clay CLI 1.19.0 binaries, consumed by the Clay agent plugin. ## What's new - `clay workflows nodes insert --help` describes the Classify step: a Use AI step that sorts each record into one of a fixed set of categories with GPT 6 Luna or Jev, ready to branch on the chosen category. - `clay ad-syncs destinations delete` removes a destination from a paused or failed ad sync, not only a draft. - `clay searches preview` output includes `preview.isCurrent`, which says whether the stored preview still matches the search's current configuration. - Various bug fixes and stability improvements.

  5. clay-cli-v1.18.0 GitHub ↗
    原版更新说明

    Standalone Clay CLI 1.18.0 binaries, consumed by the Clay agent plugin. ## What's new - `clay workflows runs steps` accepts `--omit-payloads` to list steps without their input and output data, and `--step-ids s1,s2` to fetch selected steps using comma-separated IDs, up to 50 per request. - Various bug fixes and stability improvements.

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 工作流快照管理是自动化平台的核心功能,直接解决用户撤销编辑、版本对比、运行回溯等明确痛点
  • 文档详细说明了快照的自动创建机制、内容寻址特性、不可变性等关键概念
  • 提供了完整的 CLI 参考和常见工作流示例,覆盖 undo、diff、restore 等高频场景
触发精准85/100

亮点

  • 触发词精准完整,覆盖多种变体,边界清晰
  • description 明确说明使用场景为 'mentions snapshots or asks to undo an edit'
  • 文档中多次强调关键触发条件,如快照创建时机、restore 的限制等
结构规范90/100

亮点

  • Phase/步骤清晰,有出口条件,含端到端示例
  • frontmatter完整,单文件≤500行
  • 文档结构良好,包含概念说明、CLI参考、常见工作流等完整章节
执行可靠88/100

亮点

  • 工具来源明确,参数正确,覆盖主要异常
  • 不可逆操作有确认机制,文档详细说明了 restore 的破坏性操作风险
  • 建议用户在执行前预览变更,并提供 diff 机制帮助用户确认
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。