manage-task-checkpoints
Inspect and recover snapshots owned by a COSH managed Task. Use when the user asks the outer COSH Agent to list Task snapshots, preview or diff an exact recovery point, switch a Task workspace, or recover a workspace-only failure and retry once. Do not use for standalone ws-ckpt workspaces.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 665
- Forks
- 195
01 前言 Front Matter
- name
- manage-task-checkpoints
- description
- Inspect and recover snapshots owned by a COSH managed Task. Use when the user asks the outer COSH Agent to list Task snapshots, preview or diff an exact recovery point, switch a Task workspace, or recover a workspace-only failure and retry once. Do not use for standalone ws-ckpt workspaces.
03 SKILL.md 正文
Manage COSH Task Checkpoints
Treat this Skill as a recovery workflow, not a security boundary. Gateway and ws-ckpt enforce Task ownership, complete snapshot IDs, workspace generation, live diff, peer identity, and replay safety.
Keep the scope Task-only
- Use this Skill only for
/task,tsk_..., or an explicitly managed Task. - Use the separate
ws-ckptSkill for a standalone workspace. - Do not infer the managed workspace from cwd or ask the user for its path.
- Do not call bare
ws-ckpt, a lab script, or the ws-ckpt socket for a Task.
Inspect Task snapshots
Use the Task-scoped Gateway CLI. It resolves an explicit socket, then
COSH_GATEWAY_SOCKET, then the active packaged Gateway instance:
cosh-gateway task --output jsonl list
cosh-gateway task --output jsonl snapshot list <task-id>
cosh-gateway task --output jsonl snapshot preview <task-id> <snapshot-id>
cosh-gateway task --output jsonl snapshot diff <task-id> <snapshot-id>
Accept only complete Task and snapshot IDs returned by Gateway. Never guess or expand a prefix. When several Tasks or recovery points match, summarize their status and file effects and ask the user to choose by meaning rather than copying internal IDs.
Users can inspect the same state directly with:
/task snapshots <task-id>
/task snapshot preview <task-id> <snapshot-id>
/task snapshot diff <task-id> <snapshot-id>
Switch safely
- Require the Task to be terminal before switching.
- Ensure the outer
cosh-shellprocess was launched outside the managed workspace. Runningcd /tmpinside an Agent Bash command changes only the child process and does not release the parent shell cwd. - Preview the exact snapshot immediately before switching.
- Describe the files that will be removed, restored, or retained. Ask for natural-language confirmation unless the user already authorized this one exact recovery attempt.
- Submit the exact snapshot ID, preview digest, terminal Task revision, and a fresh idempotency key for this operation.
- Verify the resulting file state against the preview.
cosh-gateway task --output jsonl snapshot switch <task-id> <snapshot-id> \
--preview-digest <digest> \
--expected-revision <revision> \
--idempotency-key <fresh-key>
Do not display Task IDs, snapshot IDs, revisions, digests, approval IDs, or idempotency keys in ordinary progress or final prose. Keep them in the actual command or approval card. Describe recovery points by step and affected files.
Handle cwd and uncertain results
- On
CwdOccupied, state that the target was not switched. Ask the user to exit the entire COSH session, start COSH from outside the workspace, and run a new preview. Do not retry the consumed operation key. - On
unknown,possibly_applied, or lost transport after dispatch, stop and report the uncertainty. Never generate another key to retry blindly. - Never add
--forceor--yes, and never bypass Gateway with raw ws-ckpt.
Recover and retry once
For an established workspace-file failure in a multi-step Task:
- Stop further file writes.
- Confirm that the failure has no network, cloud, service, credential, database, or other external side effect.
- Prefer the nearest
pre_effectbefore the bad step; use the baseline only when no suitable pre-effect checkpoint exists. - Preview and switch once using the workflow above.
- Retry the failed step once with a corrected approach. Do not loop.
- Report the human-readable recovery point, verification, retry result, and whether Gateway created a recovery snapshot that can undo the switch.
File snapshots do not restore external side effects. Stop automatic recovery and identify the remaining state when any such effect may have occurred.
04 同仓库更多 Skills
ws-ckpt
Linux 工作区快照(ws-ckpt)。用户想保存或备份工作区当前状态("保存一下"、"留个底"、"先备份"), 想撤销或恢复文件改动("回滚"、"撤销"、"改回去"、"恢复到之前"、"刚才那版"), 想查看、对比或删除历史版本,或要开启/关闭每回合自动快照、定时快照、快照保留策略时使用。 用户没提"快照"、只表达保存或恢复工作区文件的意图时同样适用;用户点名 git 操作(commit、branch、reset 到某提交)时不适用。
skillfs-mount
Help users configure, mount, and unmount a skillfs FUSE virtual filesystem on their local machine (e.g. for openclaw). Covers analyzing existing skill usage to suggest view configuration, generating skillfs-views.toml, mounting, and graceful unmount. Use this skill when the user asks to: set up skillfs, configure skill views, mount or unmount skillfs, check if skillfs is running, or get help organizing their skills directory (especially for openclaw users).
test-skill
A test skill used in integration tests.
storage-resize
Linux 磁盘扩容技能(RPM 包管理系统),实现云盘扩容后自动完成分区调整和文件系统扩容。支持系统盘/数据盘在线扩容,适配 XFS/EXT4/Btrfs 文件系统。适用于 RPM 包管理的 Linux 系统(如 Alibaba Cloud Linux)。
ktuner
内核参数自动调优。分析系统配置,输出调优建议并可一键应用,支持自动回滚。使用场景:系统性能优化、安全加固、内核参数诊断。
backup-restore
处理所有备份与恢复任务,覆盖四个层面:工作区(项目/数据库/代码)、用户数据(家目录/dotfiles/密钥)、操作系统(全量系统/磁盘镜像/LVM 快照)、阿里云快照(云盘快照/自动策略/跨地域复制/整机镜像)。适用于 RPM 包管理的 Linux 系统(如 Alibaba Cloud Linux)纯命令行环境,使用 yum 包管理器。当用户提到备份、恢复、快照、归档、回滚、克隆、迁移、容灾等任何涉及数据保存或恢复的请求时触发此技能,即使请求看起来很简单也应使用。