AI & Integration v1.0.1

snapshots

Use this skill when the user wants to save a version of a note, create a backup before editing, list previous versions,...

xisen 更新于 2026-05-21 1 浏览
下载 SKILL

技能说明

Use this skill when the user wants to save a version of a note, create a backup before editing, list previous versions, restore a note to an earlier state, or manage note history. Triggers on: 'save version', 'snapshot', 'backup note', 'restore', 'rollback', 'version history', 'undo changes', 'previous version'.

使用场景

Save, list, and restore note versions using Aicoo OS endpoints.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/snapshots
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 22 kB
SKILL.md text/markdown
---
name: snapshots
description: "Use this skill when the user wants to save a version of a note, create a backup before editing, list previous versions, restore a note to an earlier state, or manage note history. Triggers on: 'save version', 'snapshot', 'backup note', 'restore', 'rollback', 'version history', 'undo changes', 'previous version'."
user-invokable: true
metadata:
  author: systemind
  version: "2.0.0"
---

# Snapshots — Note Versioning

Save, list, and restore note versions using Aicoo OS endpoints.

## Prerequisites

- `AICOO_API_KEY` must be set
- Base URL: `https://www.aicoo.io/api/v1`

## API Endpoints

- `GET /api/v1/os/snapshots/{noteId}`
- `POST /api/v1/os/snapshots/{noteId}`
- `POST /api/v1/os/snapshots/{noteId}/restore`

## Save a Snapshot

```bash
curl -s -X POST "https://www.aicoo.io/api/v1/os/snapshots/42" \
  -H "Authorization: Bearer $AICOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"Before Q2 update"}' | jq .
```

## List Snapshots

```bash
curl -s "https://www.aicoo.io/api/v1/os/snapshots/42?limit=10" \
  -H "Authorization: Bearer $AICOO_API_KEY" | jq .
```

## Restore a Snapshot

```bash
curl -s -X POST "https://www.aicoo.io/api/v1/os/snapshots/42/restore" \
  -H "Authorization: Bearer $AICOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"versionId":7}' | jq .
```

Restore auto-backs up current state first.

## Snapshot-Before-Edit Pattern

```bash
# 1) backup
curl -s -X POST "$PULSE_BASE/os/snapshots/42" \
  -H "Authorization: Bearer $AICOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"Pre-edit backup"}' | jq .

# 2) edit
curl -s -X PATCH "$PULSE_BASE/os/notes/42" \
  -H "Authorization: Bearer $AICOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content":"# Updated content..."}' | jq .
```

## Scheduled Backup Pattern

```bash
# list notes in a folder
NOTES=$(curl -s "$PULSE_BASE/os/notes?folderId=5&limit=200" \
  -H "Authorization: Bearer $AICOO_API_KEY" | jq -r '.notes[].id')

# backup each
for id in $NOTES; do
  curl -s -X POST "$PULSE_BASE/os/snapshots/$id" \
    -H "Authorization: Bearer $AICOO_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"label\":\"Pre-sync $(date +%Y-%m-%d)\"}" | jq .success
done
```

## Guest Access Guidance

Guest write scope still depends on `notesAccess` on the share link:

- `read`: can view/search notes
- `write`: can create notes
- `edit`: can edit notes and use snapshots

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。